@cubejs-backend/druid-driver 0.30.73 → 0.31.0
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/CHANGELOG.md +19 -0
- package/dist/src/DruidDriver.d.ts +13 -4
- package/dist/src/DruidDriver.d.ts.map +1 -1
- package/dist/src/DruidDriver.js +22 -8
- package/dist/src/DruidDriver.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.31.0](https://github.com/cube-js/cube.js/compare/v0.30.75...v0.31.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* multiple data source ([#5326](https://github.com/cube-js/cube.js/issues/5326)) ([334af8c](https://github.com/cube-js/cube.js/commit/334af8c56cd02ae551844e9d1e9ab5e107fb1555))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.30.75](https://github.com/cube-js/cube.js/compare/v0.30.74...v0.30.75) (2022-09-22)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @cubejs-backend/druid-driver
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.30.73](https://github.com/cube-js/cube.js/compare/v0.30.72...v0.30.73) (2022-09-19)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @cubejs-backend/druid-driver
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { BaseDriver, TableQueryResult } from '@cubejs-backend/base-driver';
|
|
2
|
-
import { DruidClient, DruidClientBaseConfiguration } from './DruidClient';
|
|
2
|
+
import { DruidClient, DruidClientBaseConfiguration, DruidClientConfiguration } from './DruidClient';
|
|
3
3
|
import { DruidQuery } from './DruidQuery';
|
|
4
4
|
export declare type DruidDriverConfiguration = DruidClientBaseConfiguration & {
|
|
5
|
-
url
|
|
5
|
+
url?: string;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Druid driver class.
|
|
9
|
+
*/
|
|
7
10
|
export declare class DruidDriver extends BaseDriver {
|
|
8
|
-
protected readonly config:
|
|
11
|
+
protected readonly config: DruidClientConfiguration;
|
|
9
12
|
protected readonly client: DruidClient;
|
|
10
13
|
static dialectClass(): typeof DruidQuery;
|
|
11
14
|
/**
|
|
12
15
|
* Returns default concurrency value.
|
|
13
16
|
*/
|
|
14
17
|
static getDefaultConcurrency(): number;
|
|
15
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Class constructor.
|
|
20
|
+
*/
|
|
21
|
+
constructor(config?: DruidDriverConfiguration & {
|
|
22
|
+
dataSource?: string;
|
|
23
|
+
maxPoolSize?: number;
|
|
24
|
+
});
|
|
16
25
|
readOnly(): boolean;
|
|
17
26
|
testConnection(): Promise<void>;
|
|
18
27
|
query<R = unknown>(query: string, values?: unknown[]): Promise<Array<R>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DruidDriver.d.ts","sourceRoot":"","sources":["../../src/DruidDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DruidDriver.d.ts","sourceRoot":"","sources":["../../src/DruidDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,oBAAY,wBAAwB,GAAG,4BAA4B,GAAG;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAEpD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;WAEzB,YAAY;IAI1B;;OAEG;WACW,qBAAqB,IAAI,MAAM;IAI7C;;OAEG;gBAED,MAAM,GAAE,wBAAwB,GAAG;QACjC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACjB;IAuCD,QAAQ;IAIF,cAAc;IAId,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAIlF,sBAAsB;IAYhB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAI/D,cAAc,CAAC,UAAU,EAAE,MAAM;IAM9C,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE;;;;IAOhD,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG;CAGrC"}
|
package/dist/src/DruidDriver.js
CHANGED
|
@@ -5,15 +5,25 @@ const base_driver_1 = require("@cubejs-backend/base-driver");
|
|
|
5
5
|
const shared_1 = require("@cubejs-backend/shared");
|
|
6
6
|
const DruidClient_1 = require("./DruidClient");
|
|
7
7
|
const DruidQuery_1 = require("./DruidQuery");
|
|
8
|
+
/**
|
|
9
|
+
* Druid driver class.
|
|
10
|
+
*/
|
|
8
11
|
class DruidDriver extends base_driver_1.BaseDriver {
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Class constructor.
|
|
14
|
+
*/
|
|
15
|
+
constructor(config = {}) {
|
|
10
16
|
super();
|
|
11
|
-
|
|
17
|
+
const dataSource = config.dataSource ||
|
|
18
|
+
shared_1.assertDataSource('default');
|
|
19
|
+
let url = config.url || shared_1.getEnv('dbUrl', { dataSource });
|
|
12
20
|
if (!url) {
|
|
13
|
-
const host =
|
|
14
|
-
const port =
|
|
21
|
+
const host = shared_1.getEnv('dbHost', { dataSource });
|
|
22
|
+
const port = shared_1.getEnv('dbPort', { dataSource });
|
|
15
23
|
if (host && port) {
|
|
16
|
-
const protocol = shared_1.getEnv('dbSsl'
|
|
24
|
+
const protocol = shared_1.getEnv('dbSsl', { dataSource })
|
|
25
|
+
? 'https'
|
|
26
|
+
: 'http';
|
|
17
27
|
url = `${protocol}://${host}:${port}`;
|
|
18
28
|
}
|
|
19
29
|
else {
|
|
@@ -22,9 +32,13 @@ class DruidDriver extends base_driver_1.BaseDriver {
|
|
|
22
32
|
}
|
|
23
33
|
this.config = {
|
|
24
34
|
url,
|
|
25
|
-
user:
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
user: config.user ||
|
|
36
|
+
shared_1.getEnv('dbUser', { dataSource }),
|
|
37
|
+
password: config.password ||
|
|
38
|
+
shared_1.getEnv('dbPass', { dataSource }),
|
|
39
|
+
database: config.database ||
|
|
40
|
+
shared_1.getEnv('dbName', { dataSource }) ||
|
|
41
|
+
'default',
|
|
28
42
|
...config,
|
|
29
43
|
};
|
|
30
44
|
this.client = new DruidClient_1.DruidClient(this.config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DruidDriver.js","sourceRoot":"","sources":["../../src/DruidDriver.ts"],"names":[],"mappings":";;;AAAA,6DAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"DruidDriver.js","sourceRoot":"","sources":["../../src/DruidDriver.ts"],"names":[],"mappings":";;;AAAA,6DAA2E;AAC3E,mDAAkE;AAClE,+CAAoG;AACpG,6CAA0C;AAM1C;;GAEG;AACH,MAAa,WAAY,SAAQ,wBAAU;IAgBzC;;OAEG;IACH,YACE,SAGI,EAAE;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MAAM,CAAC,qBAAqB;QACjC,OAAO,CAAC,CAAC;IACX,CAAC;IAgDM,QAAQ;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,EAAE;IACJ,CAAC;IAEM,KAAK,CAAC,KAAK,CAAc,KAAa,EAAE,SAAoB,EAAE;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;IACrE,CAAC;IAEM,sBAAsB;QAC3B,OAAO;;6BAEkB,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;4BACpC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;8BAChC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC;2BACvC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;;;KAGvD,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,UAAkB;QACrD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAkB;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAmB,yEAAyE,EAAE;YAC7G,UAAU;SACX,CAAC,CAAC;IACL,CAAC;IAES,oBAAoB,CAAC,MAAiB;QAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC5B,KAAK;YACL,IAAI,EAAE,SAAS;SAChB,CAAC,CAAC,CAAC;IACN,CAAC;IAES,iBAAiB,CAAC,GAAQ;QAClC,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA1GD,kCA0GC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/druid-driver",
|
|
3
3
|
"description": "Cube.js Druid database driver",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.31.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"dist/src/*"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@cubejs-backend/base-driver": "^0.
|
|
32
|
-
"@cubejs-backend/schema-compiler": "^0.
|
|
33
|
-
"@cubejs-backend/shared": "^0.
|
|
31
|
+
"@cubejs-backend/base-driver": "^0.31.0",
|
|
32
|
+
"@cubejs-backend/schema-compiler": "^0.31.0",
|
|
33
|
+
"@cubejs-backend/shared": "^0.31.0",
|
|
34
34
|
"axios": "^0.21.1",
|
|
35
35
|
"moment-timezone": "^0.5.31"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@cubejs-backend/linter": "^0.
|
|
38
|
+
"@cubejs-backend/linter": "^0.31.0",
|
|
39
39
|
"@types/generic-pool": "^3.1.9",
|
|
40
40
|
"@types/jest": "^26.0.20",
|
|
41
41
|
"@types/node": "^10.17.55",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"jest": {
|
|
53
53
|
"testEnvironment": "node"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8cdec759f298fb20c48194254ccc04b6fdad46bf"
|
|
56
56
|
}
|