@transitive-sdk/clickhouse 0.6.0 → 0.6.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 +1 -1
package/index.js
CHANGED
|
@@ -485,7 +485,7 @@ class ClickHouse {
|
|
|
485
485
|
const orgUser = `org_${orgId}_user`;
|
|
486
486
|
|
|
487
487
|
// Check if user exists
|
|
488
|
-
const userExists = await
|
|
488
|
+
const userExists = await this.client.query({
|
|
489
489
|
query: `SELECT name FROM system.users WHERE name = '${orgUser}'`,
|
|
490
490
|
format: 'JSONEachRow'
|
|
491
491
|
});
|
|
@@ -521,7 +521,7 @@ class ClickHouse {
|
|
|
521
521
|
// Immediately revoke select access to system tables again (see
|
|
522
522
|
// https://clickhouse.com/docs/sql-reference/statements/revoke#examples):
|
|
523
523
|
`REVOKE SELECT ON system.* FROM ${orgUser}`,
|
|
524
|
-
]) await
|
|
524
|
+
]) await this.client.command({ query });
|
|
525
525
|
|
|
526
526
|
// store user and password in mongo
|
|
527
527
|
if (accountsCollection) {
|
package/package.json
CHANGED