@proteinjs/db-driver-spanner 1.10.7 → 1.10.8
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
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [1.10.8](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-spanner@1.10.7...@proteinjs/db-driver-spanner@1.10.8) (2026-03-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Update `KnexColumnTypeFactory` and `SpannerColumnTypeFactory` to accommodate `isInstanceOf` becoming a type guard. ([833fb14](https://github.com/proteinjs/db/commit/833fb1474297b358a3a6bc52105ed86353314ad3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.10.7](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-spanner@1.10.6...@proteinjs/db-driver-spanner@1.10.7) (2026-03-06)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @proteinjs/db-driver-spanner
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpannerColumnTypeFactory.d.ts","sourceRoot":"","sources":["../../src/SpannerColumnTypeFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,EAOP,MAAM,eAAe,CAAC;AAIvB,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"SpannerColumnTypeFactory.d.ts","sourceRoot":"","sources":["../../src/SpannerColumnTypeFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,EAOP,MAAM,eAAe,CAAC;AAIvB,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM;CA8BlE"}
|
|
@@ -10,6 +10,7 @@ var SpannerColumnTypeFactory = /** @class */ (function () {
|
|
|
10
10
|
}
|
|
11
11
|
SpannerColumnTypeFactory.prototype.getType = function (column, isQueryOrDml) {
|
|
12
12
|
var type;
|
|
13
|
+
var originalColumn = column;
|
|
13
14
|
if ((0, util_1.isInstanceOf)(column, db_1.IntegerColumn)) {
|
|
14
15
|
type = 'INT64';
|
|
15
16
|
}
|
|
@@ -40,7 +41,7 @@ var SpannerColumnTypeFactory = /** @class */ (function () {
|
|
|
40
41
|
type = 'JSON';
|
|
41
42
|
}
|
|
42
43
|
else {
|
|
43
|
-
throw new Error("Invalid column type: ".concat(
|
|
44
|
+
throw new Error("Invalid column type: ".concat(originalColumn.constructor.name, ", must extend a base column"));
|
|
44
45
|
}
|
|
45
46
|
return isQueryOrDml ? type.toLowerCase() : type;
|
|
46
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpannerColumnTypeFactory.js","sourceRoot":"","sources":["../../src/SpannerColumnTypeFactory.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAC/C,oCAUuB;AACvB,kEAA0D;AAE1D,uCAAuC;AACvC;IAAA;
|
|
1
|
+
{"version":3,"file":"SpannerColumnTypeFactory.js","sourceRoot":"","sources":["../../src/SpannerColumnTypeFactory.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAC/C,oCAUuB;AACvB,kEAA0D;AAE1D,uCAAuC;AACvC;IAAA;IA+BA,CAAC;IA9BC,0CAAO,GAAP,UAAQ,MAAwB,EAAE,YAAsB;QACtD,IAAI,IAAY,CAAC;QACjB,IAAM,cAAc,GAAG,MAAM,CAAC;QAE9B,IAAI,IAAA,mBAAY,EAAC,MAAM,EAAE,kBAAa,CAAC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AY,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,CAAC;IACH,+BAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,4DAAwB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-driver-spanner",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.8",
|
|
4
4
|
"main": "./dist/generated/index.js",
|
|
5
5
|
"types": "./dist/generated/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"ts-jest": "29.1.1",
|
|
64
64
|
"typescript": "5.2.2"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "7afa578c6817bb31b123d52e44e08c907df2feda"
|
|
67
67
|
}
|
|
@@ -16,6 +16,7 @@ import { JsonColumn } from '@proteinjs/db-spanner-common';
|
|
|
16
16
|
export class SpannerColumnTypeFactory {
|
|
17
17
|
getType(column: Column<any, any>, isQueryOrDml?: boolean): string {
|
|
18
18
|
let type: string;
|
|
19
|
+
const originalColumn = column;
|
|
19
20
|
|
|
20
21
|
if (isInstanceOf(column, IntegerColumn)) {
|
|
21
22
|
type = 'INT64';
|
|
@@ -38,7 +39,7 @@ export class SpannerColumnTypeFactory {
|
|
|
38
39
|
} else if (isInstanceOf(column, JsonColumn)) {
|
|
39
40
|
type = 'JSON';
|
|
40
41
|
} else {
|
|
41
|
-
throw new Error(`Invalid column type: ${
|
|
42
|
+
throw new Error(`Invalid column type: ${originalColumn.constructor.name}, must extend a base column`);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
return isQueryOrDml ? type.toLowerCase() : type;
|