@transitive-sdk/clickhouse 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +3 -5
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const { createClient } = require('@clickhouse/client');
|
|
|
3
3
|
/** Singleton ClickHouse client wrapper with multi-tenant table support */
|
|
4
4
|
class ClickHouse {
|
|
5
5
|
init({url, dbName, user, password} = {}) {
|
|
6
|
-
const _url = url || process.env.CLICKHOUSE_URL || 'http://
|
|
6
|
+
const _url = url || process.env.CLICKHOUSE_URL || 'http://clickhouse:8123';
|
|
7
7
|
const _dbName = dbName || process.env.CLICKHOUSE_DB || 'default';
|
|
8
8
|
const _user = user || process.env.CLICKHOUSE_USER || 'default';
|
|
9
9
|
const _password = password || process.env.CLICKHOUSE_PASSWORD || '';
|
|
@@ -53,7 +53,7 @@ class ClickHouse {
|
|
|
53
53
|
'INDEX idx_deviceid (DeviceId) TYPE bloom_filter(0.01) GRANULARITY 1'
|
|
54
54
|
];
|
|
55
55
|
const query = `CREATE TABLE IF NOT EXISTS ${tableName} (${fullSchema.join(', ')}) ${settings.join(' ')}`;
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
try {
|
|
58
58
|
return await this.client.exec({
|
|
59
59
|
query,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transitive-sdk/clickhouse",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A tiny ClickHouse utility class for use in the Transitive framework.",
|
|
5
5
|
"homepage": "https://transitiverobotics.com",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"main": "index.js",
|
|
23
|
-
"scripts": {
|
|
24
|
-
},
|
|
23
|
+
"scripts": {},
|
|
25
24
|
"dependencies": {
|
|
26
25
|
"@clickhouse/client": "^1.12.1"
|
|
27
26
|
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
}
|
|
27
|
+
"devDependencies": {}
|
|
30
28
|
}
|