@proteinjs/db 1.0.2
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 +16 -0
- package/LICENSE +21 -0
- package/dist/generated/index.d.ts +11 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +59 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Columns.d.ts +100 -0
- package/dist/src/Columns.d.ts.map +1 -0
- package/dist/src/Columns.js +381 -0
- package/dist/src/Columns.js.map +1 -0
- package/dist/src/Db.d.ts +46 -0
- package/dist/src/Db.d.ts.map +1 -0
- package/dist/src/Db.js +393 -0
- package/dist/src/Db.js.map +1 -0
- package/dist/src/MigrationRunner.d.ts +10 -0
- package/dist/src/MigrationRunner.d.ts.map +1 -0
- package/dist/src/MigrationRunner.js +124 -0
- package/dist/src/MigrationRunner.js.map +1 -0
- package/dist/src/QueryBuilderFactory.d.ts +8 -0
- package/dist/src/QueryBuilderFactory.d.ts.map +1 -0
- package/dist/src/QueryBuilderFactory.js +21 -0
- package/dist/src/QueryBuilderFactory.js.map +1 -0
- package/dist/src/Record.d.ts +38 -0
- package/dist/src/Record.d.ts.map +1 -0
- package/dist/src/Record.js +209 -0
- package/dist/src/Record.js.map +1 -0
- package/dist/src/RecordIterator.d.ts +13 -0
- package/dist/src/RecordIterator.d.ts.map +1 -0
- package/dist/src/RecordIterator.js +98 -0
- package/dist/src/RecordIterator.js.map +1 -0
- package/dist/src/StatementConfigFactory.d.ts +11 -0
- package/dist/src/StatementConfigFactory.d.ts.map +1 -0
- package/dist/src/StatementConfigFactory.js +31 -0
- package/dist/src/StatementConfigFactory.js.map +1 -0
- package/dist/src/Table.d.ts +98 -0
- package/dist/src/Table.d.ts.map +1 -0
- package/dist/src/Table.js +56 -0
- package/dist/src/Table.js.map +1 -0
- package/dist/src/auth/TableAuth.d.ts +29 -0
- package/dist/src/auth/TableAuth.d.ts.map +1 -0
- package/dist/src/auth/TableAuth.js +45 -0
- package/dist/src/auth/TableAuth.js.map +1 -0
- package/dist/src/auth/TableServiceAuth.d.ts +5 -0
- package/dist/src/auth/TableServiceAuth.d.ts.map +1 -0
- package/dist/src/auth/TableServiceAuth.js +37 -0
- package/dist/src/auth/TableServiceAuth.js.map +1 -0
- package/dist/src/opt/moment.d.ts +4 -0
- package/dist/src/opt/moment.d.ts.map +1 -0
- package/dist/src/opt/moment.js +9 -0
- package/dist/src/opt/moment.js.map +1 -0
- package/dist/src/reference/Reference.d.ts +26 -0
- package/dist/src/reference/Reference.d.ts.map +1 -0
- package/dist/src/reference/Reference.js +90 -0
- package/dist/src/reference/Reference.js.map +1 -0
- package/dist/src/reference/ReferenceArray.d.ts +29 -0
- package/dist/src/reference/ReferenceArray.d.ts.map +1 -0
- package/dist/src/reference/ReferenceArray.js +101 -0
- package/dist/src/reference/ReferenceArray.js.map +1 -0
- package/dist/src/schema/SchemaMetadata.d.ts +27 -0
- package/dist/src/schema/SchemaMetadata.d.ts.map +1 -0
- package/dist/src/schema/SchemaMetadata.js +227 -0
- package/dist/src/schema/SchemaMetadata.js.map +1 -0
- package/dist/src/schema/SchemaOperations.d.ts +40 -0
- package/dist/src/schema/SchemaOperations.d.ts.map +1 -0
- package/dist/src/schema/SchemaOperations.js +3 -0
- package/dist/src/schema/SchemaOperations.js.map +1 -0
- package/dist/src/schema/TableManager.d.ts +21 -0
- package/dist/src/schema/TableManager.d.ts.map +1 -0
- package/dist/src/schema/TableManager.js +254 -0
- package/dist/src/schema/TableManager.js.map +1 -0
- package/dist/src/serializers/GraphSerializer.d.ts +13 -0
- package/dist/src/serializers/GraphSerializer.d.ts.map +1 -0
- package/dist/src/serializers/GraphSerializer.js +21 -0
- package/dist/src/serializers/GraphSerializer.js.map +1 -0
- package/dist/src/serializers/QueryBuilderSerializer.d.ts +19 -0
- package/dist/src/serializers/QueryBuilderSerializer.d.ts.map +1 -0
- package/dist/src/serializers/QueryBuilderSerializer.js +32 -0
- package/dist/src/serializers/QueryBuilderSerializer.js.map +1 -0
- package/dist/src/serializers/ReferenceArraySerializer.d.ts +15 -0
- package/dist/src/serializers/ReferenceArraySerializer.d.ts.map +1 -0
- package/dist/src/serializers/ReferenceArraySerializer.js +23 -0
- package/dist/src/serializers/ReferenceArraySerializer.js.map +1 -0
- package/dist/src/serializers/ReferenceSerializer.d.ts +15 -0
- package/dist/src/serializers/ReferenceSerializer.d.ts.map +1 -0
- package/dist/src/serializers/ReferenceSerializer.js +23 -0
- package/dist/src/serializers/ReferenceSerializer.js.map +1 -0
- package/dist/src/serializers/TableSerializer.d.ts +13 -0
- package/dist/src/serializers/TableSerializer.d.ts.map +1 -0
- package/dist/src/serializers/TableSerializer.js +19 -0
- package/dist/src/serializers/TableSerializer.js.map +1 -0
- package/dist/src/services/DbService.d.ts +19 -0
- package/dist/src/services/DbService.d.ts.map +1 -0
- package/dist/src/services/DbService.js +6 -0
- package/dist/src/services/DbService.js.map +1 -0
- package/dist/src/services/MigrationRunnerService.d.ts +6 -0
- package/dist/src/services/MigrationRunnerService.d.ts.map +1 -0
- package/dist/src/services/MigrationRunnerService.js +6 -0
- package/dist/src/services/MigrationRunnerService.js.map +1 -0
- package/dist/src/source/SourceRecord.d.ts +44 -0
- package/dist/src/source/SourceRecord.d.ts.map +1 -0
- package/dist/src/source/SourceRecord.js +49 -0
- package/dist/src/source/SourceRecord.js.map +1 -0
- package/dist/src/source/SourceRecordLoader.d.ts +6 -0
- package/dist/src/source/SourceRecordLoader.d.ts.map +1 -0
- package/dist/src/source/SourceRecordLoader.js +156 -0
- package/dist/src/source/SourceRecordLoader.js.map +1 -0
- package/dist/src/source/SourceRecordRepo.d.ts +8 -0
- package/dist/src/source/SourceRecordRepo.d.ts.map +1 -0
- package/dist/src/source/SourceRecordRepo.js +20 -0
- package/dist/src/source/SourceRecordRepo.js.map +1 -0
- package/dist/src/tables/MigrationTable.d.ts +41 -0
- package/dist/src/tables/MigrationTable.d.ts.map +1 -0
- package/dist/src/tables/MigrationTable.js +86 -0
- package/dist/src/tables/MigrationTable.js.map +1 -0
- package/dist/src/tables/tables.d.ts +6 -0
- package/dist/src/tables/tables.d.ts.map +1 -0
- package/dist/src/tables/tables.js +8 -0
- package/dist/src/tables/tables.js.map +1 -0
- package/dist/test/CrudTests.d.ts +20 -0
- package/dist/test/CrudTests.d.ts.map +1 -0
- package/dist/test/CrudTests.js +251 -0
- package/dist/test/CrudTests.js.map +1 -0
- package/dist/test/TableManagerTests.d.ts +8 -0
- package/dist/test/TableManagerTests.d.ts.map +1 -0
- package/dist/test/TableManagerTests.js +687 -0
- package/dist/test/TableManagerTests.js.map +1 -0
- package/generated/index.ts +55 -0
- package/index.ts +25 -0
- package/jest.config.js +18 -0
- package/package.json +45 -0
- package/src/Columns.ts +257 -0
- package/src/Db.ts +195 -0
- package/src/MigrationRunner.ts +62 -0
- package/src/QueryBuilderFactory.ts +18 -0
- package/src/Record.ts +113 -0
- package/src/RecordIterator.ts +44 -0
- package/src/StatementConfigFactory.ts +36 -0
- package/src/Table.ts +124 -0
- package/src/auth/TableAuth.ts +60 -0
- package/src/auth/TableServiceAuth.ts +32 -0
- package/src/opt/moment.ts +4 -0
- package/src/reference/Reference.ts +45 -0
- package/src/reference/ReferenceArray.ts +56 -0
- package/src/schema/SchemaMetadata.ts +115 -0
- package/src/schema/SchemaOperations.ts +44 -0
- package/src/schema/TableManager.ts +198 -0
- package/src/serializers/GraphSerializer.ts +22 -0
- package/src/serializers/QueryBuilderSerializer.ts +39 -0
- package/src/serializers/ReferenceArraySerializer.ts +26 -0
- package/src/serializers/ReferenceSerializer.ts +26 -0
- package/src/serializers/TableSerializer.ts +20 -0
- package/src/services/DbService.ts +19 -0
- package/src/services/MigrationRunnerService.ts +7 -0
- package/src/source/SourceRecord.ts +75 -0
- package/src/source/SourceRecordLoader.ts +68 -0
- package/src/source/SourceRecordRepo.ts +17 -0
- package/src/tables/MigrationTable.ts +36 -0
- package/src/tables/tables.ts +6 -0
- package/test/CrudTests.ts +110 -0
- package/test/TableManagerTests.ts +382 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableManagerTests.js","sourceRoot":"","sources":["../../test/TableManagerTests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA2K;AAE3K,wCAAyD;AACzD,sCAA4C;AAM3C,CAAC;AAEF;IAAwB,6BAAW;IAAnC;QAAA,qEAWC;QAVA,UAAI,GAAG,cAAc,CAAC;QACtB,aAAO,GAAG,IAAA,0BAAiB,EAAO;YACjC,IAAI,EAAE,IAAI,sBAAY,CAAC,MAAM,CAAC;YAC5B,KAAK,EAAE,IAAI,sBAAY,CAAC,OAAO,CAAC;YAClC,MAAM,EAAE,IAAI,uBAAa,CAAC,QAAQ,CAAC;SACnC,CAAC,CAAC;QACH,aAAO,GAAG;YACT,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,CAAC,OAAO,CAAmB,EAAE;YAC1E,EAAE,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAmB,EAAE;SAC3F,CAAA;;IACF,CAAC;IAAD,gBAAC;AAAD,CAAC,AAXD,CAAwB,aAAK,GAW5B;AAAA,CAAC;AAiBF;IAA+B,oCAAkB;IAAjD;QAAA,qEAgBC;QAfA,UAAI,GAAG,sBAAsB,CAAC;QAC9B,aAAO,GAAG,IAAA,0BAAiB,EAAc;YACxC,OAAO,EAAE,IAAI,uBAAa,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACzD,UAAU,EAAE,IAAI,uBAAa,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC;YACvE,MAAM,EAAE,IAAI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AAC;IACL,CAAC,CAAC;AACJ,CAAC,CAAA;AApUY,QAAA,iBAAiB,qBAoU7B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Load Dependency Source Graphs */
|
|
2
|
+
|
|
3
|
+
import '@proteinjs/db-query';
|
|
4
|
+
import '@proteinjs/reflection';
|
|
5
|
+
import '@proteinjs/serializer';
|
|
6
|
+
import '@proteinjs/service';
|
|
7
|
+
import '@proteinjs/user-auth';
|
|
8
|
+
import '@proteinjs/util';
|
|
9
|
+
import 'moment';
|
|
10
|
+
import 'uuid';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/** Generate Source Graph */
|
|
14
|
+
|
|
15
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db/DbDriverStatementConfig\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriverStatementConfig\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/Db.ts\",\"qualifiedName\":\"@proteinjs/db/DbDriverStatementConfig\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db-query\",\"name\":\"ParameterizationConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-query/ParameterizationConfig\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/db\",\"name\":\"{ prefixTablesWithDb?: boolean }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/{ prefixTablesWithDb?: boolean }\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/db-query/ParameterizationConfig\"},{\"v\":\"@proteinjs/db/DbDriver\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/Db.ts\",\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[{\"name\":\"getDbName\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"start\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":true,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"stop\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":true,\"isAbstract\":true,\"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\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"runQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SerializedRecord[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SerializedRecord[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db/Db\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Db\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/Db.ts\",\"qualifiedName\":\"@proteinjs/db/Db\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"globalDbDriver\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"dbDriver\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"statementConfigFactory\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"StatementConfigFactory\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/StatementConfigFactory\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"auth\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"serviceMetadata\",\"type\":{\"packageName\":\"\",\"name\":\"Service['serviceMetadata']\",\"filePath\":null,\"qualifiedName\":\"/Service['serviceMetadata']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"ignoreAuth\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"getGlobalDbDriver\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"init\",\"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\":\"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<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"get\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"insert\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"Omit<T, keyof R>\",\"filePath\":null,\"qualifiedName\":\"/Omit<T, keyof R>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"addDefaultFieldValues\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"update\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"Partial<T>\",\"filePath\":null,\"qualifiedName\":\"/Partial<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"addUpdateFieldValues\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"delete\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"beforeDelete\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"recordsToDelete\",\"type\":{\"packageName\":\"\",\"name\":\"Record[]\",\"filePath\":null,\"qualifiedName\":\"/Record[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"cascadeDeletions\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"deletedRecordIds\",\"type\":{\"packageName\":\"\",\"name\":\"string[]\",\"filePath\":null,\"qualifiedName\":\"/string[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"query\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getRowCount\",\"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\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"addColumnQueries\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/R extends Record = Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbService\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/R\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbService\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbService\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/services/DbService.ts\",\"qualifiedName\":\"@proteinjs/db/DbService\",\"properties\":[],\"methods\":[{\"name\":\"tableExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"get\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"insert\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"Omit<T, keyof R>\",\"filePath\":null,\"qualifiedName\":\"/Omit<T, keyof R>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"update\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"Partial<T>\",\"filePath\":null,\"qualifiedName\":\"/Partial<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"delete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"query\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getRowCount\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/R extends Record = Record\"],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/MigrationRunner\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"MigrationRunner\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/MigrationRunner.ts\",\"qualifiedName\":\"@proteinjs/db/MigrationRunner\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"serviceMetadata\",\"type\":{\"packageName\":\"\",\"name\":\"Service['serviceMetadata']\",\"filePath\":null,\"qualifiedName\":\"/Service['serviceMetadata']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"runMigration\",\"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\":\"id\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"duration\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"start\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Moment\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Moment\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"end\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Moment\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Moment\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"MigrationRunnerService\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/MigrationRunnerService\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/MigrationRunnerService\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"MigrationRunnerService\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/services/MigrationRunnerService.ts\",\"qualifiedName\":\"@proteinjs/db/MigrationRunnerService\",\"properties\":[],\"methods\":[{\"name\":\"runMigration\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"id\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/service\",\"name\":\"Service\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/service/Service\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"/AsyncIterable\"},{\"v\":\"@proteinjs/db/Table\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/Table.ts\",\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"__serializerId\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":{\"packageName\":\"\",\"name\":\"Columns<T>\",\"filePath\":null,\"qualifiedName\":\"/Columns<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"indexes\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"{ columns: (keyof T)[], name?: string }[]\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/{ columns: (keyof T)[], name?: string }[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"cascadeDeleteReferences\",\"type\":{\"packageName\":\"\",\"name\":\"() => { table: string, referenceColumn: string }[]\",\"filePath\":null,\"qualifiedName\":\"/() => { table: string, referenceColumn: string }[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"sourceRecordOptions\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SourceRecordOptions\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SourceRecordOptions\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"{\\n\\t\\tdb?: TableOperationsAuth,\\n\\t\\tservice?: TableOperationsAuth,\\n\\t\\tui?: {\\n\\t\\t\\trecordTable?: Identity,\\n\\t\\t\\trecordForm?: Identity,\\n\\t\\t},\\n\\t}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/{\\n\\t\\tdb?: TableOperationsAuth,\\n\\t\\tservice?: TableOperationsAuth,\\n\\t\\tui?: {\\n\\t\\t\\trecordTable?: Identity,\\n\\t\\t\\trecordForm?: Identity,\\n\\t\\t},\\n\\t}\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]},{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializableObject\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializableObject\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/serializer/CustomSerializableObject\"},{\"v\":\"/'public'|'authenticated'|string[]\"},{\"v\":\"@proteinjs/db/Reference\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Reference\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/reference/Reference.ts\",\"qualifiedName\":\"@proteinjs/db/Reference\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"__serializerId\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_table\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_id\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_object\",\"type\":{\"packageName\":\"\",\"name\":\"T\",\"filePath\":null,\"qualifiedName\":\"/T\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"fromObject\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"object\",\"type\":{\"packageName\":\"\",\"name\":\"T|(Partial<T> & { id: string })\",\"filePath\":null,\"qualifiedName\":\"/T|(Partial<T> & { id: string })\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"get\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T|undefined>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T|undefined>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"set\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"object\",\"type\":{\"packageName\":\"\",\"name\":\"T\",\"filePath\":null,\"qualifiedName\":\"/T\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializableObject\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializableObject\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/ReferenceArray\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"ReferenceArray\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/reference/ReferenceArray.ts\",\"qualifiedName\":\"@proteinjs/db/ReferenceArray\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"__serializerId\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_table\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_ids\",\"type\":{\"packageName\":\"\",\"name\":\"string[]\",\"filePath\":null,\"qualifiedName\":\"/string[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"_objects\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"fromObjects\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"objects\",\"type\":{\"packageName\":\"\",\"name\":\"(T|(Partial<T> & { id: string }))[]\",\"filePath\":null,\"qualifiedName\":\"/(T|(Partial<T> & { id: string }))[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"get\",\"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\":\"set\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"objects\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializableObject\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializableObject\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/GraphSerializer\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"GraphSerializer\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/serializers/GraphSerializer.ts\",\"qualifiedName\":\"@proteinjs/db/GraphSerializer\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"id\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"matches\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"obj\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedGraph\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedGraph\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"graph\",\"type\":{\"packageName\":\"@proteinjs/util\",\"name\":\"Graph\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/util/Graph\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"@proteinjs/util\",\"name\":\"Graph\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/util/Graph\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedGraph\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedGraph\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedGraph\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"ThirdPartyLibCustomSerializer\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/ThirdPartyLibCustomSerializer\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/serializer/ThirdPartyLibCustomSerializer\"},{\"v\":\"@proteinjs/db/QueryBuilderSerializer\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"QueryBuilderSerializer\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/serializers/QueryBuilderSerializer.ts\",\"qualifiedName\":\"@proteinjs/db/QueryBuilderSerializer\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"id\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedQueryBuilder\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedQueryBuilder\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<any>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"QueryBuilder<any>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedQb\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedQueryBuilder\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedQueryBuilder\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializer\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializer\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/serializer/CustomSerializer\"},{\"v\":\"@proteinjs/db/ReferenceArraySerializer\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"ReferenceArraySerializer\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/serializers/ReferenceArraySerializer.ts\",\"qualifiedName\":\"@proteinjs/db/ReferenceArraySerializer\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"id\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedReferenceArray\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedReferenceArray\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"referenceArray\",\"type\":{\"packageName\":\"\",\"name\":\"ReferenceArray<any>\",\"filePath\":null,\"qualifiedName\":\"/ReferenceArray<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"ReferenceArray<any>\",\"filePath\":null,\"qualifiedName\":\"/ReferenceArray<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedReferenceArray\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedReferenceArray\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedReferenceArray\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializer\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializer\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/ReferenceSerializer\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"ReferenceSerializer\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/serializers/ReferenceSerializer.ts\",\"qualifiedName\":\"@proteinjs/db/ReferenceSerializer\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"id\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedReference\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedReference\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"reference\",\"type\":{\"packageName\":\"\",\"name\":\"Reference<any>\",\"filePath\":null,\"qualifiedName\":\"/Reference<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Reference<any>\",\"filePath\":null,\"qualifiedName\":\"/Reference<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedReference\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedReference\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedReference\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializer\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializer\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableSerializer\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableSerializer\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/serializers/TableSerializer.ts\",\"qualifiedName\":\"@proteinjs/db/TableSerializer\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"id\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"serialize\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedTable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedTable\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"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\":\"deserialize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"serializedTable\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SerializedTable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SerializedTable\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/serializer\",\"name\":\"CustomSerializer\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/serializer/CustomSerializer\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"/Partial\"},{\"v\":\"@proteinjs/service/Service\"},{\"v\":\"/DbRecord\"},{\"v\":\"@proteinjs/db/SourceRecordLoader\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"SourceRecordLoader\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/source/SourceRecordLoader.ts\",\"qualifiedName\":\"@proteinjs/db/SourceRecordLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"load\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getSourceRecordsMap\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/MigrationTable\",\"value\":{\"packageName\":\"@proteinjs/db\",\"name\":\"MigrationTable\",\"filePath\":\"/home/runner/work/db/db/packages/db/src/tables/MigrationTable.ts\",\"qualifiedName\":\"@proteinjs/db/MigrationTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"sourceRecordOptions\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/db/Migration\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/db/DbDriverStatementConfig\",\"w\":\"@proteinjs/db-query/ParameterizationConfig\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/db/DbDriver\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db/Db\",\"w\":\"@proteinjs/db/DbService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/MigrationRunner\",\"w\":\"@proteinjs/db/MigrationRunnerService\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/Table\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/Table\",\"w\":\"@proteinjs/serializer/CustomSerializableObject\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/Reference\",\"w\":\"@proteinjs/serializer/CustomSerializableObject\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/ReferenceArray\",\"w\":\"@proteinjs/serializer/CustomSerializableObject\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/GraphSerializer\",\"w\":\"@proteinjs/serializer/ThirdPartyLibCustomSerializer\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/QueryBuilderSerializer\",\"w\":\"@proteinjs/serializer/CustomSerializer\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/ReferenceArraySerializer\",\"w\":\"@proteinjs/serializer/CustomSerializer\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/ReferenceSerializer\",\"w\":\"@proteinjs/serializer/CustomSerializer\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/TableSerializer\",\"w\":\"@proteinjs/serializer/CustomSerializer\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db/DbService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db/MigrationRunnerService\",\"w\":\"@proteinjs/service/Service\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db/SourceRecordLoader\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db/MigrationTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/** Generate Source Links */
|
|
19
|
+
|
|
20
|
+
import { Db } from '../src/Db';
|
|
21
|
+
import { MigrationRunner } from '../src/MigrationRunner';
|
|
22
|
+
import { Table } from '../src/Table';
|
|
23
|
+
import { Reference } from '../src/reference/Reference';
|
|
24
|
+
import { ReferenceArray } from '../src/reference/ReferenceArray';
|
|
25
|
+
import { GraphSerializer } from '../src/serializers/GraphSerializer';
|
|
26
|
+
import { QueryBuilderSerializer } from '../src/serializers/QueryBuilderSerializer';
|
|
27
|
+
import { ReferenceArraySerializer } from '../src/serializers/ReferenceArraySerializer';
|
|
28
|
+
import { ReferenceSerializer } from '../src/serializers/ReferenceSerializer';
|
|
29
|
+
import { TableSerializer } from '../src/serializers/TableSerializer';
|
|
30
|
+
import { SourceRecordLoader } from '../src/source/SourceRecordLoader';
|
|
31
|
+
import { MigrationTable } from '../src/tables/MigrationTable';
|
|
32
|
+
|
|
33
|
+
const sourceLinks = {
|
|
34
|
+
'@proteinjs/db/Db': Db,
|
|
35
|
+
'@proteinjs/db/MigrationRunner': MigrationRunner,
|
|
36
|
+
'@proteinjs/db/Table': Table,
|
|
37
|
+
'@proteinjs/db/Reference': Reference,
|
|
38
|
+
'@proteinjs/db/ReferenceArray': ReferenceArray,
|
|
39
|
+
'@proteinjs/db/GraphSerializer': GraphSerializer,
|
|
40
|
+
'@proteinjs/db/QueryBuilderSerializer': QueryBuilderSerializer,
|
|
41
|
+
'@proteinjs/db/ReferenceArraySerializer': ReferenceArraySerializer,
|
|
42
|
+
'@proteinjs/db/ReferenceSerializer': ReferenceSerializer,
|
|
43
|
+
'@proteinjs/db/TableSerializer': TableSerializer,
|
|
44
|
+
'@proteinjs/db/SourceRecordLoader': SourceRecordLoader,
|
|
45
|
+
'@proteinjs/db/MigrationTable': MigrationTable,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/** Load Source Graph and Links */
|
|
50
|
+
|
|
51
|
+
import { SourceRepository } from '@proteinjs/reflection';
|
|
52
|
+
SourceRepository.merge(sourceGraph, sourceLinks);
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
export * from '../index';
|
package/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './src/Db';
|
|
2
|
+
export * from './src/Table';
|
|
3
|
+
export * from './src/auth/TableAuth';
|
|
4
|
+
export * from './src/Columns';
|
|
5
|
+
export * from './src/Record';
|
|
6
|
+
export * from './src/reference/ReferenceArray';
|
|
7
|
+
export * from './src/reference/Reference';
|
|
8
|
+
export * from './src/RecordIterator';
|
|
9
|
+
export * from './src/source/SourceRecord';
|
|
10
|
+
export * from './src/QueryBuilderFactory';
|
|
11
|
+
|
|
12
|
+
export * from './src/schema/SchemaOperations';
|
|
13
|
+
export * from './src/schema/SchemaMetadata';
|
|
14
|
+
export * from './src/schema/TableManager';
|
|
15
|
+
|
|
16
|
+
export * from './src/tables/tables';
|
|
17
|
+
export * from './src/tables/MigrationTable';
|
|
18
|
+
|
|
19
|
+
export * from './src/services/DbService';
|
|
20
|
+
export * from './src/services/MigrationRunnerService';
|
|
21
|
+
|
|
22
|
+
export * from './test/TableManagerTests';
|
|
23
|
+
export * from './test/CrudTests';
|
|
24
|
+
|
|
25
|
+
export * from '@proteinjs/db-query';
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"roots": [
|
|
3
|
+
"<rootDir>/test"
|
|
4
|
+
],
|
|
5
|
+
"transform": {
|
|
6
|
+
"^.+\\.tsx?$": "ts-jest"
|
|
7
|
+
},
|
|
8
|
+
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
|
9
|
+
"moduleFileExtensions": [
|
|
10
|
+
"ts",
|
|
11
|
+
"tsx",
|
|
12
|
+
"js",
|
|
13
|
+
"jsx",
|
|
14
|
+
"json",
|
|
15
|
+
"node"
|
|
16
|
+
],
|
|
17
|
+
"testEnvironment": "node"
|
|
18
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proteinjs/db",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Db",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/proteinjs/db.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/@proteinjs/db/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/@proteinjs/db#readme",
|
|
16
|
+
"author": "Brent Bahry",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "rm -rf dist/ node_modules/ generated/ package-lock.json",
|
|
20
|
+
"build": "reflection-build && tsc",
|
|
21
|
+
"watch": "reflection-watch"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@proteinjs/db-query": "1.0.1",
|
|
25
|
+
"@proteinjs/reflection": "1.0.2",
|
|
26
|
+
"@proteinjs/serializer": "1.0.1",
|
|
27
|
+
"@proteinjs/service": "1.0.1",
|
|
28
|
+
"@proteinjs/user-auth": "1.0.1",
|
|
29
|
+
"@proteinjs/util": "1.0.18",
|
|
30
|
+
"moment": "2.29.4",
|
|
31
|
+
"uuid": "8.3.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@proteinjs/reflection-build": "1.0.5",
|
|
35
|
+
"@types/jest": "29.5.5",
|
|
36
|
+
"@types/node": "14.0.27",
|
|
37
|
+
"@types/uuid": "8.3.0",
|
|
38
|
+
"jest": "29.7.0",
|
|
39
|
+
"ts-jest": "29.1.1",
|
|
40
|
+
"typescript": "5.2.2"
|
|
41
|
+
},
|
|
42
|
+
"main": "./dist/generated/index.js",
|
|
43
|
+
"types": "./dist/generated/index.d.ts",
|
|
44
|
+
"gitHead": "6afc77658082cb53fa770a9b93ee44b369f9f67d"
|
|
45
|
+
}
|
package/src/Columns.ts
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
import { v1 as uuidv1 } from 'uuid';
|
|
3
|
+
import { Column, ColumnOptions, Table, tableByName } from './Table';
|
|
4
|
+
import { Record } from './Record';
|
|
5
|
+
import { ReferenceArray } from './reference/ReferenceArray';
|
|
6
|
+
import { Db } from './Db';
|
|
7
|
+
import { Reference } from './reference/Reference';
|
|
8
|
+
import { QueryBuilderFactory } from './QueryBuilderFactory';
|
|
9
|
+
|
|
10
|
+
export class IntegerColumn implements Column<number, number> {
|
|
11
|
+
constructor(
|
|
12
|
+
public name: string,
|
|
13
|
+
public options?: ColumnOptions,
|
|
14
|
+
public large = false
|
|
15
|
+
) {}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class StringColumn<T = string> implements Column<T, string> {
|
|
19
|
+
constructor(
|
|
20
|
+
public name: string,
|
|
21
|
+
public options?: ColumnOptions,
|
|
22
|
+
public maxLength: number|'MAX' = 255
|
|
23
|
+
) {}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class FloatColumn implements Column<number, number> {
|
|
27
|
+
constructor(
|
|
28
|
+
public name: string,
|
|
29
|
+
public options?: ColumnOptions
|
|
30
|
+
) {}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class DecimalColumn implements Column<number, number> {
|
|
34
|
+
constructor(
|
|
35
|
+
public name: string,
|
|
36
|
+
public options?: ColumnOptions,
|
|
37
|
+
public large = false
|
|
38
|
+
) {}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class BooleanColumn implements Column<boolean, boolean> {
|
|
42
|
+
constructor(
|
|
43
|
+
public name: string,
|
|
44
|
+
public options?: ColumnOptions
|
|
45
|
+
) {}
|
|
46
|
+
|
|
47
|
+
async serialize(fieldValue: boolean|undefined): Promise<boolean> {
|
|
48
|
+
if (fieldValue)
|
|
49
|
+
return true;
|
|
50
|
+
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async deserialize(serializedFieldValue: boolean): Promise<boolean> {
|
|
55
|
+
if (serializedFieldValue)
|
|
56
|
+
return true;
|
|
57
|
+
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export class DateColumn implements Column<Date, Date> {
|
|
63
|
+
constructor(
|
|
64
|
+
public name: string,
|
|
65
|
+
public options?: ColumnOptions
|
|
66
|
+
) {}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export class DateTimeColumn implements Column<moment.Moment, Date> {
|
|
70
|
+
constructor(
|
|
71
|
+
public name: string,
|
|
72
|
+
public options?: ColumnOptions
|
|
73
|
+
) {}
|
|
74
|
+
|
|
75
|
+
async serialize(fieldValue: moment.Moment|undefined): Promise<Date|undefined> {
|
|
76
|
+
if (typeof fieldValue === 'undefined')
|
|
77
|
+
return;
|
|
78
|
+
|
|
79
|
+
if (typeof fieldValue.toDate === 'undefined')
|
|
80
|
+
return moment(fieldValue).toDate();
|
|
81
|
+
|
|
82
|
+
return fieldValue.toDate();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async deserialize(serializedFieldValue: Date): Promise<moment.Moment> {
|
|
86
|
+
return moment(serializedFieldValue);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export class BinaryColumn implements Column<number, number> {
|
|
91
|
+
constructor(
|
|
92
|
+
public name: string,
|
|
93
|
+
public options?: ColumnOptions,
|
|
94
|
+
public maxLength?: number|'MAX',
|
|
95
|
+
) {}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export class UuidColumn extends StringColumn {
|
|
99
|
+
constructor(
|
|
100
|
+
name: string,
|
|
101
|
+
options?: ColumnOptions
|
|
102
|
+
) {
|
|
103
|
+
super(name, Object.assign({ defaultValue: async () => uuidv1().split('-').join('') }, options), 36);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export class PasswordColumn extends StringColumn {
|
|
108
|
+
constructor(
|
|
109
|
+
name: string,
|
|
110
|
+
options?: ColumnOptions
|
|
111
|
+
) {
|
|
112
|
+
super(name, Object.assign({ ui: { hidden: true } }, options));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export class ObjectColumn<T> extends StringColumn<T> {
|
|
117
|
+
constructor(
|
|
118
|
+
name: string,
|
|
119
|
+
options?: ColumnOptions
|
|
120
|
+
) {
|
|
121
|
+
super(name, options, 'MAX'); // MAX is 4gb
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async serialize(fieldValue: T|undefined): Promise<string|undefined> {
|
|
125
|
+
if (typeof fieldValue === 'undefined' || fieldValue == null)
|
|
126
|
+
return;
|
|
127
|
+
|
|
128
|
+
return JSON.stringify(fieldValue);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async deserialize(serializedFieldValue: string): Promise<T|undefined> {
|
|
132
|
+
if (typeof serializedFieldValue === 'undefined' || serializedFieldValue == null)
|
|
133
|
+
return;
|
|
134
|
+
|
|
135
|
+
return JSON.parse(serializedFieldValue);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export class ArrayColumn<T> extends ObjectColumn<T[]> {
|
|
140
|
+
constructor(
|
|
141
|
+
name: string,
|
|
142
|
+
options?: ColumnOptions
|
|
143
|
+
) {
|
|
144
|
+
super(name, options);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export class ReferenceArrayColumn<T extends Record> extends ObjectColumn<ReferenceArray<T>> {
|
|
149
|
+
/**
|
|
150
|
+
* A column that stores an array of references to other records.
|
|
151
|
+
*
|
|
152
|
+
* @param name name of column
|
|
153
|
+
* @param referenceTable name of table that the reference records are in
|
|
154
|
+
* @param cascadeDelete if true referenced records will be deleted when this record is deleted
|
|
155
|
+
* @param options generic column options
|
|
156
|
+
*/
|
|
157
|
+
constructor(
|
|
158
|
+
name: string,
|
|
159
|
+
public referenceTable: string,
|
|
160
|
+
public cascadeDelete: boolean,
|
|
161
|
+
options?: ColumnOptions
|
|
162
|
+
) {
|
|
163
|
+
super(name, options);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async serialize(fieldValue: ReferenceArray<T>|undefined): Promise<string|undefined> {
|
|
167
|
+
if (typeof fieldValue === 'undefined')
|
|
168
|
+
return;
|
|
169
|
+
|
|
170
|
+
const ids = (await fieldValue.get()).map(record => record.id);
|
|
171
|
+
return await super.serialize(ids as any);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async deserialize(serializedFieldValue: string): Promise<ReferenceArray<T>> {
|
|
175
|
+
let ids = (await super.deserialize(serializedFieldValue)) as string[]|undefined;
|
|
176
|
+
if (typeof ids === 'undefined')
|
|
177
|
+
ids = [];
|
|
178
|
+
|
|
179
|
+
return new ReferenceArray(this.referenceTable, ids);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
async beforeDelete(table: Table<any>, columnPropertyName: string, records: any[]) {
|
|
183
|
+
if (!this.cascadeDelete)
|
|
184
|
+
return;
|
|
185
|
+
|
|
186
|
+
const recordIdsToDelete: string[] = [];
|
|
187
|
+
for (let record of records) {
|
|
188
|
+
const referenceArray = record[columnPropertyName] as ReferenceArray<Record>;
|
|
189
|
+
const referenceRecords = await referenceArray.get();
|
|
190
|
+
for (let referenceRecord of referenceRecords)
|
|
191
|
+
recordIdsToDelete.push(referenceRecord.id);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (recordIdsToDelete.length < 1)
|
|
195
|
+
return;
|
|
196
|
+
|
|
197
|
+
const referenceTable = tableByName(this.referenceTable);
|
|
198
|
+
const qb = new QueryBuilderFactory().getQueryBuilder(referenceTable)
|
|
199
|
+
.condition({ field: 'id', operator: 'IN', value: recordIdsToDelete })
|
|
200
|
+
;
|
|
201
|
+
await new Db().delete(referenceTable, qb);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export class ReferenceColumn<T extends Record> extends StringColumn<Reference<T>> {
|
|
206
|
+
/**
|
|
207
|
+
* A column that stores a reference (id) to another record.
|
|
208
|
+
*
|
|
209
|
+
* @param name name of column
|
|
210
|
+
* @param referenceTable name of table that the reference record is in
|
|
211
|
+
* @param cascadeDelete if true referenced record will be deleted when this record is deleted
|
|
212
|
+
* @param options generic column options
|
|
213
|
+
*/
|
|
214
|
+
constructor(
|
|
215
|
+
name: string,
|
|
216
|
+
public referenceTable: string,
|
|
217
|
+
public cascadeDelete: boolean,
|
|
218
|
+
options?: ColumnOptions
|
|
219
|
+
) {
|
|
220
|
+
super(name, options, 36);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
async serialize(fieldValue: Reference<T>|undefined): Promise<string|undefined> {
|
|
224
|
+
if (typeof fieldValue === 'undefined')
|
|
225
|
+
return;
|
|
226
|
+
|
|
227
|
+
if (!fieldValue._id)
|
|
228
|
+
return;
|
|
229
|
+
|
|
230
|
+
return fieldValue._id;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
async deserialize(serializedFieldValue: string): Promise<Reference<T>> {
|
|
234
|
+
return new Reference(this.referenceTable, serializedFieldValue);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
async beforeDelete(table: Table<any>, columnPropertyName: string, records: any[]) {
|
|
238
|
+
if (!this.cascadeDelete)
|
|
239
|
+
return;
|
|
240
|
+
|
|
241
|
+
const recordIdsToDelete: string[] = [];
|
|
242
|
+
for (let record of records) {
|
|
243
|
+
const reference = record[columnPropertyName] as Reference<Record>;
|
|
244
|
+
if (reference && reference._id)
|
|
245
|
+
recordIdsToDelete.push(reference._id);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (recordIdsToDelete.length < 1)
|
|
249
|
+
return;
|
|
250
|
+
|
|
251
|
+
const referenceTable = tableByName(this.referenceTable);
|
|
252
|
+
const qb = new QueryBuilderFactory().getQueryBuilder(referenceTable)
|
|
253
|
+
.condition({ field: 'id', operator: 'IN', value: recordIdsToDelete })
|
|
254
|
+
;
|
|
255
|
+
await new Db().delete(referenceTable, qb);
|
|
256
|
+
}
|
|
257
|
+
}
|