@proteinjs/db-driver-spanner 1.8.13 → 1.8.15
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/SpannerDriver.d.ts.map +1 -1
- package/dist/src/SpannerDriver.js +35 -12
- package/dist/src/SpannerDriver.js.map +1 -1
- package/dist/src/SpannerSchemaOperations.d.ts.map +1 -1
- package/dist/src/SpannerSchemaOperations.js +20 -16
- package/dist/src/SpannerSchemaOperations.js.map +1 -1
- package/generated/index.ts +9 -6
- package/package.json +8 -9
- package/src/SpannerDriver.ts +26 -3
- package/src/SpannerSchemaOperations.ts +10 -6
- package/LICENSE +0 -21
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.8.14](https://github.com/brentbahry/db/compare/@proteinjs/db-driver-spanner@1.8.13...@proteinjs/db-driver-spanner@1.8.14) (2025-09-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* always use column name when creating indexes ([#18](https://github.com/brentbahry/db/issues/18)) ([6e80a8f](https://github.com/brentbahry/db/commit/6e80a8fe37ac3b92d7a9b6b60fa9239f5c504646))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.8.13](https://github.com/brentbahry/db/compare/@proteinjs/db-driver-spanner@1.8.12...@proteinjs/db-driver-spanner@1.8.13) (2025-09-24)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @proteinjs/db-driver-spanner
|
package/dist/generated/index.js
CHANGED
|
@@ -24,7 +24,7 @@ require("@proteinjs/logger");
|
|
|
24
24
|
require("@proteinjs/reflection");
|
|
25
25
|
require("@proteinjs/util");
|
|
26
26
|
/** Generate Source Graph */
|
|
27
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":\"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"SPANNER\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_INSTANCE\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_DB\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getSpanner\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerInstance\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerDb\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getColumnType\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"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\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<any[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<any[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"\",\"name\":\"Database | Transaction\",\"filePath\":null,\"qualifiedName\":\"/Database | Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runUpdateSchema\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaMetadata\",\"filePath\":\"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerSchemaMetadata.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"tableExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getColumnMetadata\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getPrimaryKey\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getForeignKeys\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getUniqueColumns\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getIndexes\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [keyName: string]: string[] }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [keyName: string]: string[] }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaMetadata\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaMetadata\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaOperations\",\"filePath\":\"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"spannerDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"w\":\"@proteinjs/db/SchemaMetadata\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
|
|
27
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"SPANNER\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_INSTANCE\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_DB\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getSpanner\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerInstance\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerDb\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getColumnType\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"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\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<any[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<any[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"\",\"name\":\"Database | Transaction\",\"filePath\":null,\"qualifiedName\":\"/Database | Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runUpdateSchema\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaMetadata\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerSchemaMetadata.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"tableExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getColumnMetadata\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getPrimaryKey\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getForeignKeys\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getUniqueColumns\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getIndexes\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [keyName: string]: string[] }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [keyName: string]: string[] }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaMetadata\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaMetadata\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaOperations\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"spannerDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"w\":\"@proteinjs/db/SchemaMetadata\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
|
|
28
28
|
/** Generate Source Links */
|
|
29
29
|
var SpannerDriver_1 = require("../src/SpannerDriver");
|
|
30
30
|
var SpannerSchemaMetadata_1 = require("../src/SpannerSchemaMetadata");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,yBAAuB;AACvB,+BAA6B;AAC7B,wCAAsC;AACtC,6CAA2C;AAC3C,6BAA2B;AAC3B,iCAA+B;AAC/B,2BAAyB;AAGzB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,yBAAuB;AACvB,+BAA6B;AAC7B,wCAAsC;AACtC,6CA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MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IAK1E,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,YAAY;IAQpB,SAAS;IAIT,eAAe,IAAI,YAAY;IAO/B;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAiB5D;;;;OAIG;IACH,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM;IActF,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;YAQ5B,QAAQ;IAKtB;;OAEG;IACG,QAAQ,CACZ,iBAAiB,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,SAAS,EACtE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,GAAG,EAAE,CAAC;YAIH,YAAY;IAqC1B;;;;OAIG;IACG,MAAM,CACV,iBAAiB,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,SAAS,EACpE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,MAAM,CAAC;YAYJ,UAAU;IAoCxB;;;;OAIG;IACG,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAQjF;;OAEG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBlD"}
|
|
@@ -162,7 +162,7 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
162
162
|
};
|
|
163
163
|
SpannerDriver.prototype.executeQuery = function (generateStatement, runner) {
|
|
164
164
|
return __awaiter(this, void 0, void 0, function () {
|
|
165
|
-
var _a, sql, namedParams, rows, error_1;
|
|
165
|
+
var _a, sql, namedParams, startTime, rows, durationMs, error_1, durationMs;
|
|
166
166
|
return __generator(this, function (_b) {
|
|
167
167
|
switch (_b.label) {
|
|
168
168
|
case 0:
|
|
@@ -173,6 +173,7 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
173
173
|
getDriverColumnType: this.getColumnType.bind(this),
|
|
174
174
|
handleCaseSensitivity: this.handleCaseSensitivity.bind(this),
|
|
175
175
|
}), sql = _a.sql, namedParams = _a.namedParams;
|
|
176
|
+
startTime = process.hrtime.bigint();
|
|
176
177
|
_b.label = 1;
|
|
177
178
|
case 1:
|
|
178
179
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -184,12 +185,18 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
184
185
|
})];
|
|
185
186
|
case 2:
|
|
186
187
|
rows = (_b.sent())[0];
|
|
188
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
189
|
+
this.logger.debug({
|
|
190
|
+
message: "Query executed",
|
|
191
|
+
obj: { sql: sql, durationMs: durationMs, rowCount: rows.length },
|
|
192
|
+
});
|
|
187
193
|
return [2 /*return*/, rows.map(function (row) { return row.toJSON(); })];
|
|
188
194
|
case 3:
|
|
189
195
|
error_1 = _b.sent();
|
|
196
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
190
197
|
this.logger.error({
|
|
191
198
|
message: "Failed when executing query",
|
|
192
|
-
obj: { sql: sql, params: namedParams, errorDetails: error_1.details },
|
|
199
|
+
obj: { sql: sql, params: namedParams, errorDetails: error_1.details, durationMs: durationMs },
|
|
193
200
|
});
|
|
194
201
|
throw error_1;
|
|
195
202
|
case 4: return [2 /*return*/];
|
|
@@ -232,7 +239,7 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
232
239
|
};
|
|
233
240
|
SpannerDriver.prototype.executeDml = function (generateStatement, runner) {
|
|
234
241
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
var _a, sql, namedParams, rowCount, error_2;
|
|
242
|
+
var _a, sql, namedParams, startTime, rowCount, durationMs, error_2, durationMs;
|
|
236
243
|
return __generator(this, function (_b) {
|
|
237
244
|
switch (_b.label) {
|
|
238
245
|
case 0:
|
|
@@ -242,6 +249,7 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
242
249
|
prefixTablesWithDb: false,
|
|
243
250
|
getDriverColumnType: this.getColumnType.bind(this),
|
|
244
251
|
}), sql = _a.sql, namedParams = _a.namedParams;
|
|
252
|
+
startTime = process.hrtime.bigint();
|
|
245
253
|
_b.label = 1;
|
|
246
254
|
case 1:
|
|
247
255
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -253,12 +261,18 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
253
261
|
})];
|
|
254
262
|
case 2:
|
|
255
263
|
rowCount = (_b.sent())[0];
|
|
264
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
265
|
+
this.logger.debug({
|
|
266
|
+
message: "Dml executed",
|
|
267
|
+
obj: { sql: sql, durationMs: durationMs, rowCount: rowCount },
|
|
268
|
+
});
|
|
256
269
|
return [2 /*return*/, rowCount];
|
|
257
270
|
case 3:
|
|
258
271
|
error_2 = _b.sent();
|
|
272
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
259
273
|
this.logger.error({
|
|
260
274
|
message: "Failed when executing dml",
|
|
261
|
-
obj: { sql: sql, params: namedParams, errorDetails: error_2.details },
|
|
275
|
+
obj: { sql: sql, params: namedParams, errorDetails: error_2.details, durationMs: durationMs },
|
|
262
276
|
});
|
|
263
277
|
throw error_2;
|
|
264
278
|
case 4: return [2 /*return*/];
|
|
@@ -300,24 +314,33 @@ var SpannerDriver = /** @class */ (function () {
|
|
|
300
314
|
*/
|
|
301
315
|
SpannerDriver.prototype.runUpdateSchema = function (sql) {
|
|
302
316
|
return __awaiter(this, void 0, void 0, function () {
|
|
303
|
-
var operation, error_3;
|
|
317
|
+
var startTime, operation, durationMs, error_3, durationMs;
|
|
304
318
|
return __generator(this, function (_a) {
|
|
305
319
|
switch (_a.label) {
|
|
306
320
|
case 0:
|
|
307
|
-
|
|
321
|
+
startTime = process.hrtime.bigint();
|
|
322
|
+
_a.label = 1;
|
|
323
|
+
case 1:
|
|
324
|
+
_a.trys.push([1, 4, , 5]);
|
|
308
325
|
this.logger.debug({ message: "Executing schema update", obj: { sql: sql } });
|
|
309
326
|
return [4 /*yield*/, this.getSpannerDb().updateSchema(sql)];
|
|
310
|
-
case
|
|
327
|
+
case 2:
|
|
311
328
|
operation = (_a.sent())[0];
|
|
312
329
|
return [4 /*yield*/, operation.promise()];
|
|
313
|
-
case 2:
|
|
314
|
-
_a.sent();
|
|
315
|
-
return [3 /*break*/, 4];
|
|
316
330
|
case 3:
|
|
331
|
+
_a.sent();
|
|
332
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
333
|
+
this.logger.debug({ message: "Schema update executed", obj: { sql: sql, durationMs: durationMs } });
|
|
334
|
+
return [3 /*break*/, 5];
|
|
335
|
+
case 4:
|
|
317
336
|
error_3 = _a.sent();
|
|
318
|
-
|
|
337
|
+
durationMs = Number(process.hrtime.bigint() - startTime) / 1000000;
|
|
338
|
+
this.logger.error({
|
|
339
|
+
message: "Failed when executing schema update",
|
|
340
|
+
obj: { sql: sql, errorDetails: error_3.details, durationMs: durationMs },
|
|
341
|
+
});
|
|
319
342
|
throw error_3;
|
|
320
|
-
case
|
|
343
|
+
case 5: return [2 /*return*/];
|
|
321
344
|
}
|
|
322
345
|
});
|
|
323
346
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpannerDriver.js","sourceRoot":"","sources":["../../src/SpannerDriver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAiF;AACjF,oCAOuB;AAEvB,4CAA2C;AAE3C,qEAAoE;AACpE,uEAAsE;AACtE,iEAAgE;AAEhE;;GAEG;AACH;IAQE,uBAAY,MAA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ourceRoot":"","sources":["../../src/SpannerSchemaOperations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qBAAa,uBAAwB,YAAW,gBAAgB;IAGlD,OAAO,CAAC,aAAa;IAFjC,OAAO,CAAC,MAAM,CAA+C;gBAEzC,aAAa,EAAE,aAAa;IAE1C,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"SpannerSchemaOperations.d.ts","sourceRoot":"","sources":["../../src/SpannerSchemaOperations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qBAAa,uBAAwB,YAAW,gBAAgB;IAGlD,OAAO,CAAC,aAAa;IAFjC,OAAO,CAAC,MAAM,CAA+C;gBAEzC,aAAa,EAAE,aAAa;IAE1C,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;IA6C7B,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,YAAY;CA2F/D"}
|
|
@@ -48,14 +48,14 @@ var SpannerSchemaOperations = /** @class */ (function () {
|
|
|
48
48
|
SpannerSchemaOperations.prototype.createTable = function (table) {
|
|
49
49
|
var _a, _b, _c, _d;
|
|
50
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var indexes, _i, _e,
|
|
52
|
-
return __generator(this, function (
|
|
53
|
-
switch (
|
|
51
|
+
var indexes, _i, _e, _f, name_1, columns, serializedColumns, foreignKeys, columnPropertyName, column, columnType, createTableSql, _g, indexes_1, index, createIndexSql, indexName;
|
|
52
|
+
return __generator(this, function (_h) {
|
|
53
|
+
switch (_h.label) {
|
|
54
54
|
case 0:
|
|
55
55
|
indexes = [];
|
|
56
56
|
for (_i = 0, _e = table.indexes; _i < _e.length; _i++) {
|
|
57
|
-
|
|
58
|
-
indexes.push({ name:
|
|
57
|
+
_f = _e[_i], name_1 = _f.name, columns = _f.columns;
|
|
58
|
+
indexes.push({ name: name_1, columns: columns.map(function (x) { return table.columns[x].name; }) });
|
|
59
59
|
}
|
|
60
60
|
serializedColumns = [];
|
|
61
61
|
foreignKeys = [];
|
|
@@ -65,7 +65,11 @@ var SpannerSchemaOperations = /** @class */ (function () {
|
|
|
65
65
|
serializedColumns.push({ name: column.name, type: columnType, nullable: (_a = column.options) === null || _a === void 0 ? void 0 : _a.nullable });
|
|
66
66
|
this.logger.info({ message: "[".concat(table.name, "] Creating column: ").concat(column.name, " (").concat(column.constructor.name, ")") });
|
|
67
67
|
if ((_c = (_b = column.options) === null || _b === void 0 ? void 0 : _b.unique) === null || _c === void 0 ? void 0 : _c.unique) {
|
|
68
|
-
indexes.push({
|
|
68
|
+
indexes.push({
|
|
69
|
+
name: column.options.unique.indexName,
|
|
70
|
+
columns: [table.columns[column.name].name],
|
|
71
|
+
unique: true,
|
|
72
|
+
});
|
|
69
73
|
this.logger.info({ message: "[".concat(table.name, ".").concat(column.name, "] Adding unique constraint") });
|
|
70
74
|
}
|
|
71
75
|
if ((_d = column.options) === null || _d === void 0 ? void 0 : _d.references) {
|
|
@@ -78,26 +82,26 @@ var SpannerSchemaOperations = /** @class */ (function () {
|
|
|
78
82
|
createTableSql = new db_1.StatementFactory().createTable(table.name, serializedColumns, 'id', foreignKeys).sql;
|
|
79
83
|
return [4 /*yield*/, this.spannerDriver.runUpdateSchema(createTableSql)];
|
|
80
84
|
case 1:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
_h.sent();
|
|
86
|
+
_g = 0, indexes_1 = indexes;
|
|
87
|
+
_h.label = 2;
|
|
84
88
|
case 2:
|
|
85
|
-
if (!(
|
|
86
|
-
index = indexes_1[
|
|
89
|
+
if (!(_g < indexes_1.length)) return [3 /*break*/, 5];
|
|
90
|
+
index = indexes_1[_g];
|
|
87
91
|
createIndexSql = new db_1.StatementFactory().createIndex(index, table.name).sql;
|
|
88
92
|
indexName = db_1.StatementUtil.getIndexName(table.name, index);
|
|
89
93
|
this.logger.info({
|
|
90
|
-
message: "[".concat(table.name, "] Creating index: ").concat(indexName, " (").concat(
|
|
94
|
+
message: "[".concat(table.name, "] Creating index: ").concat(indexName, " (").concat(index.columns.join(', '), ")"),
|
|
91
95
|
});
|
|
92
96
|
return [4 /*yield*/, this.spannerDriver.runUpdateSchema(createIndexSql)];
|
|
93
97
|
case 3:
|
|
94
|
-
|
|
98
|
+
_h.sent();
|
|
95
99
|
this.logger.info({
|
|
96
|
-
message: "[".concat(table.name, "] Created index: ").concat(indexName, " (").concat(
|
|
100
|
+
message: "[".concat(table.name, "] Created index: ").concat(indexName, " (").concat(index.columns.join(', '), ")"),
|
|
97
101
|
});
|
|
98
|
-
|
|
102
|
+
_h.label = 4;
|
|
99
103
|
case 4:
|
|
100
|
-
|
|
104
|
+
_g++;
|
|
101
105
|
return [3 /*break*/, 2];
|
|
102
106
|
case 5: return [2 /*return*/];
|
|
103
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpannerSchemaOperations.js","sourceRoot":"","sources":["../../src/SpannerSchemaOperations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAC3C,oCAOuB;AAEvB,uEAAsE;AAEtE;IAGE,iCAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAFxC,WAAM,GAAG,IAAI,eAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IAEV,CAAC;IAE9C,6CAAW,GAAjB,UAAkB,KAAiB;;;;;;;wBAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"SpannerSch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AG;yBAC1I,CAAC,CAAC;wBACH,qBAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,cAAc,CAAC,EAAA;;wBAAxD,SAAwD,CAAC;wBACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;4BACf,OAAO,EAAE,WAAI,KAAK,CAAC,IAAI,8BAAoB,SAAS,eAAK,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAG;yBACzI,CAAC,CAAC;;;wBATe,IAA4B,CAAA;;;;;;KAWjD;IACH,8BAAC;AAAD,CAAC,AA7ID,IA6IC;AA7IY,0DAAuB"}
|
package/generated/index.ts
CHANGED
|
@@ -9,10 +9,11 @@ import '@proteinjs/logger';
|
|
|
9
9
|
import '@proteinjs/reflection';
|
|
10
10
|
import '@proteinjs/util';
|
|
11
11
|
|
|
12
|
+
|
|
12
13
|
/** Generate Source Graph */
|
|
13
14
|
|
|
14
|
-
const sourceGraph =
|
|
15
|
-
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/db-driver-spanner/SpannerDriver","value":{"packageName":"@proteinjs/db-driver-spanner","name":"SpannerDriver","filePath":"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerDriver.ts","qualifiedName":"@proteinjs/db-driver-spanner/SpannerDriver","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"SPANNER","type":{"packageName":"@google-cloud/spanner","name":"Spanner","filePath":null,"qualifiedName":"@google-cloud/spanner/Spanner","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"SPANNER_INSTANCE","type":{"packageName":"@google-cloud/spanner","name":"Instance","filePath":null,"qualifiedName":"@google-cloud/spanner/Instance","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"SPANNER_DB","type":{"packageName":"@google-cloud/spanner","name":"Database","filePath":null,"qualifiedName":"@google-cloud/spanner/Database","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"},{"name":"config","type":{"packageName":"@proteinjs/db-driver-spanner","name":"SpannerConfig","filePath":null,"qualifiedName":"@proteinjs/db-driver-spanner/SpannerConfig","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"},{"name":"getTable","type":{"packageName":"","name":"((name: string) => Table<any>) | undefined","filePath":null,"qualifiedName":"/((name: string) => Table<any>) | undefined","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[{"name":"getSpanner","returnType":{"packageName":"@google-cloud/spanner","name":"Spanner","filePath":null,"qualifiedName":"@google-cloud/spanner/Spanner","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]},{"name":"getSpannerInstance","returnType":{"packageName":"@google-cloud/spanner","name":"Instance","filePath":null,"qualifiedName":"@google-cloud/spanner/Instance","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]},{"name":"getSpannerDb","returnType":{"packageName":"@google-cloud/spanner","name":"Database","filePath":null,"qualifiedName":"@google-cloud/spanner/Database","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[]},{"name":"getDbName","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"getTableManager","returnType":{"packageName":"@proteinjs/db","name":"TableManager","filePath":null,"qualifiedName":"@proteinjs/db/TableManager","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"getColumnType","returnType":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"tableName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"columnName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"handleCaseSensitivity","returnType":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"tableName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"columnName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"caseSensitive","type":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null}}]},{"name":"createDbIfNotExists","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"dbExists","returnType":{"packageName":"","name":"Promise<boolean>","filePath":null,"qualifiedName":"/Promise<boolean>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"databaseName","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"runQuery","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":"generateStatement","type":{"packageName":"","name":"(config: DbDriverQueryStatementConfig) => Statement","filePath":null,"qualifiedName":"/(config: DbDriverQueryStatementConfig) => Statement","typeParameters":null,"directParents":null}},{"name":"transaction","type":{"packageName":"@google-cloud/spanner","name":"Transaction","filePath":null,"qualifiedName":"@google-cloud/spanner/Transaction","typeParameters":null,"directParents":null}}]},{"name":"executeQuery","returnType":{"packageName":"","name":"Promise<any[]>","filePath":null,"qualifiedName":"/Promise<any[]>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"generateStatement","type":{"packageName":"","name":"(config: DbDriverQueryStatementConfig) => Statement","filePath":null,"qualifiedName":"/(config: DbDriverQueryStatementConfig) => Statement","typeParameters":null,"directParents":null}},{"name":"runner","type":{"packageName":"","name":"Database | Transaction","filePath":null,"qualifiedName":"/Database | Transaction","typeParameters":null,"directParents":null}}]},{"name":"runDml","returnType":{"packageName":"","name":"Promise<number>","filePath":null,"qualifiedName":"/Promise<number>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"generateStatement","type":{"packageName":"","name":"(config: DbDriverDmlStatementConfig) => Statement","filePath":null,"qualifiedName":"/(config: DbDriverDmlStatementConfig) => Statement","typeParameters":null,"directParents":null}},{"name":"transaction","type":{"packageName":"@google-cloud/spanner","name":"Transaction","filePath":null,"qualifiedName":"@google-cloud/spanner/Transaction","typeParameters":null,"directParents":null}}]},{"name":"executeDml","returnType":{"packageName":"","name":"Promise<number>","filePath":null,"qualifiedName":"/Promise<number>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"generateStatement","type":{"packageName":"","name":"(config: DbDriverDmlStatementConfig) => Statement","filePath":null,"qualifiedName":"/(config: DbDriverDmlStatementConfig) => Statement","typeParameters":null,"directParents":null}},{"name":"runner","type":{"packageName":"@google-cloud/spanner","name":"Transaction","filePath":null,"qualifiedName":"@google-cloud/spanner/Transaction","typeParameters":null,"directParents":null}}]},{"name":"runTransaction","returnType":{"packageName":"","name":"Promise<T>","filePath":null,"qualifiedName":"/Promise<T>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fn","type":{"packageName":"","name":"(transaction: Transaction) => Promise<T>","filePath":null,"qualifiedName":"/(transaction: Transaction) => Promise<T>","typeParameters":null,"directParents":null}}]},{"name":"runUpdateSchema","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"sql","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"DbDriver","filePath":null,"qualifiedName":"@proteinjs/db/DbDriver","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/DbDriver"},{"v":"@proteinjs/db-driver-spanner/SpannerSchemaMetadata","value":{"packageName":"@proteinjs/db-driver-spanner","name":"SpannerSchemaMetadata","filePath":"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerSchemaMetadata.ts","qualifiedName":"@proteinjs/db-driver-spanner/SpannerSchemaMetadata","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[{"name":"tableExists","returnType":{"packageName":"","name":"Promise<boolean>","filePath":null,"qualifiedName":"/Promise<boolean>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"getColumnMetadata","returnType":{"packageName":"","name":"Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>","filePath":null,"qualifiedName":"/Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"getPrimaryKey","returnType":{"packageName":"","name":"Promise<string[]>","filePath":null,"qualifiedName":"/Promise<string[]>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"getForeignKeys","returnType":{"packageName":"","name":"Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>","filePath":null,"qualifiedName":"/Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"getUniqueColumns","returnType":{"packageName":"","name":"Promise<string[]>","filePath":null,"qualifiedName":"/Promise<string[]>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"getIndexes","returnType":{"packageName":"","name":"Promise<{ [keyName: string]: string[] }>","filePath":null,"qualifiedName":"/Promise<{ [keyName: string]: string[] }>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"SchemaMetadata","filePath":null,"qualifiedName":"@proteinjs/db/SchemaMetadata","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/db/SchemaMetadata"},{"v":"@proteinjs/db-driver-spanner/SpannerSchemaOperations","value":{"packageName":"@proteinjs/db-driver-spanner","name":"SpannerSchemaOperations","filePath":"/home/runner/work/db/db/packages/drivers/spanner/src/SpannerSchemaOperations.ts","qualifiedName":"@proteinjs/db-driver-spanner/SpannerSchemaOperations","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"},{"name":"spannerDriver","type":{"packageName":"@proteinjs/db-driver-spanner","name":"SpannerDriver","filePath":null,"qualifiedName":"@proteinjs/db-driver-spanner/SpannerDriver","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"}],"methods":[{"name":"createTable","returnType":null,"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}}]},{"name":"alterTable","returnType":null,"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"table","type":{"packageName":"","name":"Table<any>","filePath":null,"qualifiedName":"/Table<any>","typeParameters":null,"directParents":null}},{"name":"tableChanges","type":{"packageName":"@proteinjs/db","name":"TableChanges","filePath":null,"qualifiedName":"@proteinjs/db/TableChanges","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"SchemaOperations","filePath":null,"qualifiedName":"@proteinjs/db/SchemaOperations","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/SchemaOperations"}],"edges":[{"v":"@proteinjs/db-driver-spanner/SpannerDriver","w":"@proteinjs/db/DbDriver","value":"implements interface"},{"v":"@proteinjs/db-driver-spanner/SpannerSchemaMetadata","w":"@proteinjs/db/SchemaMetadata","value":"extends class"},{"v":"@proteinjs/db-driver-spanner/SpannerSchemaOperations","w":"@proteinjs/db/SchemaOperations","value":"implements interface"}]}';
|
|
15
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"SPANNER\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_INSTANCE\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"SPANNER_DB\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getSpanner\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Spanner\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Spanner\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerInstance\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Instance\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Instance\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getSpannerDb\",\"returnType\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Database\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Database\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getColumnType\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"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\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<any[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<any[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"\",\"name\":\"Database | Transaction\",\"filePath\":null,\"qualifiedName\":\"/Database | Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"executeDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"runner\",\"type\":{\"packageName\":\"@google-cloud/spanner\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/spanner/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runUpdateSchema\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaMetadata\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerSchemaMetadata.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"tableExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getColumnMetadata\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { type: string; isNullable: boolean } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getPrimaryKey\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getForeignKeys\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [columnName: string]: { referencedTableName: string; referencedColumnName: string } }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getUniqueColumns\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getIndexes\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<{ [keyName: string]: string[] }>\",\"filePath\":null,\"qualifiedName\":\"/Promise<{ [keyName: string]: string[] }>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaMetadata\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaMetadata\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaMetadata\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerSchemaOperations\",\"filePath\":\"/Users/brentbahry/repos/n3xa/packages/proteinjs/packages/db/packages/drivers/spanner/src/SpannerSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"spannerDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-spanner\",\"name\":\"SpannerDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-spanner/SpannerDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaMetadata\",\"w\":\"@proteinjs/db/SchemaMetadata\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/db-driver-spanner/SpannerSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
|
|
16
|
+
|
|
16
17
|
|
|
17
18
|
/** Generate Source Links */
|
|
18
19
|
|
|
@@ -21,14 +22,16 @@ import { SpannerSchemaMetadata } from '../src/SpannerSchemaMetadata';
|
|
|
21
22
|
import { SpannerSchemaOperations } from '../src/SpannerSchemaOperations';
|
|
22
23
|
|
|
23
24
|
const sourceLinks = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
'@proteinjs/db-driver-spanner/SpannerDriver': SpannerDriver,
|
|
26
|
+
'@proteinjs/db-driver-spanner/SpannerSchemaMetadata': SpannerSchemaMetadata,
|
|
27
|
+
'@proteinjs/db-driver-spanner/SpannerSchemaOperations': SpannerSchemaOperations,
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
|
|
29
31
|
/** Load Source Graph and Links */
|
|
30
32
|
|
|
31
33
|
import { SourceRepository } from '@proteinjs/reflection';
|
|
32
34
|
SourceRepository.merge(sourceGraph, sourceLinks);
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
|
|
37
|
+
export * from '../index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-driver-spanner",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.15",
|
|
4
4
|
"description": "Db driver for Google Spanner",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@google-cloud/spanner": "7.5.0",
|
|
26
|
-
"@proteinjs/db": "^1.18.
|
|
27
|
-
"@proteinjs/db-query": "^1.3.
|
|
28
|
-
"@proteinjs/db-spanner-common": "^1.1.
|
|
29
|
-
"@proteinjs/db-transaction-context": "^0.2.
|
|
30
|
-
"@proteinjs/logger": "1.0.
|
|
26
|
+
"@proteinjs/db": "^1.18.2",
|
|
27
|
+
"@proteinjs/db-query": "^1.3.2",
|
|
28
|
+
"@proteinjs/db-spanner-common": "^1.1.15",
|
|
29
|
+
"@proteinjs/db-transaction-context": "^0.2.15",
|
|
30
|
+
"@proteinjs/logger": "1.0.11",
|
|
31
31
|
"@proteinjs/reflection": "1.1.10",
|
|
32
32
|
"@proteinjs/util": "1.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@proteinjs/reflection-build": "1.2.
|
|
35
|
+
"@proteinjs/reflection-build": "1.2.1",
|
|
36
36
|
"@types/jest": "29.5.5",
|
|
37
37
|
"@types/node": "14.0.27",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
@@ -45,6 +45,5 @@
|
|
|
45
45
|
"typescript": "5.2.2"
|
|
46
46
|
},
|
|
47
47
|
"main": "./dist/generated/index.js",
|
|
48
|
-
"types": "./dist/generated/index.d.ts"
|
|
49
|
-
"gitHead": "79604ea89282b44ce8365dda60110a922902a24a"
|
|
48
|
+
"types": "./dist/generated/index.d.ts"
|
|
50
49
|
}
|
package/src/SpannerDriver.ts
CHANGED
|
@@ -148,6 +148,8 @@ export class SpannerDriver implements DbDriver {
|
|
|
148
148
|
handleCaseSensitivity: this.handleCaseSensitivity.bind(this),
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
+
const startTime = process.hrtime.bigint();
|
|
152
|
+
|
|
151
153
|
try {
|
|
152
154
|
this.logger.debug({ message: `Executing query`, obj: { sql, params: namedParams } });
|
|
153
155
|
const [rows] = await runner.run({
|
|
@@ -155,11 +157,17 @@ export class SpannerDriver implements DbDriver {
|
|
|
155
157
|
params: namedParams?.params,
|
|
156
158
|
types: namedParams?.types,
|
|
157
159
|
});
|
|
160
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
161
|
+
this.logger.debug({
|
|
162
|
+
message: `Query executed`,
|
|
163
|
+
obj: { sql, durationMs, rowCount: rows.length },
|
|
164
|
+
});
|
|
158
165
|
return rows.map((row) => row.toJSON());
|
|
159
166
|
} catch (error: any) {
|
|
167
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
160
168
|
this.logger.error({
|
|
161
169
|
message: `Failed when executing query`,
|
|
162
|
-
obj: { sql, params: namedParams, errorDetails: error.details },
|
|
170
|
+
obj: { sql, params: namedParams, errorDetails: error.details, durationMs },
|
|
163
171
|
});
|
|
164
172
|
throw error;
|
|
165
173
|
}
|
|
@@ -196,6 +204,8 @@ export class SpannerDriver implements DbDriver {
|
|
|
196
204
|
getDriverColumnType: this.getColumnType.bind(this),
|
|
197
205
|
});
|
|
198
206
|
|
|
207
|
+
const startTime = process.hrtime.bigint();
|
|
208
|
+
|
|
199
209
|
try {
|
|
200
210
|
this.logger.debug({ message: `Executing dml`, obj: { sql, params: namedParams } });
|
|
201
211
|
const [rowCount] = await runner.runUpdate({
|
|
@@ -203,11 +213,17 @@ export class SpannerDriver implements DbDriver {
|
|
|
203
213
|
params: namedParams?.params,
|
|
204
214
|
types: namedParams?.types,
|
|
205
215
|
});
|
|
216
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
217
|
+
this.logger.debug({
|
|
218
|
+
message: `Dml executed`,
|
|
219
|
+
obj: { sql, durationMs, rowCount },
|
|
220
|
+
});
|
|
206
221
|
return rowCount;
|
|
207
222
|
} catch (error: any) {
|
|
223
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
208
224
|
this.logger.error({
|
|
209
225
|
message: `Failed when executing dml`,
|
|
210
|
-
obj: { sql, params: namedParams, errorDetails: error.details },
|
|
226
|
+
obj: { sql, params: namedParams, errorDetails: error.details, durationMs },
|
|
211
227
|
});
|
|
212
228
|
throw error;
|
|
213
229
|
}
|
|
@@ -230,12 +246,19 @@ export class SpannerDriver implements DbDriver {
|
|
|
230
246
|
* Execute a schema write operation.
|
|
231
247
|
*/
|
|
232
248
|
async runUpdateSchema(sql: string): Promise<void> {
|
|
249
|
+
const startTime = process.hrtime.bigint();
|
|
233
250
|
try {
|
|
234
251
|
this.logger.debug({ message: `Executing schema update`, obj: { sql } });
|
|
235
252
|
const [operation] = await this.getSpannerDb().updateSchema(sql);
|
|
236
253
|
await operation.promise();
|
|
254
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
255
|
+
this.logger.debug({ message: `Schema update executed`, obj: { sql, durationMs } });
|
|
237
256
|
} catch (error: any) {
|
|
238
|
-
|
|
257
|
+
const durationMs = Number(process.hrtime.bigint() - startTime) / 1_000_000;
|
|
258
|
+
this.logger.error({
|
|
259
|
+
message: `Failed when executing schema update`,
|
|
260
|
+
obj: { sql, errorDetails: error.details, durationMs },
|
|
261
|
+
});
|
|
239
262
|
throw error;
|
|
240
263
|
}
|
|
241
264
|
}
|
|
@@ -16,9 +16,9 @@ export class SpannerSchemaOperations implements SchemaOperations {
|
|
|
16
16
|
constructor(private spannerDriver: SpannerDriver) {}
|
|
17
17
|
|
|
18
18
|
async createTable(table: Table<any>) {
|
|
19
|
-
const indexes: { name?: string; columns: string
|
|
20
|
-
for (const
|
|
21
|
-
indexes.push({ name
|
|
19
|
+
const indexes: { name?: string; columns: string[]; unique?: boolean }[] = [];
|
|
20
|
+
for (const { name, columns } of table.indexes) {
|
|
21
|
+
indexes.push({ name, columns: columns.map((x) => table.columns[x as string]!.name) });
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const serializedColumns: { name: string; type: string; nullable?: boolean }[] = [];
|
|
@@ -29,7 +29,11 @@ export class SpannerSchemaOperations implements SchemaOperations {
|
|
|
29
29
|
serializedColumns.push({ name: column.name, type: columnType, nullable: column.options?.nullable });
|
|
30
30
|
this.logger.info({ message: `[${table.name}] Creating column: ${column.name} (${column.constructor.name})` });
|
|
31
31
|
if (column.options?.unique?.unique) {
|
|
32
|
-
indexes.push({
|
|
32
|
+
indexes.push({
|
|
33
|
+
name: column.options.unique.indexName,
|
|
34
|
+
columns: [table.columns[column.name]!.name],
|
|
35
|
+
unique: true,
|
|
36
|
+
});
|
|
33
37
|
this.logger.info({ message: `[${table.name}.${column.name}] Adding unique constraint` });
|
|
34
38
|
}
|
|
35
39
|
|
|
@@ -47,11 +51,11 @@ export class SpannerSchemaOperations implements SchemaOperations {
|
|
|
47
51
|
const createIndexSql = new StatementFactory().createIndex(index, table.name).sql;
|
|
48
52
|
const indexName = StatementUtil.getIndexName(table.name, index);
|
|
49
53
|
this.logger.info({
|
|
50
|
-
message: `[${table.name}] Creating index: ${indexName} (${
|
|
54
|
+
message: `[${table.name}] Creating index: ${indexName} (${index.columns.join(', ')})`,
|
|
51
55
|
});
|
|
52
56
|
await this.spannerDriver.runUpdateSchema(createIndexSql);
|
|
53
57
|
this.logger.info({
|
|
54
|
-
message: `[${table.name}] Created index: ${indexName} (${
|
|
58
|
+
message: `[${table.name}] Created index: ${indexName} (${index.columns.join(', ')})`,
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
61
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Brent Bahry
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|