@cubejs-backend/jdbc-driver 1.7.40 → 1.7.42
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/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jdbc-url.d.ts +26 -0
- package/dist/src/jdbc-url.d.ts.map +1 -0
- package/dist/src/jdbc-url.js +48 -0
- package/dist/src/jdbc-url.js.map +1 -0
- package/package.json +5 -5
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./JDBCDriver"), exports);
|
|
18
|
+
__exportStar(require("./jdbc-url"), exports);
|
|
18
19
|
__exportStar(require("./supported-drivers"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,sDAAoC;AACpC,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,6CAA2B;AAC3B,sDAAoC;AACpC,0CAAwB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `;`-delimited JDBC URL flavour (`jdbc:<engine>://<host>[:<port>];Key=Value;…`) used by
|
|
3
|
+
* Databricks, Spark, SQL Server and friends. Those drivers lowercase parameter names and split each
|
|
4
|
+
* entry on its first `=` without trimming, so these helpers do the same. WHATWG `URL` can not parse it.
|
|
5
|
+
*/
|
|
6
|
+
export type JdbcUrlParam = {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
/** Original text of the entry, so params nobody touched are re-emitted byte for byte. */
|
|
10
|
+
raw: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class ParsedJdbcUrl {
|
|
13
|
+
readonly base: string;
|
|
14
|
+
readonly params: JdbcUrlParam[];
|
|
15
|
+
constructor(base: string, params: JdbcUrlParam[]);
|
|
16
|
+
get(name: string): JdbcUrlParam | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* A JDBC URL may repeat a parameter, and which entry the driver honours is driver-specific, so a
|
|
19
|
+
* caller that cares about a value has to look at all of them.
|
|
20
|
+
*/
|
|
21
|
+
getAll(name: string): JdbcUrlParam[];
|
|
22
|
+
without(names: string[]): ParsedJdbcUrl;
|
|
23
|
+
toString(): string;
|
|
24
|
+
}
|
|
25
|
+
export declare function parseJdbcUrl(jdbcUrl: string): ParsedJdbcUrl;
|
|
26
|
+
//# sourceMappingURL=jdbc-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdbc-url.d.ts","sourceRoot":"","sources":["../../src/jdbc-url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,qBAAa,aAAa;aAEN,IAAI,EAAE,MAAM;aACZ,MAAM,EAAE,YAAY,EAAE;gBADtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,EAAE;IAGjC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIlD;;;OAGG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE;IAMpC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa;IAMvC,QAAQ,IAAI,MAAM;CAG1B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAU3D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The `;`-delimited JDBC URL flavour (`jdbc:<engine>://<host>[:<port>];Key=Value;…`) used by
|
|
4
|
+
* Databricks, Spark, SQL Server and friends. Those drivers lowercase parameter names and split each
|
|
5
|
+
* entry on its first `=` without trimming, so these helpers do the same. WHATWG `URL` can not parse it.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ParsedJdbcUrl = void 0;
|
|
9
|
+
exports.parseJdbcUrl = parseJdbcUrl;
|
|
10
|
+
const URL_DELIMITER = ';';
|
|
11
|
+
const PAIR_DELIMITER = '=';
|
|
12
|
+
class ParsedJdbcUrl {
|
|
13
|
+
base;
|
|
14
|
+
params;
|
|
15
|
+
constructor(base, params) {
|
|
16
|
+
this.base = base;
|
|
17
|
+
this.params = params;
|
|
18
|
+
}
|
|
19
|
+
get(name) {
|
|
20
|
+
return this.getAll(name)[0];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A JDBC URL may repeat a parameter, and which entry the driver honours is driver-specific, so a
|
|
24
|
+
* caller that cares about a value has to look at all of them.
|
|
25
|
+
*/
|
|
26
|
+
getAll(name) {
|
|
27
|
+
const wanted = name.toLowerCase();
|
|
28
|
+
return this.params.filter(({ key }) => key.toLowerCase() === wanted);
|
|
29
|
+
}
|
|
30
|
+
without(names) {
|
|
31
|
+
const removed = names.map(name => name.toLowerCase());
|
|
32
|
+
return new ParsedJdbcUrl(this.base, this.params.filter(({ key }) => !removed.includes(key.toLowerCase())));
|
|
33
|
+
}
|
|
34
|
+
toString() {
|
|
35
|
+
return [this.base, ...this.params.map(({ raw }) => raw)].join(URL_DELIMITER);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ParsedJdbcUrl = ParsedJdbcUrl;
|
|
39
|
+
function parseJdbcUrl(jdbcUrl) {
|
|
40
|
+
const [base, ...parts] = jdbcUrl.split(URL_DELIMITER);
|
|
41
|
+
return new ParsedJdbcUrl(base, parts.map((raw) => {
|
|
42
|
+
const delimiterIndex = raw.indexOf(PAIR_DELIMITER);
|
|
43
|
+
return delimiterIndex >= 0
|
|
44
|
+
? { key: raw.slice(0, delimiterIndex), value: raw.slice(delimiterIndex + 1), raw }
|
|
45
|
+
: { key: raw, value: '', raw };
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=jdbc-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdbc-url.js","sourceRoot":"","sources":["../../src/jdbc-url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA2CH,oCAUC;AAnDD,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,cAAc,GAAG,GAAG,CAAC;AAS3B,MAAa,aAAa;IAEN;IACA;IAFlB,YACkB,IAAY,EACZ,MAAsB;QADtB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAgB;IACrC,CAAC;IAEG,GAAG,CAAC,IAAY;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC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AAC,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE;YAClF,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/jdbc-driver",
|
|
3
3
|
"description": "Cube JDBC database driver",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "1.7.
|
|
5
|
+
"version": "1.7.42",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"index.js"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@cubejs-backend/base-driver": "1.7.
|
|
36
|
+
"@cubejs-backend/base-driver": "1.7.42",
|
|
37
37
|
"@cubejs-backend/node-java-maven": "^0.1.3",
|
|
38
|
-
"@cubejs-backend/shared": "1.7.
|
|
38
|
+
"@cubejs-backend/shared": "1.7.42"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
41
|
"@cubejs-backend/jdbc": "^0.9.0",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"testEnvironment": "node"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cubejs-backend/linter": "1.7.
|
|
49
|
+
"@cubejs-backend/linter": "1.7.42",
|
|
50
50
|
"@types/jest": "^29",
|
|
51
51
|
"@types/node": "^22",
|
|
52
52
|
"typescript": "~6.0.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "919434f42b50183179e97d1eed85696bafb05ae2"
|
|
55
55
|
}
|