@proteinjs/db-spanner-common 1.3.46 → 1.3.47
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 +11 -0
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/src/columns/JsonColumn.d.ts +1 -1
- package/dist/src/columns/JsonColumn.d.ts.map +1 -1
- package/dist/src/columns/JsonColumn.js +11 -15
- package/dist/src/columns/JsonColumn.js.map +1 -1
- package/generated/index.ts +1 -1
- package/package.json +3 -3
- package/src/columns/JsonColumn.ts +1 -1
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.3.47](https://github.com/proteinjs/db/compare/@proteinjs/db-spanner-common@1.3.46...@proteinjs/db-spanner-common@1.3.47) (2026-10-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Performance Improvements
|
|
10
|
+
|
|
11
|
+
* **db:** a result set hydrates in one synchronous pass; a DateTime field builds its moment on first read ([df7728a](https://github.com/proteinjs/db/commit/df7728a6c09a3dbe2ba9e25cd89101c47c8e9d15))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.3.46](https://github.com/proteinjs/db/compare/@proteinjs/db-spanner-common@1.3.45...@proteinjs/db-spanner-common@1.3.46) (2026-10-13)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @proteinjs/db-spanner-common
|
package/dist/generated/index.js
CHANGED
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
require("@proteinjs/db");
|
|
19
19
|
require("@proteinjs/logger");
|
|
20
20
|
/** Generate Source Graph */
|
|
21
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-spanner-common/JsonColumn\",\"value\":{\"packageName\":\"@proteinjs/db-spanner-common\",\"name\":\"JsonColumn\",\"filePath\":\"src/columns/JsonColumn.ts\",\"qualifiedName\":\"@proteinjs/db-spanner-common/JsonColumn\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"ColumnOptions\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/ColumnOptions\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<any>\",\"filePath\":null,\"qualifiedName\":\"/Promise<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fieldValue\",\"type\":{\"packageName\":\"\",\"name\":\"T | null | undefined\",\"filePath\":null,\"qualifiedName\":\"/T | null | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"
|
|
21
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-spanner-common/JsonColumn\",\"value\":{\"packageName\":\"@proteinjs/db-spanner-common\",\"name\":\"JsonColumn\",\"filePath\":\"src/columns/JsonColumn.ts\",\"qualifiedName\":\"@proteinjs/db-spanner-common/JsonColumn\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"ColumnOptions\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/ColumnOptions\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<any>\",\"filePath\":null,\"qualifiedName\":\"/Promise<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fieldValue\",\"type\":{\"packageName\":\"\",\"name\":\"T | null | undefined\",\"filePath\":null,\"qualifiedName\":\"/T | null | undefined\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"T | null\",\"filePath\":null,\"qualifiedName\":\"/T | null\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedFieldValue\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Column\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Column\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/T\",\"/any\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Column\"}],\"edges\":[{\"v\":\"@proteinjs/db-spanner-common/JsonColumn\",\"w\":\"@proteinjs/db/Column\",\"value\":\"implements interface\"}]}";
|
|
22
22
|
/** Generate Source Links */
|
|
23
23
|
var JsonColumn_1 = require("../src/columns/JsonColumn");
|
|
24
24
|
var sourceLinks = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,24EAA24E,CAAC;AAGh6E,4BAA4B;AAE5B,wDAAuD;AAEvD,IAAM,WAAW,GAAG;IACnB,yCAAyC,EAAE,uBAAU;CACrD,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
|
@@ -15,6 +15,6 @@ export declare class JsonColumn<T> implements Column<T, any> {
|
|
|
15
15
|
options?: ColumnOptions | undefined;
|
|
16
16
|
constructor(name: string, options?: ColumnOptions | undefined);
|
|
17
17
|
serialize(fieldValue: T | null | undefined): Promise<any>;
|
|
18
|
-
deserialize(serializedFieldValue: any):
|
|
18
|
+
deserialize(serializedFieldValue: any): T | null;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=JsonColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonColumn.d.ts","sourceRoot":"","sources":["../../../src/columns/JsonColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQtD;;;;;;;;;;GAUG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC;IAEzC,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC;gBADR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,2BAAe;IAG1B,SAAS,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonColumn.d.ts","sourceRoot":"","sources":["../../../src/columns/JsonColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQtD;;;;;;;;;;GAUG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC;IAEzC,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC;gBADR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,2BAAe;IAG1B,SAAS,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC;IAY/D,WAAW,CAAC,oBAAoB,EAAE,GAAG,GAAG,CAAC,GAAG,IAAI;CAgBjD"}
|
|
@@ -73,21 +73,17 @@ var JsonColumn = /** @class */ (function () {
|
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
75
|
JsonColumn.prototype.deserialize = function (serializedFieldValue) {
|
|
76
|
-
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
return [2 /*return*/, serializedFieldValue];
|
|
89
|
-
});
|
|
90
|
-
});
|
|
76
|
+
if (serializedFieldValue === undefined || serializedFieldValue == null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
// A raw array can appear if a row predates this wrapping; pass it through.
|
|
80
|
+
if (Array.isArray(serializedFieldValue)) {
|
|
81
|
+
return serializedFieldValue;
|
|
82
|
+
}
|
|
83
|
+
if (typeof serializedFieldValue === 'object' && Array.isArray(serializedFieldValue[JSON_ARRAY_MARKER])) {
|
|
84
|
+
return serializedFieldValue[JSON_ARRAY_MARKER];
|
|
85
|
+
}
|
|
86
|
+
return serializedFieldValue;
|
|
91
87
|
};
|
|
92
88
|
return JsonColumn;
|
|
93
89
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonColumn.js","sourceRoot":"","sources":["../../../src/columns/JsonColumn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;GAGG;AACH,IAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH;IACE,oBACS,IAAY,EACZ,OAAuB;QADvB,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAgB;IAC7B,CAAC;IAEE,8BAAS,GAAf,UAAgB,UAAgC;;;;gBAC9C,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,IAAI,IAAI,EAAE;oBAClD,sBAAO,IAAI,EAAC;iBACb;gBAED,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;oBAC7B,gCAAS,GAAC,iBAAiB,IAAG,UAAU,OAAG;iBAC5C;gBAED,sBAAO,UAAU,EAAC;;;KACnB;
|
|
1
|
+
{"version":3,"file":"JsonColumn.js","sourceRoot":"","sources":["../../../src/columns/JsonColumn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;GAGG;AACH,IAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH;IACE,oBACS,IAAY,EACZ,OAAuB;QADvB,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAgB;IAC7B,CAAC;IAEE,8BAAS,GAAf,UAAgB,UAAgC;;;;gBAC9C,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,IAAI,IAAI,EAAE;oBAClD,sBAAO,IAAI,EAAC;iBACb;gBAED,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;oBAC7B,gCAAS,GAAC,iBAAiB,IAAG,UAAU,OAAG;iBAC5C;gBAED,sBAAO,UAAU,EAAC;;;KACnB;IAED,gCAAW,GAAX,UAAY,oBAAyB;QACnC,IAAI,oBAAoB,KAAK,SAAS,IAAI,oBAAoB,IAAI,IAAI,EAAE;YACtE,OAAO,IAAI,CAAC;SACb;QAED,2EAA2E;QAC3E,IAAI,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE;YACvC,OAAO,oBAAyB,CAAC;SAClC;QAED,IAAI,OAAO,oBAAoB,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,EAAE;YACtG,OAAO,oBAAoB,CAAC,iBAAiB,CAAM,CAAC;SACrD;QAED,OAAO,oBAAyB,CAAC;IACnC,CAAC;IACH,iBAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,gCAAU"}
|
package/generated/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import '@proteinjs/logger';
|
|
|
6
6
|
/** Generate Source Graph */
|
|
7
7
|
|
|
8
8
|
const sourceGraph =
|
|
9
|
-
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/db-spanner-common/JsonColumn","value":{"packageName":"@proteinjs/db-spanner-common","name":"JsonColumn","filePath":"src/columns/JsonColumn.ts","qualifiedName":"@proteinjs/db-spanner-common/JsonColumn","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"options","type":{"packageName":"@proteinjs/db","name":"ColumnOptions","filePath":null,"qualifiedName":"@proteinjs/db/ColumnOptions","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"serialize","returnType":{"packageName":"","name":"Promise<any>","filePath":null,"qualifiedName":"/Promise<any>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fieldValue","type":{"packageName":"","name":"T | null | undefined","filePath":null,"qualifiedName":"/T | null | undefined","typeParameters":null,"directParents":null}}]},{"name":"deserialize","returnType":{"packageName":"","name":"
|
|
9
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/db-spanner-common/JsonColumn","value":{"packageName":"@proteinjs/db-spanner-common","name":"JsonColumn","filePath":"src/columns/JsonColumn.ts","qualifiedName":"@proteinjs/db-spanner-common/JsonColumn","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"options","type":{"packageName":"@proteinjs/db","name":"ColumnOptions","filePath":null,"qualifiedName":"@proteinjs/db/ColumnOptions","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"serialize","returnType":{"packageName":"","name":"Promise<any>","filePath":null,"qualifiedName":"/Promise<any>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fieldValue","type":{"packageName":"","name":"T | null | undefined","filePath":null,"qualifiedName":"/T | null | undefined","typeParameters":null,"directParents":null}}]},{"name":"deserialize","returnType":{"packageName":"","name":"T | null","filePath":null,"qualifiedName":"/T | null","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"serializedFieldValue","type":{"packageName":"","name":"any","filePath":null,"qualifiedName":"/any","typeParameters":null,"directParents":null}}]}],"typeParameters":["/T"],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"Column","filePath":null,"qualifiedName":"@proteinjs/db/Column","properties":[],"methods":[],"typeParameters":["/T","/any"],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/Column"}],"edges":[{"v":"@proteinjs/db-spanner-common/JsonColumn","w":"@proteinjs/db/Column","value":"implements interface"}]}';
|
|
10
10
|
|
|
11
11
|
/** Generate Source Links */
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-spanner-common",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.47",
|
|
4
4
|
"description": "Common libs for Google Spanner",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"watch": "reflection-watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@proteinjs/db": "^1.54.
|
|
24
|
+
"@proteinjs/db": "^1.54.2",
|
|
25
25
|
"@proteinjs/logger": "^1.0.21",
|
|
26
26
|
"@proteinjs/reflection": "^1.2.0"
|
|
27
27
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
},
|
|
41
41
|
"main": "./dist/generated/index.js",
|
|
42
42
|
"types": "./dist/generated/index.d.ts",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "d90bd35b32b628c2b9cf9d8ddb16b4a2b9140f11"
|
|
44
44
|
}
|
|
@@ -35,7 +35,7 @@ export class JsonColumn<T> implements Column<T, any> {
|
|
|
35
35
|
return fieldValue;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
deserialize(serializedFieldValue: any): T | null {
|
|
39
39
|
if (serializedFieldValue === undefined || serializedFieldValue == null) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|