taon-typeorm 21.0.12 → 21.0.18
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/browser/package.json +1 -1
- package/browser-prod/README.md +24 -0
- package/browser-prod/fesm2022/taon-typeorm-browser.mjs +30417 -0
- package/browser-prod/fesm2022/taon-typeorm-browser.mjs.map +1 -0
- package/browser-prod/types/taon-typeorm-browser.d.ts +12402 -0
- package/lib/build-info._auto-generated_.d.ts +5 -1
- package/lib/build-info._auto-generated_.js +6 -2
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/env/env.angular-node-app.d.ts +30 -29
- package/lib/env/env.angular-node-app.js +32 -31
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.d.ts +30 -29
- package/lib/env/env.docs-webapp.js +32 -31
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.d.ts +30 -29
- package/lib/env/env.electron-app.js +32 -31
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.d.ts +30 -29
- package/lib/env/env.mobile-app.js +32 -31
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +30 -29
- package/lib/env/env.npm-lib-and-cli-tool.js +32 -31
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.d.ts +30 -29
- package/lib/env/env.vscode-plugin.js +32 -31
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/index._auto-generated_.js +1 -1
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +24 -0
- package/lib-prod/build-info._auto-generated_.js +30 -0
- package/lib-prod/build-info._auto-generated_.js.map +1 -0
- package/lib-prod/env/env.angular-node-app.d.ts +64 -0
- package/lib-prod/env/env.angular-node-app.js +71 -0
- package/lib-prod/env/env.angular-node-app.js.map +1 -0
- package/lib-prod/env/env.docs-webapp.d.ts +64 -0
- package/lib-prod/env/env.docs-webapp.js +71 -0
- package/lib-prod/env/env.docs-webapp.js.map +1 -0
- package/lib-prod/env/env.electron-app.d.ts +64 -0
- package/lib-prod/env/env.electron-app.js +71 -0
- package/lib-prod/env/env.electron-app.js.map +1 -0
- package/lib-prod/env/env.mobile-app.d.ts +64 -0
- package/lib-prod/env/env.mobile-app.js +71 -0
- package/lib-prod/env/env.mobile-app.js.map +1 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +64 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +71 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -0
- package/lib-prod/env/env.vscode-plugin.d.ts +64 -0
- package/lib-prod/env/env.vscode-plugin.js +71 -0
- package/lib-prod/env/env.vscode-plugin.js.map +1 -0
- package/lib-prod/env/index.d.ts +6 -0
- package/lib-prod/env/index.js +23 -0
- package/lib-prod/env/index.js.map +1 -0
- package/lib-prod/index._auto-generated_.d.ts +0 -0
- package/lib-prod/index._auto-generated_.js +6 -0
- package/lib-prod/index._auto-generated_.js.map +1 -0
- package/lib-prod/index.d.ts +1 -0
- package/lib-prod/index.js +18 -0
- package/lib-prod/index.js.map +1 -0
- package/lib-prod/typeorm/cache/DbQueryResultCache.d.ts +52 -0
- package/lib-prod/typeorm/cache/DbQueryResultCache.js +278 -0
- package/lib-prod/typeorm/cache/DbQueryResultCache.js.map +1 -0
- package/lib-prod/typeorm/cache/QueryResultCache.d.ts +39 -0
- package/lib-prod/typeorm/cache/QueryResultCache.js +3 -0
- package/lib-prod/typeorm/cache/QueryResultCache.js.map +1 -0
- package/lib-prod/typeorm/cache/QueryResultCacheFactory.d.ts +13 -0
- package/lib-prod/typeorm/cache/QueryResultCacheFactory.js +42 -0
- package/lib-prod/typeorm/cache/QueryResultCacheFactory.js.map +1 -0
- package/lib-prod/typeorm/cache/QueryResultCacheOptions.d.ts +26 -0
- package/lib-prod/typeorm/cache/QueryResultCacheOptions.js +3 -0
- package/lib-prod/typeorm/cache/QueryResultCacheOptions.js.map +1 -0
- package/lib-prod/typeorm/cache/RedisQueryResultCache.d.ts +65 -0
- package/lib-prod/typeorm/cache/RedisQueryResultCache.js +212 -0
- package/lib-prod/typeorm/cache/RedisQueryResultCache.js.map +1 -0
- package/lib-prod/typeorm/cli-ts-node-commonjs.d.ts +2 -0
- package/lib-prod/typeorm/cli-ts-node-commonjs.js +8 -0
- package/lib-prod/typeorm/cli-ts-node-commonjs.js.map +1 -0
- package/lib-prod/typeorm/cli-ts-node-esm.d.ts +2 -0
- package/lib-prod/typeorm/cli-ts-node-esm.js +24 -0
- package/lib-prod/typeorm/cli-ts-node-esm.js.map +1 -0
- package/lib-prod/typeorm/cli.d.ts +2 -0
- package/lib-prod/typeorm/cli.js +43 -0
- package/lib-prod/typeorm/cli.js.map +1 -0
- package/lib-prod/typeorm/commands/CacheClearCommand.d.ts +12 -0
- package/lib-prod/typeorm/commands/CacheClearCommand.js +51 -0
- package/lib-prod/typeorm/commands/CacheClearCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/CommandUtils.d.ts +24 -0
- package/lib-prod/typeorm/commands/CommandUtils.js +87 -0
- package/lib-prod/typeorm/commands/CommandUtils.js.map +1 -0
- package/lib-prod/typeorm/commands/EntityCreateCommand.d.ts +13 -0
- package/lib-prod/typeorm/commands/EntityCreateCommand.js +50 -0
- package/lib-prod/typeorm/commands/EntityCreateCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/InitCommand.d.ts +69 -0
- package/lib-prod/typeorm/commands/InitCommand.js +617 -0
- package/lib-prod/typeorm/commands/InitCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/MigrationCreateCommand.d.ts +22 -0
- package/lib-prod/typeorm/commands/MigrationCreateCommand.js +88 -0
- package/lib-prod/typeorm/commands/MigrationCreateCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/MigrationGenerateCommand.d.ts +38 -0
- package/lib-prod/typeorm/commands/MigrationGenerateCommand.js +206 -0
- package/lib-prod/typeorm/commands/MigrationGenerateCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/MigrationRevertCommand.d.ts +16 -0
- package/lib-prod/typeorm/commands/MigrationRevertCommand.js +75 -0
- package/lib-prod/typeorm/commands/MigrationRevertCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/MigrationRunCommand.d.ts +16 -0
- package/lib-prod/typeorm/commands/MigrationRunCommand.js +79 -0
- package/lib-prod/typeorm/commands/MigrationRunCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/MigrationShowCommand.d.ts +12 -0
- package/lib-prod/typeorm/commands/MigrationShowCommand.js +46 -0
- package/lib-prod/typeorm/commands/MigrationShowCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/QueryCommand.d.ts +14 -0
- package/lib-prod/typeorm/commands/QueryCommand.js +66 -0
- package/lib-prod/typeorm/commands/QueryCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/SchemaDropCommand.d.ts +12 -0
- package/lib-prod/typeorm/commands/SchemaDropCommand.js +47 -0
- package/lib-prod/typeorm/commands/SchemaDropCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/SchemaLogCommand.d.ts +12 -0
- package/lib-prod/typeorm/commands/SchemaLogCommand.js +71 -0
- package/lib-prod/typeorm/commands/SchemaLogCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/SchemaSyncCommand.d.ts +12 -0
- package/lib-prod/typeorm/commands/SchemaSyncCommand.js +47 -0
- package/lib-prod/typeorm/commands/SchemaSyncCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/SubscriberCreateCommand.d.ts +13 -0
- package/lib-prod/typeorm/commands/SubscriberCreateCommand.js +50 -0
- package/lib-prod/typeorm/commands/SubscriberCreateCommand.js.map +1 -0
- package/lib-prod/typeorm/commands/VersionCommand.d.ts +10 -0
- package/lib-prod/typeorm/commands/VersionCommand.js +56 -0
- package/lib-prod/typeorm/commands/VersionCommand.js.map +1 -0
- package/lib-prod/typeorm/common/DeepPartial.d.ts +6 -0
- package/lib-prod/typeorm/common/DeepPartial.js +3 -0
- package/lib-prod/typeorm/common/DeepPartial.js.map +1 -0
- package/lib-prod/typeorm/common/EntityTarget.d.ts +9 -0
- package/lib-prod/typeorm/common/EntityTarget.js +3 -0
- package/lib-prod/typeorm/common/EntityTarget.js.map +1 -0
- package/lib-prod/typeorm/common/MixedList.d.ts +8 -0
- package/lib-prod/typeorm/common/MixedList.js +3 -0
- package/lib-prod/typeorm/common/MixedList.js.map +1 -0
- package/lib-prod/typeorm/common/NonNever.d.ts +6 -0
- package/lib-prod/typeorm/common/NonNever.js +3 -0
- package/lib-prod/typeorm/common/NonNever.js.map +1 -0
- package/lib-prod/typeorm/common/ObjectLiteral.d.ts +6 -0
- package/lib-prod/typeorm/common/ObjectLiteral.js +3 -0
- package/lib-prod/typeorm/common/ObjectLiteral.js.map +1 -0
- package/lib-prod/typeorm/common/ObjectType.d.ts +6 -0
- package/lib-prod/typeorm/common/ObjectType.js +3 -0
- package/lib-prod/typeorm/common/ObjectType.js.map +1 -0
- package/lib-prod/typeorm/common/RelationType.d.ts +14 -0
- package/lib-prod/typeorm/common/RelationType.js +3 -0
- package/lib-prod/typeorm/common/RelationType.js.map +1 -0
- package/lib-prod/typeorm/connection/BaseConnectionOptions.d.ts +7 -0
- package/lib-prod/typeorm/connection/BaseConnectionOptions.js +3 -0
- package/lib-prod/typeorm/connection/BaseConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/connection/Connection.d.ts +10 -0
- package/lib-prod/typeorm/connection/Connection.js +15 -0
- package/lib-prod/typeorm/connection/Connection.js.map +1 -0
- package/lib-prod/typeorm/connection/ConnectionManager.d.ts +33 -0
- package/lib-prod/typeorm/connection/ConnectionManager.js +63 -0
- package/lib-prod/typeorm/connection/ConnectionManager.js.map +1 -0
- package/lib-prod/typeorm/connection/ConnectionMetadataBuilder.d.ts +24 -0
- package/lib-prod/typeorm/connection/ConnectionMetadataBuilder.js +74 -0
- package/lib-prod/typeorm/connection/ConnectionMetadataBuilder.js.map +1 -0
- package/lib-prod/typeorm/connection/ConnectionOptions.d.ts +9 -0
- package/lib-prod/typeorm/connection/ConnectionOptions.js +3 -0
- package/lib-prod/typeorm/connection/ConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/connection/ConnectionOptionsReader.d.ts +64 -0
- package/lib-prod/typeorm/connection/ConnectionOptionsReader.js +227 -0
- package/lib-prod/typeorm/connection/ConnectionOptionsReader.js.map +1 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsEnvReader.d.ts +30 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +110 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js.map +1 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsXmlReader.d.ts +16 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsXmlReader.js +69 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsXmlReader.js.map +1 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsYmlReader.d.ts +12 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsYmlReader.js +31 -0
- package/lib-prod/typeorm/connection/options-reader/ConnectionOptionsYmlReader.js.map +1 -0
- package/lib-prod/typeorm/constants.d.ts +1 -0
- package/lib-prod/typeorm/constants.js +6 -0
- package/lib-prod/typeorm/constants.js.map +1 -0
- package/lib-prod/typeorm/container.d.ts +39 -0
- package/lib-prod/typeorm/container.js +57 -0
- package/lib-prod/typeorm/container.js.map +1 -0
- package/lib-prod/typeorm/data-source/BaseDataSourceOptions.d.ts +171 -0
- package/lib-prod/typeorm/data-source/BaseDataSourceOptions.js +3 -0
- package/lib-prod/typeorm/data-source/BaseDataSourceOptions.js.map +1 -0
- package/lib-prod/typeorm/data-source/DataSource.d.ts +260 -0
- package/lib-prod/typeorm/data-source/DataSource.js +528 -0
- package/lib-prod/typeorm/data-source/DataSource.js.map +1 -0
- package/lib-prod/typeorm/data-source/DataSourceOptions.d.ts +22 -0
- package/lib-prod/typeorm/data-source/DataSourceOptions.js +4 -0
- package/lib-prod/typeorm/data-source/DataSourceOptions.js.map +1 -0
- package/lib-prod/typeorm/data-source/index.d.ts +2 -0
- package/lib-prod/typeorm/data-source/index.js +19 -0
- package/lib-prod/typeorm/data-source/index.js.map +1 -0
- package/lib-prod/typeorm/decorator/Check.d.ts +12 -0
- package/lib-prod/typeorm/decorator/Check.js +26 -0
- package/lib-prod/typeorm/decorator/Check.js.map +1 -0
- package/lib-prod/typeorm/decorator/EntityRepository.d.ts +9 -0
- package/lib-prod/typeorm/decorator/EntityRepository.js +20 -0
- package/lib-prod/typeorm/decorator/EntityRepository.js.map +1 -0
- package/lib-prod/typeorm/decorator/Exclusion.d.ts +12 -0
- package/lib-prod/typeorm/decorator/Exclusion.js +26 -0
- package/lib-prod/typeorm/decorator/Exclusion.js.map +1 -0
- package/lib-prod/typeorm/decorator/Generated.d.ts +10 -0
- package/lib-prod/typeorm/decorator/Generated.js +23 -0
- package/lib-prod/typeorm/decorator/Generated.js.map +1 -0
- package/lib-prod/typeorm/decorator/Index.d.ts +49 -0
- package/lib-prod/typeorm/decorator/Index.js +54 -0
- package/lib-prod/typeorm/decorator/Index.js.map +1 -0
- package/lib-prod/typeorm/decorator/Unique.d.ts +21 -0
- package/lib-prod/typeorm/decorator/Unique.js +49 -0
- package/lib-prod/typeorm/decorator/Unique.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/Column.d.ts +74 -0
- package/lib-prod/typeorm/decorator/columns/Column.js +77 -0
- package/lib-prod/typeorm/decorator/columns/Column.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/CreateDateColumn.d.ts +7 -0
- package/lib-prod/typeorm/decorator/columns/CreateDateColumn.js +20 -0
- package/lib-prod/typeorm/decorator/columns/CreateDateColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/DeleteDateColumn.d.ts +6 -0
- package/lib-prod/typeorm/decorator/columns/DeleteDateColumn.js +19 -0
- package/lib-prod/typeorm/decorator/columns/DeleteDateColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/ObjectIdColumn.d.ts +6 -0
- package/lib-prod/typeorm/decorator/columns/ObjectIdColumn.js +26 -0
- package/lib-prod/typeorm/decorator/columns/ObjectIdColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryColumn.d.ts +21 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryColumn.js +62 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryGeneratedColumn.d.ts +24 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryGeneratedColumn.js +58 -0
- package/lib-prod/typeorm/decorator/columns/PrimaryGeneratedColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/UpdateDateColumn.d.ts +6 -0
- package/lib-prod/typeorm/decorator/columns/UpdateDateColumn.js +19 -0
- package/lib-prod/typeorm/decorator/columns/UpdateDateColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/VersionColumn.d.ts +7 -0
- package/lib-prod/typeorm/decorator/columns/VersionColumn.js +20 -0
- package/lib-prod/typeorm/decorator/columns/VersionColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/ViewColumn.d.ts +5 -0
- package/lib-prod/typeorm/decorator/columns/ViewColumn.js +18 -0
- package/lib-prod/typeorm/decorator/columns/ViewColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/columns/VirtualColumn.d.ts +10 -0
- package/lib-prod/typeorm/decorator/columns/VirtualColumn.js +48 -0
- package/lib-prod/typeorm/decorator/columns/VirtualColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/entity/ChildEntity.d.ts +4 -0
- package/lib-prod/typeorm/decorator/entity/ChildEntity.js +24 -0
- package/lib-prod/typeorm/decorator/entity/ChildEntity.js.map +1 -0
- package/lib-prod/typeorm/decorator/entity/Entity.d.ts +11 -0
- package/lib-prod/typeorm/decorator/entity/Entity.js +30 -0
- package/lib-prod/typeorm/decorator/entity/Entity.js.map +1 -0
- package/lib-prod/typeorm/decorator/entity/TableInheritance.d.ts +8 -0
- package/lib-prod/typeorm/decorator/entity/TableInheritance.js +21 -0
- package/lib-prod/typeorm/decorator/entity/TableInheritance.js.map +1 -0
- package/lib-prod/typeorm/decorator/entity-view/ViewEntity.d.ts +11 -0
- package/lib-prod/typeorm/decorator/entity-view/ViewEntity.js +31 -0
- package/lib-prod/typeorm/decorator/entity-view/ViewEntity.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterInsert.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterInsert.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterInsert.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterLoad.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterLoad.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterLoad.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRecover.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRecover.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRecover.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRemove.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRemove.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterRemove.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterSoftRemove.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterSoftRemove.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterSoftRemove.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/AfterUpdate.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/AfterUpdate.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/AfterUpdate.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeInsert.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeInsert.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeInsert.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRecover.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRecover.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRecover.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRemove.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRemove.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeRemove.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeSoftRemove.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeSoftRemove.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeSoftRemove.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeUpdate.d.ts +4 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeUpdate.js +18 -0
- package/lib-prod/typeorm/decorator/listeners/BeforeUpdate.js.map +1 -0
- package/lib-prod/typeorm/decorator/listeners/EventSubscriber.d.ts +5 -0
- package/lib-prod/typeorm/decorator/listeners/EventSubscriber.js +16 -0
- package/lib-prod/typeorm/decorator/listeners/EventSubscriber.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnCommonOptions.d.ts +57 -0
- package/lib-prod/typeorm/decorator/options/ColumnCommonOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnCommonOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnEmbeddedOptions.d.ts +16 -0
- package/lib-prod/typeorm/decorator/options/ColumnEmbeddedOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnEmbeddedOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnEnumOptions.d.ts +13 -0
- package/lib-prod/typeorm/decorator/options/ColumnEnumOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnEnumOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnHstoreOptions.d.ts +10 -0
- package/lib-prod/typeorm/decorator/options/ColumnHstoreOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnHstoreOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnNumericOptions.d.ts +24 -0
- package/lib-prod/typeorm/decorator/options/ColumnNumericOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnNumericOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnOptions.d.ts +158 -0
- package/lib-prod/typeorm/decorator/options/ColumnOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithLengthOptions.d.ts +10 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithLengthOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithLengthOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithWidthOptions.d.ts +19 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithWidthOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ColumnWithWidthOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/EntityOptions.d.ts +42 -0
- package/lib-prod/typeorm/decorator/options/EntityOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/EntityOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/IndexOptions.d.ts +52 -0
- package/lib-prod/typeorm/decorator/options/IndexOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/IndexOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/JoinColumnOptions.d.ts +17 -0
- package/lib-prod/typeorm/decorator/options/JoinColumnOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/JoinColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/JoinTableMultipleColumnsOptions.d.ts +29 -0
- package/lib-prod/typeorm/decorator/options/JoinTableMultipleColumnsOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/JoinTableMultipleColumnsOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/JoinTableOptions.d.ts +29 -0
- package/lib-prod/typeorm/decorator/options/JoinTableOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/JoinTableOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnIdentityOptions.d.ts +26 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnIdentityOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnIdentityOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnNumericOptions.d.ts +31 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnNumericOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnNumericOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnUUIDOptions.d.ts +17 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnUUIDOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/PrimaryGeneratedColumnUUIDOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/RelationOptions.d.ts +64 -0
- package/lib-prod/typeorm/decorator/options/RelationOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/RelationOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/SpatialColumnOptions.d.ts +15 -0
- package/lib-prod/typeorm/decorator/options/SpatialColumnOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/SpatialColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/TransactionOptions.d.ts +5 -0
- package/lib-prod/typeorm/decorator/options/TransactionOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/TransactionOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/UniqueOptions.d.ts +10 -0
- package/lib-prod/typeorm/decorator/options/UniqueOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/UniqueOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ValueTransformer.d.ts +13 -0
- package/lib-prod/typeorm/decorator/options/ValueTransformer.js +3 -0
- package/lib-prod/typeorm/decorator/options/ValueTransformer.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ViewColumnOptions.d.ts +15 -0
- package/lib-prod/typeorm/decorator/options/ViewColumnOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ViewColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/ViewEntityOptions.d.ts +39 -0
- package/lib-prod/typeorm/decorator/options/ViewEntityOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/ViewEntityOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/options/VirtualColumnOptions.d.ts +27 -0
- package/lib-prod/typeorm/decorator/options/VirtualColumnOptions.js +3 -0
- package/lib-prod/typeorm/decorator/options/VirtualColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/JoinColumn.d.ts +19 -0
- package/lib-prod/typeorm/decorator/relations/JoinColumn.js +26 -0
- package/lib-prod/typeorm/decorator/relations/JoinColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/JoinTable.d.ts +17 -0
- package/lib-prod/typeorm/decorator/relations/JoinTable.js +32 -0
- package/lib-prod/typeorm/decorator/relations/JoinTable.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/ManyToMany.d.ts +14 -0
- package/lib-prod/typeorm/decorator/relations/ManyToMany.js +45 -0
- package/lib-prod/typeorm/decorator/relations/ManyToMany.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/ManyToOne.d.ts +14 -0
- package/lib-prod/typeorm/decorator/relations/ManyToOne.js +45 -0
- package/lib-prod/typeorm/decorator/relations/ManyToOne.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/OneToMany.d.ts +8 -0
- package/lib-prod/typeorm/decorator/relations/OneToMany.js +36 -0
- package/lib-prod/typeorm/decorator/relations/OneToMany.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/OneToOne.d.ts +12 -0
- package/lib-prod/typeorm/decorator/relations/OneToOne.js +44 -0
- package/lib-prod/typeorm/decorator/relations/OneToOne.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/RelationCount.d.ts +7 -0
- package/lib-prod/typeorm/decorator/relations/RelationCount.js +21 -0
- package/lib-prod/typeorm/decorator/relations/RelationCount.js.map +1 -0
- package/lib-prod/typeorm/decorator/relations/RelationId.d.ts +7 -0
- package/lib-prod/typeorm/decorator/relations/RelationId.js +21 -0
- package/lib-prod/typeorm/decorator/relations/RelationId.js.map +1 -0
- package/lib-prod/typeorm/decorator/tree/Tree.d.ts +9 -0
- package/lib-prod/typeorm/decorator/tree/Tree.js +20 -0
- package/lib-prod/typeorm/decorator/tree/Tree.js.map +1 -0
- package/lib-prod/typeorm/decorator/tree/TreeChildren.d.ts +7 -0
- package/lib-prod/typeorm/decorator/tree/TreeChildren.js +39 -0
- package/lib-prod/typeorm/decorator/tree/TreeChildren.js.map +1 -0
- package/lib-prod/typeorm/decorator/tree/TreeLevelColumn.d.ts +4 -0
- package/lib-prod/typeorm/decorator/tree/TreeLevelColumn.js +18 -0
- package/lib-prod/typeorm/decorator/tree/TreeLevelColumn.js.map +1 -0
- package/lib-prod/typeorm/decorator/tree/TreeParent.d.ts +8 -0
- package/lib-prod/typeorm/decorator/tree/TreeParent.js +38 -0
- package/lib-prod/typeorm/decorator/tree/TreeParent.js.map +1 -0
- package/lib-prod/typeorm/driver/Driver.d.ts +207 -0
- package/lib-prod/typeorm/driver/Driver.js +3 -0
- package/lib-prod/typeorm/driver/Driver.js.map +1 -0
- package/lib-prod/typeorm/driver/DriverFactory.d.ts +11 -0
- package/lib-prod/typeorm/driver/DriverFactory.js +116 -0
- package/lib-prod/typeorm/driver/DriverFactory.js.map +1 -0
- package/lib-prod/typeorm/driver/DriverUtils.d.ts +61 -0
- package/lib-prod/typeorm/driver/DriverUtils.js +227 -0
- package/lib-prod/typeorm/driver/DriverUtils.js.map +1 -0
- package/lib-prod/typeorm/driver/Query.d.ts +9 -0
- package/lib-prod/typeorm/driver/Query.js +17 -0
- package/lib-prod/typeorm/driver/Query.js.map +1 -0
- package/lib-prod/typeorm/driver/SqlInMemory.d.ts +8 -0
- package/lib-prod/typeorm/driver/SqlInMemory.js +12 -0
- package/lib-prod/typeorm/driver/SqlInMemory.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnection.d.ts +13 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnection.js +19 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnection.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +35 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js +3 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionOptions.d.ts +35 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlDriver.d.ts +250 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +880 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.d.ts +327 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1702 -0
- package/lib-prod/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresConnectionOptions.d.ts +35 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresDriver.d.ts +70 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +107 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.d.ts +48 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +139 -0
- package/lib-prod/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3ConnectionOptions.d.ts +60 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3ConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3ConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3Driver.d.ts +59 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +155 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.d.ts +32 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +130 -0
- package/lib-prod/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorConnectionOptions.d.ts +31 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorDriver.d.ts +27 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorDriver.js +83 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorQueryRunner.d.ts +33 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorQueryRunner.js +97 -0
- package/lib-prod/typeorm/driver/capacitor/CapacitorQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +34 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionCredentialsOptions.js +3 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionOptions.d.ts +44 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachDriver.d.ts +261 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachDriver.js +796 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachQueryRunner.d.ts +358 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachQueryRunner.js +2144 -0
- package/lib-prod/typeorm/driver/cockroachdb/CockroachQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/cordova/CordovaConnectionOptions.d.ts +24 -0
- package/lib-prod/typeorm/driver/cordova/CordovaConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/cordova/CordovaConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/cordova/CordovaDriver.d.ts +25 -0
- package/lib-prod/typeorm/driver/cordova/CordovaDriver.js +80 -0
- package/lib-prod/typeorm/driver/cordova/CordovaDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/cordova/CordovaQueryRunner.d.ts +80 -0
- package/lib-prod/typeorm/driver/cordova/CordovaQueryRunner.js +161 -0
- package/lib-prod/typeorm/driver/cordova/CordovaQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/expo/ExpoConnectionOptions.d.ts +19 -0
- package/lib-prod/typeorm/driver/expo/ExpoConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/expo/ExpoConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/expo/ExpoDriver.d.ts +21 -0
- package/lib-prod/typeorm/driver/expo/ExpoDriver.js +80 -0
- package/lib-prod/typeorm/driver/expo/ExpoDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/expo/ExpoQueryRunner.d.ts +57 -0
- package/lib-prod/typeorm/driver/expo/ExpoQueryRunner.js +165 -0
- package/lib-prod/typeorm/driver/expo/ExpoQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/mongodb/MongoConnectionOptions.d.ts +278 -0
- package/lib-prod/typeorm/driver/mongodb/MongoConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/mongodb/MongoConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/mongodb/MongoDriver.d.ts +224 -0
- package/lib-prod/typeorm/driver/mongodb/MongoDriver.js +452 -0
- package/lib-prod/typeorm/driver/mongodb/MongoDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/mongodb/MongoQueryRunner.d.ts +548 -0
- package/lib-prod/typeorm/driver/mongodb/MongoQueryRunner.js +747 -0
- package/lib-prod/typeorm/driver/mongodb/MongoQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/mongodb/typings.d.ts +5350 -0
- package/lib-prod/typeorm/driver/mongodb/typings.js +4 -0
- package/lib-prod/typeorm/driver/mongodb/typings.js.map +1 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +39 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionCredentialsOptions.js +4 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionOptions.d.ts +126 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/mysql/MysqlConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/mysql/MysqlDriver.d.ts +262 -0
- package/lib-prod/typeorm/driver/mysql/MysqlDriver.js +1116 -0
- package/lib-prod/typeorm/driver/mysql/MysqlDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/mysql/MysqlQueryRunner.d.ts +328 -0
- package/lib-prod/typeorm/driver/mysql/MysqlQueryRunner.js +2109 -0
- package/lib-prod/typeorm/driver/mysql/MysqlQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptConnectionOptions.d.ts +45 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptDriver.d.ts +44 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptDriver.js +105 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptQueryRunner.d.ts +29 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptQueryRunner.js +91 -0
- package/lib-prod/typeorm/driver/nativescript/NativescriptQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionCredentialsOptions.d.ts +41 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionCredentialsOptions.js +4 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionOptions.d.ts +37 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/oracle/OracleConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/oracle/OracleDriver.d.ts +240 -0
- package/lib-prod/typeorm/driver/oracle/OracleDriver.js +856 -0
- package/lib-prod/typeorm/driver/oracle/OracleDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/oracle/OracleQueryRunner.d.ts +333 -0
- package/lib-prod/typeorm/driver/oracle/OracleQueryRunner.js +1844 -0
- package/lib-prod/typeorm/driver/oracle/OracleQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +34 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionCredentialsOptions.js +4 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionOptions.d.ts +67 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/postgres/PostgresConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/postgres/PostgresDriver.d.ts +290 -0
- package/lib-prod/typeorm/driver/postgres/PostgresDriver.js +1286 -0
- package/lib-prod/typeorm/driver/postgres/PostgresDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/postgres/PostgresQueryRunner.d.ts +398 -0
- package/lib-prod/typeorm/driver/postgres/PostgresQueryRunner.js +2612 -0
- package/lib-prod/typeorm/driver/postgres/PostgresQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeConnectionOptions.d.ts +24 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeDriver.d.ts +25 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeDriver.js +84 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeQueryRunner.d.ts +29 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeQueryRunner.js +91 -0
- package/lib-prod/typeorm/driver/react-native/ReactNativeQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionCredentialsOptions.d.ts +45 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionCredentialsOptions.js +3 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionOptions.d.ts +60 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/sap/SapConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sap/SapDriver.d.ts +216 -0
- package/lib-prod/typeorm/driver/sap/SapDriver.js +681 -0
- package/lib-prod/typeorm/driver/sap/SapDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/sap/SapQueryRunner.d.ts +348 -0
- package/lib-prod/typeorm/driver/sap/SapQueryRunner.js +2031 -0
- package/lib-prod/typeorm/driver/sap/SapQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +17 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionCredentialsOptions.js +3 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionOptions.d.ts +121 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/spanner/SpannerConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/spanner/SpannerDriver.d.ts +241 -0
- package/lib-prod/typeorm/driver/spanner/SpannerDriver.js +641 -0
- package/lib-prod/typeorm/driver/spanner/SpannerDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/spanner/SpannerQueryRunner.d.ts +349 -0
- package/lib-prod/typeorm/driver/spanner/SpannerQueryRunner.js +1466 -0
- package/lib-prod/typeorm/driver/spanner/SpannerQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteConnectionOptions.d.ts +42 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteDriver.d.ts +59 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteDriver.js +159 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteQueryRunner.d.ts +27 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteQueryRunner.js +108 -0
- package/lib-prod/typeorm/driver/sqlite/SqliteQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.d.ts +237 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +713 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.d.ts +301 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1505 -0
- package/lib-prod/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsConnectionOptions.d.ts +46 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsConnectionOptions.js +3 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsDriver.d.ts +67 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsDriver.js +292 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsQueryRunner.d.ts +35 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsQueryRunner.js +116 -0
- package/lib-prod/typeorm/driver/sqljs/SqljsQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/MssqlParameter.d.ts +44 -0
- package/lib-prod/typeorm/driver/sqlserver/MssqlParameter.js +26 -0
- package/lib-prod/typeorm/driver/sqlserver/MssqlParameter.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +49 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionCredentialsOptions.js +4 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionOptions.d.ts +237 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionOptions.js +4 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerDriver.d.ts +253 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerDriver.js +921 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerDriver.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerQueryRunner.d.ts +356 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerQueryRunner.js +2442 -0
- package/lib-prod/typeorm/driver/sqlserver/SqlServerQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryAccessTokenAuthentication.d.ts +10 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryAccessTokenAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryAccessTokenAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiAppServiceAuthentication.d.ts +20 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiAppServiceAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiAppServiceAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiVmAuthentication.d.ts +16 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiVmAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiVmAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryPasswordAuthentication.d.ts +17 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryPasswordAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryPasswordAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryServicePrincipalSecret.d.ts +17 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryServicePrincipalSecret.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryServicePrincipalSecret.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/DefaultAuthentication.d.ts +13 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/DefaultAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/DefaultAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/NtlmAuthentication.d.ts +19 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/NtlmAuthentication.js +3 -0
- package/lib-prod/typeorm/driver/sqlserver/authentication/NtlmAuthentication.js.map +1 -0
- package/lib-prod/typeorm/driver/types/ColumnTypes.d.ts +25 -0
- package/lib-prod/typeorm/driver/types/ColumnTypes.js +3 -0
- package/lib-prod/typeorm/driver/types/ColumnTypes.js.map +1 -0
- package/lib-prod/typeorm/driver/types/CteCapabilities.d.ts +18 -0
- package/lib-prod/typeorm/driver/types/CteCapabilities.js +3 -0
- package/lib-prod/typeorm/driver/types/CteCapabilities.js.map +1 -0
- package/lib-prod/typeorm/driver/types/DataTypeDefaults.d.ts +8 -0
- package/lib-prod/typeorm/driver/types/DataTypeDefaults.js +3 -0
- package/lib-prod/typeorm/driver/types/DataTypeDefaults.js.map +1 -0
- package/lib-prod/typeorm/driver/types/DatabaseType.d.ts +4 -0
- package/lib-prod/typeorm/driver/types/DatabaseType.js +3 -0
- package/lib-prod/typeorm/driver/types/DatabaseType.js.map +1 -0
- package/lib-prod/typeorm/driver/types/IsolationLevel.d.ts +1 -0
- package/lib-prod/typeorm/driver/types/IsolationLevel.js +3 -0
- package/lib-prod/typeorm/driver/types/IsolationLevel.js.map +1 -0
- package/lib-prod/typeorm/driver/types/MappedColumnTypes.d.ts +112 -0
- package/lib-prod/typeorm/driver/types/MappedColumnTypes.js +3 -0
- package/lib-prod/typeorm/driver/types/MappedColumnTypes.js.map +1 -0
- package/lib-prod/typeorm/driver/types/MetadataTableType.d.ts +5 -0
- package/lib-prod/typeorm/driver/types/MetadataTableType.js +10 -0
- package/lib-prod/typeorm/driver/types/MetadataTableType.js.map +1 -0
- package/lib-prod/typeorm/driver/types/ReplicationMode.d.ts +1 -0
- package/lib-prod/typeorm/driver/types/ReplicationMode.js +3 -0
- package/lib-prod/typeorm/driver/types/ReplicationMode.js.map +1 -0
- package/lib-prod/typeorm/driver/types/UpsertType.d.ts +1 -0
- package/lib-prod/typeorm/driver/types/UpsertType.js +3 -0
- package/lib-prod/typeorm/driver/types/UpsertType.js.map +1 -0
- package/lib-prod/typeorm/entity-manager/EntityManager.d.ts +357 -0
- package/lib-prod/typeorm/entity-manager/EntityManager.js +791 -0
- package/lib-prod/typeorm/entity-manager/EntityManager.js.map +1 -0
- package/lib-prod/typeorm/entity-manager/EntityManagerFactory.d.ts +12 -0
- package/lib-prod/typeorm/entity-manager/EntityManagerFactory.js +27 -0
- package/lib-prod/typeorm/entity-manager/EntityManagerFactory.js.map +1 -0
- package/lib-prod/typeorm/entity-manager/MongoEntityManager.d.ts +300 -0
- package/lib-prod/typeorm/entity-manager/MongoEntityManager.js +733 -0
- package/lib-prod/typeorm/entity-manager/MongoEntityManager.js.map +1 -0
- package/lib-prod/typeorm/entity-manager/SqljsEntityManager.d.ts +26 -0
- package/lib-prod/typeorm/entity-manager/SqljsEntityManager.js +44 -0
- package/lib-prod/typeorm/entity-manager/SqljsEntityManager.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchema.d.ts +9 -0
- package/lib-prod/typeorm/entity-schema/EntitySchema.js +15 -0
- package/lib-prod/typeorm/entity-schema/EntitySchema.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaCheckOptions.d.ts +10 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaCheckOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaCheckOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaColumnOptions.d.ts +174 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaColumnOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.d.ts +18 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +22 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedError.d.ts +6 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedError.js +17 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaEmbeddedError.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaExclusionOptions.d.ts +10 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaExclusionOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaExclusionOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaIndexOptions.d.ts +53 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaIndexOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaIndexOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaOptions.d.ts +103 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaOptions.js +90 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationIdOptions.d.ts +15 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationIdOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationIdOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationOptions.d.ts +95 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaRelationOptions.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaTransformer.d.ts +13 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaTransformer.js +284 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaTransformer.js.map +1 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaUniqueOptions.d.ts +17 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaUniqueOptions.js +3 -0
- package/lib-prod/typeorm/entity-schema/EntitySchemaUniqueOptions.js.map +1 -0
- package/lib-prod/typeorm/error/AlreadyHasActiveConnectionError.d.ts +7 -0
- package/lib-prod/typeorm/error/AlreadyHasActiveConnectionError.js +15 -0
- package/lib-prod/typeorm/error/AlreadyHasActiveConnectionError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotAttachTreeChildrenEntityError.d.ts +7 -0
- package/lib-prod/typeorm/error/CannotAttachTreeChildrenEntityError.js +15 -0
- package/lib-prod/typeorm/error/CannotAttachTreeChildrenEntityError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotConnectAlreadyConnectedError.d.ts +7 -0
- package/lib-prod/typeorm/error/CannotConnectAlreadyConnectedError.js +14 -0
- package/lib-prod/typeorm/error/CannotConnectAlreadyConnectedError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotCreateEntityIdMapError.d.ts +9 -0
- package/lib-prod/typeorm/error/CannotCreateEntityIdMapError.js +20 -0
- package/lib-prod/typeorm/error/CannotCreateEntityIdMapError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotDetermineEntityError.d.ts +7 -0
- package/lib-prod/typeorm/error/CannotDetermineEntityError.js +15 -0
- package/lib-prod/typeorm/error/CannotDetermineEntityError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotExecuteNotConnectedError.d.ts +7 -0
- package/lib-prod/typeorm/error/CannotExecuteNotConnectedError.js +14 -0
- package/lib-prod/typeorm/error/CannotExecuteNotConnectedError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotGetEntityManagerNotConnectedError.d.ts +7 -0
- package/lib-prod/typeorm/error/CannotGetEntityManagerNotConnectedError.js +14 -0
- package/lib-prod/typeorm/error/CannotGetEntityManagerNotConnectedError.js.map +1 -0
- package/lib-prod/typeorm/error/CannotReflectMethodParameterTypeError.d.ts +8 -0
- package/lib-prod/typeorm/error/CannotReflectMethodParameterTypeError.js +17 -0
- package/lib-prod/typeorm/error/CannotReflectMethodParameterTypeError.js.map +1 -0
- package/lib-prod/typeorm/error/CircularRelationsError.d.ts +7 -0
- package/lib-prod/typeorm/error/CircularRelationsError.js +15 -0
- package/lib-prod/typeorm/error/CircularRelationsError.js.map +1 -0
- package/lib-prod/typeorm/error/ColumnTypeUndefinedError.d.ts +8 -0
- package/lib-prod/typeorm/error/ColumnTypeUndefinedError.js +18 -0
- package/lib-prod/typeorm/error/ColumnTypeUndefinedError.js.map +1 -0
- package/lib-prod/typeorm/error/ConnectionIsNotSetError.d.ts +7 -0
- package/lib-prod/typeorm/error/ConnectionIsNotSetError.js +14 -0
- package/lib-prod/typeorm/error/ConnectionIsNotSetError.js.map +1 -0
- package/lib-prod/typeorm/error/ConnectionNotFoundError.d.ts +7 -0
- package/lib-prod/typeorm/error/ConnectionNotFoundError.js +14 -0
- package/lib-prod/typeorm/error/ConnectionNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/CustomRepositoryCannotInheritRepositoryError.d.ts +7 -0
- package/lib-prod/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +17 -0
- package/lib-prod/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js.map +1 -0
- package/lib-prod/typeorm/error/CustomRepositoryDoesNotHaveEntityError.d.ts +7 -0
- package/lib-prod/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +17 -0
- package/lib-prod/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js.map +1 -0
- package/lib-prod/typeorm/error/CustomRepositoryNotFoundError.d.ts +7 -0
- package/lib-prod/typeorm/error/CustomRepositoryNotFoundError.js +17 -0
- package/lib-prod/typeorm/error/CustomRepositoryNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/DataTypeNotSupportedError.d.ts +7 -0
- package/lib-prod/typeorm/error/DataTypeNotSupportedError.js +13 -0
- package/lib-prod/typeorm/error/DataTypeNotSupportedError.js.map +1 -0
- package/lib-prod/typeorm/error/DriverOptionNotSetError.d.ts +7 -0
- package/lib-prod/typeorm/error/DriverOptionNotSetError.js +15 -0
- package/lib-prod/typeorm/error/DriverOptionNotSetError.js.map +1 -0
- package/lib-prod/typeorm/error/DriverPackageNotInstalledError.d.ts +7 -0
- package/lib-prod/typeorm/error/DriverPackageNotInstalledError.js +15 -0
- package/lib-prod/typeorm/error/DriverPackageNotInstalledError.js.map +1 -0
- package/lib-prod/typeorm/error/EntityMetadataNotFoundError.d.ts +6 -0
- package/lib-prod/typeorm/error/EntityMetadataNotFoundError.js +28 -0
- package/lib-prod/typeorm/error/EntityMetadataNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/EntityNotFoundError.d.ts +10 -0
- package/lib-prod/typeorm/error/EntityNotFoundError.js +39 -0
- package/lib-prod/typeorm/error/EntityNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/EntityPropertyNotFoundError.d.ts +8 -0
- package/lib-prod/typeorm/error/EntityPropertyNotFoundError.js +16 -0
- package/lib-prod/typeorm/error/EntityPropertyNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/FindRelationsNotFoundError.d.ts +7 -0
- package/lib-prod/typeorm/error/FindRelationsNotFoundError.js +22 -0
- package/lib-prod/typeorm/error/FindRelationsNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/ForbiddenTransactionModeOverrideError.d.ts +8 -0
- package/lib-prod/typeorm/error/ForbiddenTransactionModeOverrideError.js +15 -0
- package/lib-prod/typeorm/error/ForbiddenTransactionModeOverrideError.js.map +1 -0
- package/lib-prod/typeorm/error/InitializedRelationError.d.ts +11 -0
- package/lib-prod/typeorm/error/InitializedRelationError.js +19 -0
- package/lib-prod/typeorm/error/InitializedRelationError.js.map +1 -0
- package/lib-prod/typeorm/error/InsertValuesMissingError.d.ts +7 -0
- package/lib-prod/typeorm/error/InsertValuesMissingError.js +15 -0
- package/lib-prod/typeorm/error/InsertValuesMissingError.js.map +1 -0
- package/lib-prod/typeorm/error/LimitOnUpdateNotSupportedError.d.ts +7 -0
- package/lib-prod/typeorm/error/LimitOnUpdateNotSupportedError.js +14 -0
- package/lib-prod/typeorm/error/LimitOnUpdateNotSupportedError.js.map +1 -0
- package/lib-prod/typeorm/error/LockNotSupportedOnGivenDriverError.d.ts +7 -0
- package/lib-prod/typeorm/error/LockNotSupportedOnGivenDriverError.js +14 -0
- package/lib-prod/typeorm/error/LockNotSupportedOnGivenDriverError.js.map +1 -0
- package/lib-prod/typeorm/error/MetadataAlreadyExistsError.d.ts +4 -0
- package/lib-prod/typeorm/error/MetadataAlreadyExistsError.js +17 -0
- package/lib-prod/typeorm/error/MetadataAlreadyExistsError.js.map +1 -0
- package/lib-prod/typeorm/error/MetadataWithSuchNameAlreadyExistsError.d.ts +4 -0
- package/lib-prod/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +15 -0
- package/lib-prod/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js.map +1 -0
- package/lib-prod/typeorm/error/MissingDeleteDateColumnError.d.ts +5 -0
- package/lib-prod/typeorm/error/MissingDeleteDateColumnError.js +11 -0
- package/lib-prod/typeorm/error/MissingDeleteDateColumnError.js.map +1 -0
- package/lib-prod/typeorm/error/MissingDriverError.d.ts +7 -0
- package/lib-prod/typeorm/error/MissingDriverError.js +15 -0
- package/lib-prod/typeorm/error/MissingDriverError.js.map +1 -0
- package/lib-prod/typeorm/error/MissingJoinColumnError.d.ts +6 -0
- package/lib-prod/typeorm/error/MissingJoinColumnError.js +22 -0
- package/lib-prod/typeorm/error/MissingJoinColumnError.js.map +1 -0
- package/lib-prod/typeorm/error/MissingJoinTableError.d.ts +6 -0
- package/lib-prod/typeorm/error/MissingJoinTableError.js +22 -0
- package/lib-prod/typeorm/error/MissingJoinTableError.js.map +1 -0
- package/lib-prod/typeorm/error/MissingPrimaryColumnError.d.ts +5 -0
- package/lib-prod/typeorm/error/MissingPrimaryColumnError.js +12 -0
- package/lib-prod/typeorm/error/MissingPrimaryColumnError.js.map +1 -0
- package/lib-prod/typeorm/error/MustBeEntityError.d.ts +7 -0
- package/lib-prod/typeorm/error/MustBeEntityError.js +14 -0
- package/lib-prod/typeorm/error/MustBeEntityError.js.map +1 -0
- package/lib-prod/typeorm/error/NamingStrategyNotFoundError.d.ts +7 -0
- package/lib-prod/typeorm/error/NamingStrategyNotFoundError.js +20 -0
- package/lib-prod/typeorm/error/NamingStrategyNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/NestedSetMultipleRootError.d.ts +4 -0
- package/lib-prod/typeorm/error/NestedSetMultipleRootError.js +11 -0
- package/lib-prod/typeorm/error/NestedSetMultipleRootError.js.map +1 -0
- package/lib-prod/typeorm/error/NoConnectionForRepositoryError.d.ts +7 -0
- package/lib-prod/typeorm/error/NoConnectionForRepositoryError.js +15 -0
- package/lib-prod/typeorm/error/NoConnectionForRepositoryError.js.map +1 -0
- package/lib-prod/typeorm/error/NoConnectionOptionError.d.ts +7 -0
- package/lib-prod/typeorm/error/NoConnectionOptionError.js +15 -0
- package/lib-prod/typeorm/error/NoConnectionOptionError.js.map +1 -0
- package/lib-prod/typeorm/error/NoNeedToReleaseEntityManagerError.d.ts +7 -0
- package/lib-prod/typeorm/error/NoNeedToReleaseEntityManagerError.js +16 -0
- package/lib-prod/typeorm/error/NoNeedToReleaseEntityManagerError.js.map +1 -0
- package/lib-prod/typeorm/error/NoVersionOrUpdateDateColumnError.d.ts +7 -0
- package/lib-prod/typeorm/error/NoVersionOrUpdateDateColumnError.js +14 -0
- package/lib-prod/typeorm/error/NoVersionOrUpdateDateColumnError.js.map +1 -0
- package/lib-prod/typeorm/error/OffsetWithoutLimitNotSupportedError.d.ts +7 -0
- package/lib-prod/typeorm/error/OffsetWithoutLimitNotSupportedError.js +16 -0
- package/lib-prod/typeorm/error/OffsetWithoutLimitNotSupportedError.js.map +1 -0
- package/lib-prod/typeorm/error/OptimisticLockCanNotBeUsedError.d.ts +7 -0
- package/lib-prod/typeorm/error/OptimisticLockCanNotBeUsedError.js +14 -0
- package/lib-prod/typeorm/error/OptimisticLockCanNotBeUsedError.js.map +1 -0
- package/lib-prod/typeorm/error/OptimisticLockVersionMismatchError.d.ts +7 -0
- package/lib-prod/typeorm/error/OptimisticLockVersionMismatchError.js +14 -0
- package/lib-prod/typeorm/error/OptimisticLockVersionMismatchError.js.map +1 -0
- package/lib-prod/typeorm/error/PersistedEntityNotFoundError.d.ts +7 -0
- package/lib-prod/typeorm/error/PersistedEntityNotFoundError.js +14 -0
- package/lib-prod/typeorm/error/PersistedEntityNotFoundError.js.map +1 -0
- package/lib-prod/typeorm/error/PessimisticLockTransactionRequiredError.d.ts +7 -0
- package/lib-prod/typeorm/error/PessimisticLockTransactionRequiredError.js +14 -0
- package/lib-prod/typeorm/error/PessimisticLockTransactionRequiredError.js.map +1 -0
- package/lib-prod/typeorm/error/PrimaryColumnCannotBeNullableError.d.ts +4 -0
- package/lib-prod/typeorm/error/PrimaryColumnCannotBeNullableError.js +12 -0
- package/lib-prod/typeorm/error/PrimaryColumnCannotBeNullableError.js.map +1 -0
- package/lib-prod/typeorm/error/QueryFailedError.d.ts +10 -0
- package/lib-prod/typeorm/error/QueryFailedError.js +32 -0
- package/lib-prod/typeorm/error/QueryFailedError.js.map +1 -0
- package/lib-prod/typeorm/error/QueryRunnerAlreadyReleasedError.d.ts +4 -0
- package/lib-prod/typeorm/error/QueryRunnerAlreadyReleasedError.js +11 -0
- package/lib-prod/typeorm/error/QueryRunnerAlreadyReleasedError.js.map +1 -0
- package/lib-prod/typeorm/error/QueryRunnerProviderAlreadyReleasedError.d.ts +7 -0
- package/lib-prod/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +15 -0
- package/lib-prod/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js.map +1 -0
- package/lib-prod/typeorm/error/RepositoryNotTreeError.d.ts +8 -0
- package/lib-prod/typeorm/error/RepositoryNotTreeError.js +31 -0
- package/lib-prod/typeorm/error/RepositoryNotTreeError.js.map +1 -0
- package/lib-prod/typeorm/error/ReturningStatementNotSupportedError.d.ts +8 -0
- package/lib-prod/typeorm/error/ReturningStatementNotSupportedError.js +15 -0
- package/lib-prod/typeorm/error/ReturningStatementNotSupportedError.js.map +1 -0
- package/lib-prod/typeorm/error/SubjectRemovedAndUpdatedError.d.ts +8 -0
- package/lib-prod/typeorm/error/SubjectRemovedAndUpdatedError.js +15 -0
- package/lib-prod/typeorm/error/SubjectRemovedAndUpdatedError.js.map +1 -0
- package/lib-prod/typeorm/error/SubjectWithoutIdentifierError.d.ts +10 -0
- package/lib-prod/typeorm/error/SubjectWithoutIdentifierError.js +16 -0
- package/lib-prod/typeorm/error/SubjectWithoutIdentifierError.js.map +1 -0
- package/lib-prod/typeorm/error/TransactionAlreadyStartedError.d.ts +7 -0
- package/lib-prod/typeorm/error/TransactionAlreadyStartedError.js +14 -0
- package/lib-prod/typeorm/error/TransactionAlreadyStartedError.js.map +1 -0
- package/lib-prod/typeorm/error/TransactionNotStartedError.d.ts +7 -0
- package/lib-prod/typeorm/error/TransactionNotStartedError.js +14 -0
- package/lib-prod/typeorm/error/TransactionNotStartedError.js.map +1 -0
- package/lib-prod/typeorm/error/TreeRepositoryNotSupportedError.d.ts +5 -0
- package/lib-prod/typeorm/error/TreeRepositoryNotSupportedError.js +11 -0
- package/lib-prod/typeorm/error/TreeRepositoryNotSupportedError.js.map +1 -0
- package/lib-prod/typeorm/error/TypeORMError.d.ts +4 -0
- package/lib-prod/typeorm/error/TypeORMError.js +22 -0
- package/lib-prod/typeorm/error/TypeORMError.js.map +1 -0
- package/lib-prod/typeorm/error/UpdateValuesMissingError.d.ts +4 -0
- package/lib-prod/typeorm/error/UpdateValuesMissingError.js +11 -0
- package/lib-prod/typeorm/error/UpdateValuesMissingError.js.map +1 -0
- package/lib-prod/typeorm/error/UsingJoinColumnIsNotAllowedError.d.ts +6 -0
- package/lib-prod/typeorm/error/UsingJoinColumnIsNotAllowedError.js +12 -0
- package/lib-prod/typeorm/error/UsingJoinColumnIsNotAllowedError.js.map +1 -0
- package/lib-prod/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.d.ts +6 -0
- package/lib-prod/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +13 -0
- package/lib-prod/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js.map +1 -0
- package/lib-prod/typeorm/error/UsingJoinTableIsNotAllowedError.d.ts +6 -0
- package/lib-prod/typeorm/error/UsingJoinTableIsNotAllowedError.js +13 -0
- package/lib-prod/typeorm/error/UsingJoinTableIsNotAllowedError.js.map +1 -0
- package/lib-prod/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.d.ts +6 -0
- package/lib-prod/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +13 -0
- package/lib-prod/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js.map +1 -0
- package/lib-prod/typeorm/error/index.d.ts +61 -0
- package/lib-prod/typeorm/error/index.js +78 -0
- package/lib-prod/typeorm/error/index.js.map +1 -0
- package/lib-prod/typeorm/find-options/EqualOperator.d.ts +5 -0
- package/lib-prod/typeorm/find-options/EqualOperator.js +12 -0
- package/lib-prod/typeorm/find-options/EqualOperator.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindManyOptions.d.ts +14 -0
- package/lib-prod/typeorm/find-options/FindManyOptions.js +3 -0
- package/lib-prod/typeorm/find-options/FindManyOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOneOptions.d.ts +88 -0
- package/lib-prod/typeorm/find-options/FindOneOptions.js +3 -0
- package/lib-prod/typeorm/find-options/FindOneOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOperator.d.ts +65 -0
- package/lib-prod/typeorm/find-options/FindOperator.js +109 -0
- package/lib-prod/typeorm/find-options/FindOperator.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOperatorType.d.ts +4 -0
- package/lib-prod/typeorm/find-options/FindOperatorType.js +3 -0
- package/lib-prod/typeorm/find-options/FindOperatorType.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOptionsOrder.d.ts +18 -0
- package/lib-prod/typeorm/find-options/FindOptionsOrder.js +3 -0
- package/lib-prod/typeorm/find-options/FindOptionsOrder.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOptionsRelations.d.ts +18 -0
- package/lib-prod/typeorm/find-options/FindOptionsRelations.js +3 -0
- package/lib-prod/typeorm/find-options/FindOptionsRelations.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOptionsSelect.d.ts +18 -0
- package/lib-prod/typeorm/find-options/FindOptionsSelect.js +3 -0
- package/lib-prod/typeorm/find-options/FindOptionsSelect.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOptionsUtils.d.ts +190 -0
- package/lib-prod/typeorm/find-options/FindOptionsUtils.js +319 -0
- package/lib-prod/typeorm/find-options/FindOptionsUtils.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindOptionsWhere.d.ts +13 -0
- package/lib-prod/typeorm/find-options/FindOptionsWhere.js +3 -0
- package/lib-prod/typeorm/find-options/FindOptionsWhere.js.map +1 -0
- package/lib-prod/typeorm/find-options/FindTreeOptions.d.ts +13 -0
- package/lib-prod/typeorm/find-options/FindTreeOptions.js +3 -0
- package/lib-prod/typeorm/find-options/FindTreeOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/JoinOptions.d.ts +76 -0
- package/lib-prod/typeorm/find-options/JoinOptions.js +3 -0
- package/lib-prod/typeorm/find-options/JoinOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/OrderByCondition.d.ts +17 -0
- package/lib-prod/typeorm/find-options/OrderByCondition.js +3 -0
- package/lib-prod/typeorm/find-options/OrderByCondition.js.map +1 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindManyOptions.d.ts +14 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindManyOptions.js +3 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindManyOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindOneOptions.d.ts +11 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindOneOptions.js +3 -0
- package/lib-prod/typeorm/find-options/mongodb/MongoFindOneOptions.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/And.d.ts +2 -0
- package/lib-prod/typeorm/find-options/operator/And.js +8 -0
- package/lib-prod/typeorm/find-options/operator/And.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Any.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/Any.js +12 -0
- package/lib-prod/typeorm/find-options/operator/Any.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContainedBy.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContainedBy.js +12 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContainedBy.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContains.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContains.js +12 -0
- package/lib-prod/typeorm/find-options/operator/ArrayContains.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/ArrayOverlap.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/ArrayOverlap.js +12 -0
- package/lib-prod/typeorm/find-options/operator/ArrayOverlap.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Between.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/Between.js +12 -0
- package/lib-prod/typeorm/find-options/operator/Between.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Equal.d.ts +11 -0
- package/lib-prod/typeorm/find-options/operator/Equal.js +16 -0
- package/lib-prod/typeorm/find-options/operator/Equal.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/ILike.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/ILike.js +12 -0
- package/lib-prod/typeorm/find-options/operator/ILike.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/In.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/In.js +12 -0
- package/lib-prod/typeorm/find-options/operator/In.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/IsNull.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/IsNull.js +12 -0
- package/lib-prod/typeorm/find-options/operator/IsNull.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/LessThan.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/LessThan.js +12 -0
- package/lib-prod/typeorm/find-options/operator/LessThan.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/LessThanOrEqual.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/LessThanOrEqual.js +12 -0
- package/lib-prod/typeorm/find-options/operator/LessThanOrEqual.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Like.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/Like.js +12 -0
- package/lib-prod/typeorm/find-options/operator/Like.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/MoreThan.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/MoreThan.js +12 -0
- package/lib-prod/typeorm/find-options/operator/MoreThan.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/MoreThanOrEqual.d.ts +6 -0
- package/lib-prod/typeorm/find-options/operator/MoreThanOrEqual.js +12 -0
- package/lib-prod/typeorm/find-options/operator/MoreThanOrEqual.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Not.d.ts +7 -0
- package/lib-prod/typeorm/find-options/operator/Not.js +13 -0
- package/lib-prod/typeorm/find-options/operator/Not.js.map +1 -0
- package/lib-prod/typeorm/find-options/operator/Raw.d.ts +18 -0
- package/lib-prod/typeorm/find-options/operator/Raw.js +11 -0
- package/lib-prod/typeorm/find-options/operator/Raw.js.map +1 -0
- package/lib-prod/typeorm/globals.d.ts +118 -0
- package/lib-prod/typeorm/globals.js +185 -0
- package/lib-prod/typeorm/globals.js.map +1 -0
- package/lib-prod/typeorm/index.d.ts +173 -0
- package/lib-prod/typeorm/index.js +211 -0
- package/lib-prod/typeorm/index.js.map +1 -0
- package/lib-prod/typeorm/logger/AdvancedConsoleLogger.d.ts +41 -0
- package/lib-prod/typeorm/logger/AdvancedConsoleLogger.js +122 -0
- package/lib-prod/typeorm/logger/AdvancedConsoleLogger.js.map +1 -0
- package/lib-prod/typeorm/logger/DebugLogger.d.ts +40 -0
- package/lib-prod/typeorm/logger/DebugLogger.js +94 -0
- package/lib-prod/typeorm/logger/DebugLogger.js.map +1 -0
- package/lib-prod/typeorm/logger/FileLogger.d.ts +46 -0
- package/lib-prod/typeorm/logger/FileLogger.js +137 -0
- package/lib-prod/typeorm/logger/FileLogger.js.map +1 -0
- package/lib-prod/typeorm/logger/Logger.d.ts +31 -0
- package/lib-prod/typeorm/logger/Logger.js +3 -0
- package/lib-prod/typeorm/logger/Logger.js.map +1 -0
- package/lib-prod/typeorm/logger/LoggerFactory.d.ts +11 -0
- package/lib-prod/typeorm/logger/LoggerFactory.js +39 -0
- package/lib-prod/typeorm/logger/LoggerFactory.js.map +1 -0
- package/lib-prod/typeorm/logger/LoggerOptions.d.ts +13 -0
- package/lib-prod/typeorm/logger/LoggerOptions.js +3 -0
- package/lib-prod/typeorm/logger/LoggerOptions.js.map +1 -0
- package/lib-prod/typeorm/logger/SimpleConsoleLogger.d.ts +41 -0
- package/lib-prod/typeorm/logger/SimpleConsoleLogger.js +121 -0
- package/lib-prod/typeorm/logger/SimpleConsoleLogger.js.map +1 -0
- package/lib-prod/typeorm/metadata/CheckMetadata.d.ts +39 -0
- package/lib-prod/typeorm/metadata/CheckMetadata.js +59 -0
- package/lib-prod/typeorm/metadata/CheckMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/ColumnMetadata.d.ts +315 -0
- package/lib-prod/typeorm/metadata/ColumnMetadata.js +791 -0
- package/lib-prod/typeorm/metadata/ColumnMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/EmbeddedMetadata.d.ts +165 -0
- package/lib-prod/typeorm/metadata/EmbeddedMetadata.js +260 -0
- package/lib-prod/typeorm/metadata/EmbeddedMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/EntityListenerMetadata.d.ts +48 -0
- package/lib-prod/typeorm/metadata/EntityListenerMetadata.js +88 -0
- package/lib-prod/typeorm/metadata/EntityListenerMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/EntityMetadata.d.ts +561 -0
- package/lib-prod/typeorm/metadata/EntityMetadata.js +829 -0
- package/lib-prod/typeorm/metadata/EntityMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/ExclusionMetadata.d.ts +39 -0
- package/lib-prod/typeorm/metadata/ExclusionMetadata.js +59 -0
- package/lib-prod/typeorm/metadata/ExclusionMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/ForeignKeyMetadata.d.ts +77 -0
- package/lib-prod/typeorm/metadata/ForeignKeyMetadata.js +93 -0
- package/lib-prod/typeorm/metadata/ForeignKeyMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/IndexMetadata.d.ts +111 -0
- package/lib-prod/typeorm/metadata/IndexMetadata.js +196 -0
- package/lib-prod/typeorm/metadata/IndexMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/RelationCountMetadata.d.ts +46 -0
- package/lib-prod/typeorm/metadata/RelationCountMetadata.js +69 -0
- package/lib-prod/typeorm/metadata/RelationCountMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/RelationIdMetadata.d.ts +53 -0
- package/lib-prod/typeorm/metadata/RelationIdMetadata.js +92 -0
- package/lib-prod/typeorm/metadata/RelationIdMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/RelationMetadata.d.ts +290 -0
- package/lib-prod/typeorm/metadata/RelationMetadata.js +534 -0
- package/lib-prod/typeorm/metadata/RelationMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/UniqueMetadata.d.ts +65 -0
- package/lib-prod/typeorm/metadata/UniqueMetadata.js +133 -0
- package/lib-prod/typeorm/metadata/UniqueMetadata.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/ClosureTreeOptions.d.ts +10 -0
- package/lib-prod/typeorm/metadata/types/ClosureTreeOptions.js +3 -0
- package/lib-prod/typeorm/metadata/types/ClosureTreeOptions.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/DeferrableType.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/DeferrableType.js +3 -0
- package/lib-prod/typeorm/metadata/types/DeferrableType.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/EventListenerTypes.d.ts +20 -0
- package/lib-prod/typeorm/metadata/types/EventListenerTypes.js +21 -0
- package/lib-prod/typeorm/metadata/types/EventListenerTypes.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/OnDeleteType.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/OnDeleteType.js +3 -0
- package/lib-prod/typeorm/metadata/types/OnDeleteType.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/OnUpdateType.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/OnUpdateType.js +3 -0
- package/lib-prod/typeorm/metadata/types/OnUpdateType.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/PropertyTypeInFunction.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/PropertyTypeInFunction.js +3 -0
- package/lib-prod/typeorm/metadata/types/PropertyTypeInFunction.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/RelationTypeInFunction.d.ts +5 -0
- package/lib-prod/typeorm/metadata/types/RelationTypeInFunction.js +3 -0
- package/lib-prod/typeorm/metadata/types/RelationTypeInFunction.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/RelationTypes.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/RelationTypes.js +3 -0
- package/lib-prod/typeorm/metadata/types/RelationTypes.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/TableTypes.d.ts +4 -0
- package/lib-prod/typeorm/metadata/types/TableTypes.js +3 -0
- package/lib-prod/typeorm/metadata/types/TableTypes.js.map +1 -0
- package/lib-prod/typeorm/metadata/types/TreeTypes.d.ts +5 -0
- package/lib-prod/typeorm/metadata/types/TreeTypes.js +3 -0
- package/lib-prod/typeorm/metadata/types/TreeTypes.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/CheckMetadataArgs.d.ts +17 -0
- package/lib-prod/typeorm/metadata-args/CheckMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/CheckMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/ColumnMetadataArgs.d.ts +25 -0
- package/lib-prod/typeorm/metadata-args/ColumnMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/ColumnMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/DiscriminatorValueMetadataArgs.d.ts +13 -0
- package/lib-prod/typeorm/metadata-args/DiscriminatorValueMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/DiscriminatorValueMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/EmbeddedMetadataArgs.d.ts +26 -0
- package/lib-prod/typeorm/metadata-args/EmbeddedMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/EmbeddedMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/EntityListenerMetadataArgs.d.ts +18 -0
- package/lib-prod/typeorm/metadata-args/EntityListenerMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/EntityListenerMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/EntityRepositoryMetadataArgs.d.ts +14 -0
- package/lib-prod/typeorm/metadata-args/EntityRepositoryMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/EntityRepositoryMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/EntitySubscriberMetadataArgs.d.ts +9 -0
- package/lib-prod/typeorm/metadata-args/EntitySubscriberMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/EntitySubscriberMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/ExclusionMetadataArgs.d.ts +17 -0
- package/lib-prod/typeorm/metadata-args/ExclusionMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/ExclusionMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/GeneratedMetadataArgs.d.ts +17 -0
- package/lib-prod/typeorm/metadata-args/GeneratedMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/GeneratedMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/IndexMetadataArgs.d.ts +70 -0
- package/lib-prod/typeorm/metadata-args/IndexMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/IndexMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/InheritanceMetadataArgs.d.ts +18 -0
- package/lib-prod/typeorm/metadata-args/InheritanceMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/InheritanceMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/JoinColumnMetadataArgs.d.ts +26 -0
- package/lib-prod/typeorm/metadata-args/JoinColumnMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/JoinColumnMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/JoinTableMetadataArgs.d.ts +37 -0
- package/lib-prod/typeorm/metadata-args/JoinTableMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/JoinTableMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/MetadataArgsStorage.d.ts +108 -0
- package/lib-prod/typeorm/metadata-args/MetadataArgsStorage.js +225 -0
- package/lib-prod/typeorm/metadata-args/MetadataArgsStorage.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/NamingStrategyMetadataArgs.d.ts +13 -0
- package/lib-prod/typeorm/metadata-args/NamingStrategyMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/NamingStrategyMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/RelationCountMetadataArgs.d.ts +26 -0
- package/lib-prod/typeorm/metadata-args/RelationCountMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/RelationCountMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/RelationIdMetadataArgs.d.ts +26 -0
- package/lib-prod/typeorm/metadata-args/RelationIdMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/RelationIdMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/RelationMetadataArgs.d.ts +55 -0
- package/lib-prod/typeorm/metadata-args/RelationMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/RelationMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/TableMetadataArgs.d.ts +61 -0
- package/lib-prod/typeorm/metadata-args/TableMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/TableMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/TransactionEntityMetadataArgs.d.ts +17 -0
- package/lib-prod/typeorm/metadata-args/TransactionEntityMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/TransactionEntityMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/TransactionRepositoryMetadataArgs.d.ts +25 -0
- package/lib-prod/typeorm/metadata-args/TransactionRepositoryMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/TransactionRepositoryMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/TreeMetadataArgs.d.ts +19 -0
- package/lib-prod/typeorm/metadata-args/TreeMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/TreeMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/UniqueMetadataArgs.d.ts +24 -0
- package/lib-prod/typeorm/metadata-args/UniqueMetadataArgs.js +3 -0
- package/lib-prod/typeorm/metadata-args/UniqueMetadataArgs.js.map +1 -0
- package/lib-prod/typeorm/metadata-args/types/ColumnMode.d.ts +7 -0
- package/lib-prod/typeorm/metadata-args/types/ColumnMode.js +3 -0
- package/lib-prod/typeorm/metadata-args/types/ColumnMode.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.d.ts +14 -0
- package/lib-prod/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +145 -0
- package/lib-prod/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataBuilder.d.ts +57 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataBuilder.js +750 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataBuilder.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataValidator.d.ts +23 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataValidator.js +245 -0
- package/lib-prod/typeorm/metadata-builder/EntityMetadataValidator.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/JunctionEntityMetadataBuilder.d.ts +26 -0
- package/lib-prod/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +282 -0
- package/lib-prod/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/MetadataUtils.d.ts +23 -0
- package/lib-prod/typeorm/metadata-builder/MetadataUtils.js +43 -0
- package/lib-prod/typeorm/metadata-builder/MetadataUtils.js.map +1 -0
- package/lib-prod/typeorm/metadata-builder/RelationJoinColumnBuilder.d.ts +56 -0
- package/lib-prod/typeorm/metadata-builder/RelationJoinColumnBuilder.js +184 -0
- package/lib-prod/typeorm/metadata-builder/RelationJoinColumnBuilder.js.map +1 -0
- package/lib-prod/typeorm/migration/Migration.d.ts +24 -0
- package/lib-prod/typeorm/migration/Migration.js +39 -0
- package/lib-prod/typeorm/migration/Migration.js.map +1 -0
- package/lib-prod/typeorm/migration/MigrationExecutor.d.ts +99 -0
- package/lib-prod/typeorm/migration/MigrationExecutor.js +525 -0
- package/lib-prod/typeorm/migration/MigrationExecutor.js.map +1 -0
- package/lib-prod/typeorm/migration/MigrationInterface.d.ts +18 -0
- package/lib-prod/typeorm/migration/MigrationInterface.js +3 -0
- package/lib-prod/typeorm/migration/MigrationInterface.js.map +1 -0
- package/lib-prod/typeorm/naming-strategy/DefaultNamingStrategy.d.ts +49 -0
- package/lib-prod/typeorm/naming-strategy/DefaultNamingStrategy.js +145 -0
- package/lib-prod/typeorm/naming-strategy/DefaultNamingStrategy.js.map +1 -0
- package/lib-prod/typeorm/naming-strategy/NamingStrategyInterface.d.ts +116 -0
- package/lib-prod/typeorm/naming-strategy/NamingStrategyInterface.js +3 -0
- package/lib-prod/typeorm/naming-strategy/NamingStrategyInterface.js.map +1 -0
- package/lib-prod/typeorm/persistence/EntityPersistExecutor.d.ts +21 -0
- package/lib-prod/typeorm/persistence/EntityPersistExecutor.js +182 -0
- package/lib-prod/typeorm/persistence/EntityPersistExecutor.js.map +1 -0
- package/lib-prod/typeorm/persistence/Subject.d.ts +155 -0
- package/lib-prod/typeorm/persistence/Subject.js +275 -0
- package/lib-prod/typeorm/persistence/Subject.js.map +1 -0
- package/lib-prod/typeorm/persistence/SubjectChangeMap.d.ts +23 -0
- package/lib-prod/typeorm/persistence/SubjectChangeMap.js +3 -0
- package/lib-prod/typeorm/persistence/SubjectChangeMap.js.map +1 -0
- package/lib-prod/typeorm/persistence/SubjectChangedColumnsComputer.d.ts +18 -0
- package/lib-prod/typeorm/persistence/SubjectChangedColumnsComputer.js +209 -0
- package/lib-prod/typeorm/persistence/SubjectChangedColumnsComputer.js.map +1 -0
- package/lib-prod/typeorm/persistence/SubjectDatabaseEntityLoader.d.ts +35 -0
- package/lib-prod/typeorm/persistence/SubjectDatabaseEntityLoader.js +154 -0
- package/lib-prod/typeorm/persistence/SubjectDatabaseEntityLoader.js.map +1 -0
- package/lib-prod/typeorm/persistence/SubjectExecutor.d.ts +118 -0
- package/lib-prod/typeorm/persistence/SubjectExecutor.js +830 -0
- package/lib-prod/typeorm/persistence/SubjectExecutor.js.map +1 -0
- package/lib-prod/typeorm/persistence/SubjectTopoligicalSorter.d.ts +45 -0
- package/lib-prod/typeorm/persistence/SubjectTopoligicalSorter.js +185 -0
- package/lib-prod/typeorm/persistence/SubjectTopoligicalSorter.js.map +1 -0
- package/lib-prod/typeorm/persistence/subject-builder/CascadesSubjectBuilder.d.ts +19 -0
- package/lib-prod/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +107 -0
- package/lib-prod/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js.map +1 -0
- package/lib-prod/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.d.ts +34 -0
- package/lib-prod/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +214 -0
- package/lib-prod/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js.map +1 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToManySubjectBuilder.d.ts +27 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +181 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js.map +1 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.d.ts +27 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +155 -0
- package/lib-prod/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js.map +1 -0
- package/lib-prod/typeorm/persistence/tree/ClosureSubjectExecutor.d.ts +26 -0
- package/lib-prod/typeorm/persistence/tree/ClosureSubjectExecutor.js +241 -0
- package/lib-prod/typeorm/persistence/tree/ClosureSubjectExecutor.js.map +1 -0
- package/lib-prod/typeorm/persistence/tree/MaterializedPathSubjectExecutor.d.ts +18 -0
- package/lib-prod/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +110 -0
- package/lib-prod/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js.map +1 -0
- package/lib-prod/typeorm/persistence/tree/NestedSetSubjectExecutor.d.ts +38 -0
- package/lib-prod/typeorm/persistence/tree/NestedSetSubjectExecutor.js +273 -0
- package/lib-prod/typeorm/persistence/tree/NestedSetSubjectExecutor.js.map +1 -0
- package/lib-prod/typeorm/platform/PlatformTools.d.ts +67 -0
- package/lib-prod/typeorm/platform/PlatformTools.js +363 -0
- package/lib-prod/typeorm/platform/PlatformTools.js.map +1 -0
- package/lib-prod/typeorm/query-builder/Alias.d.ts +22 -0
- package/lib-prod/typeorm/query-builder/Alias.js +40 -0
- package/lib-prod/typeorm/query-builder/Alias.js.map +1 -0
- package/lib-prod/typeorm/query-builder/Brackets.d.ts +16 -0
- package/lib-prod/typeorm/query-builder/Brackets.js +22 -0
- package/lib-prod/typeorm/query-builder/Brackets.js.map +1 -0
- package/lib-prod/typeorm/query-builder/DeleteQueryBuilder.d.ts +91 -0
- package/lib-prod/typeorm/query-builder/DeleteQueryBuilder.js +210 -0
- package/lib-prod/typeorm/query-builder/DeleteQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/InsertOrUpdateOptions.d.ts +3 -0
- package/lib-prod/typeorm/query-builder/InsertOrUpdateOptions.js +3 -0
- package/lib-prod/typeorm/query-builder/InsertOrUpdateOptions.js.map +1 -0
- package/lib-prod/typeorm/query-builder/InsertQueryBuilder.d.ts +117 -0
- package/lib-prod/typeorm/query-builder/InsertQueryBuilder.js +746 -0
- package/lib-prod/typeorm/query-builder/InsertQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/JoinAttribute.d.ts +83 -0
- package/lib-prod/typeorm/query-builder/JoinAttribute.js +194 -0
- package/lib-prod/typeorm/query-builder/JoinAttribute.js.map +1 -0
- package/lib-prod/typeorm/query-builder/JoinOptions.d.ts +3 -0
- package/lib-prod/typeorm/query-builder/JoinOptions.js +3 -0
- package/lib-prod/typeorm/query-builder/JoinOptions.js.map +1 -0
- package/lib-prod/typeorm/query-builder/NotBrackets.d.ts +8 -0
- package/lib-prod/typeorm/query-builder/NotBrackets.js +13 -0
- package/lib-prod/typeorm/query-builder/NotBrackets.js.map +1 -0
- package/lib-prod/typeorm/query-builder/QueryBuilder.d.ts +267 -0
- package/lib-prod/typeorm/query-builder/QueryBuilder.js +1082 -0
- package/lib-prod/typeorm/query-builder/QueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderCte.d.ts +17 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderCte.js +3 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderCte.js.map +1 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderUtils.d.ts +10 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderUtils.js +31 -0
- package/lib-prod/typeorm/query-builder/QueryBuilderUtils.js.map +1 -0
- package/lib-prod/typeorm/query-builder/QueryExpressionMap.d.ts +305 -0
- package/lib-prod/typeorm/query-builder/QueryExpressionMap.js +410 -0
- package/lib-prod/typeorm/query-builder/QueryExpressionMap.js.map +1 -0
- package/lib-prod/typeorm/query-builder/QueryPartialEntity.d.ts +15 -0
- package/lib-prod/typeorm/query-builder/QueryPartialEntity.js +3 -0
- package/lib-prod/typeorm/query-builder/QueryPartialEntity.js.map +1 -0
- package/lib-prod/typeorm/query-builder/RelationIdLoader.d.ts +70 -0
- package/lib-prod/typeorm/query-builder/RelationIdLoader.js +501 -0
- package/lib-prod/typeorm/query-builder/RelationIdLoader.js.map +1 -0
- package/lib-prod/typeorm/query-builder/RelationLoader.d.ts +59 -0
- package/lib-prod/typeorm/query-builder/RelationLoader.js +282 -0
- package/lib-prod/typeorm/query-builder/RelationLoader.js.map +1 -0
- package/lib-prod/typeorm/query-builder/RelationQueryBuilder.d.ts +69 -0
- package/lib-prod/typeorm/query-builder/RelationQueryBuilder.js +164 -0
- package/lib-prod/typeorm/query-builder/RelationQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/RelationRemover.d.ts +16 -0
- package/lib-prod/typeorm/query-builder/RelationRemover.js +144 -0
- package/lib-prod/typeorm/query-builder/RelationRemover.js.map +1 -0
- package/lib-prod/typeorm/query-builder/RelationUpdater.d.ts +16 -0
- package/lib-prod/typeorm/query-builder/RelationUpdater.js +153 -0
- package/lib-prod/typeorm/query-builder/RelationUpdater.js.map +1 -0
- package/lib-prod/typeorm/query-builder/ReturningResultsEntityUpdator.d.ts +30 -0
- package/lib-prod/typeorm/query-builder/ReturningResultsEntityUpdator.js +169 -0
- package/lib-prod/typeorm/query-builder/ReturningResultsEntityUpdator.js.map +1 -0
- package/lib-prod/typeorm/query-builder/SelectQuery.d.ts +5 -0
- package/lib-prod/typeorm/query-builder/SelectQuery.js +3 -0
- package/lib-prod/typeorm/query-builder/SelectQuery.js.map +1 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilder.d.ts +669 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilder.js +2516 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilderOption.d.ts +1 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilderOption.js +3 -0
- package/lib-prod/typeorm/query-builder/SelectQueryBuilderOption.js.map +1 -0
- package/lib-prod/typeorm/query-builder/SoftDeleteQueryBuilder.d.ts +138 -0
- package/lib-prod/typeorm/query-builder/SoftDeleteQueryBuilder.js +381 -0
- package/lib-prod/typeorm/query-builder/SoftDeleteQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/UpdateQueryBuilder.d.ts +143 -0
- package/lib-prod/typeorm/query-builder/UpdateQueryBuilder.js +541 -0
- package/lib-prod/typeorm/query-builder/UpdateQueryBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/WhereClause.d.ts +16 -0
- package/lib-prod/typeorm/query-builder/WhereClause.js +3 -0
- package/lib-prod/typeorm/query-builder/WhereClause.js.map +1 -0
- package/lib-prod/typeorm/query-builder/WhereExpressionBuilder.d.ts +126 -0
- package/lib-prod/typeorm/query-builder/WhereExpressionBuilder.js +3 -0
- package/lib-prod/typeorm/query-builder/WhereExpressionBuilder.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountAttribute.d.ts +53 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountAttribute.js +96 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountAttribute.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoadResult.d.ts +8 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoadResult.js +3 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoadResult.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoader.d.ts +11 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoader.js +170 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountLoader.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.d.ts +7 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +55 -0
- package/lib-prod/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdAttribute.d.ts +64 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdAttribute.js +107 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdAttribute.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoadResult.d.ts +5 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoadResult.js +3 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoadResult.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoader.d.ts +11 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoader.js +277 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdLoader.js.map +1 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.d.ts +7 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +55 -0
- package/lib-prod/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-builder/result/DeleteResult.d.ts +16 -0
- package/lib-prod/typeorm/query-builder/result/DeleteResult.js +25 -0
- package/lib-prod/typeorm/query-builder/result/DeleteResult.js.map +1 -0
- package/lib-prod/typeorm/query-builder/result/InsertResult.d.ts +22 -0
- package/lib-prod/typeorm/query-builder/result/InsertResult.js +29 -0
- package/lib-prod/typeorm/query-builder/result/InsertResult.js.map +1 -0
- package/lib-prod/typeorm/query-builder/result/UpdateResult.d.ts +26 -0
- package/lib-prod/typeorm/query-builder/result/UpdateResult.js +35 -0
- package/lib-prod/typeorm/query-builder/result/UpdateResult.js.map +1 -0
- package/lib-prod/typeorm/query-builder/transformer/DocumentToEntityTransformer.d.ts +12 -0
- package/lib-prod/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +189 -0
- package/lib-prod/typeorm/query-builder/transformer/DocumentToEntityTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.d.ts +12 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +115 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.d.ts +14 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +88 -0
- package/lib-prod/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.d.ts +55 -0
- package/lib-prod/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +424 -0
- package/lib-prod/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -0
- package/lib-prod/typeorm/query-runner/BaseQueryRunner.d.ts +203 -0
- package/lib-prod/typeorm/query-runner/BaseQueryRunner.js +462 -0
- package/lib-prod/typeorm/query-runner/BaseQueryRunner.js.map +1 -0
- package/lib-prod/typeorm/query-runner/QueryLock.d.ts +4 -0
- package/lib-prod/typeorm/query-runner/QueryLock.js +25 -0
- package/lib-prod/typeorm/query-runner/QueryLock.js.map +1 -0
- package/lib-prod/typeorm/query-runner/QueryResult.d.ts +17 -0
- package/lib-prod/typeorm/query-runner/QueryResult.js +22 -0
- package/lib-prod/typeorm/query-runner/QueryResult.js.map +1 -0
- package/lib-prod/typeorm/query-runner/QueryRunner.d.ts +359 -0
- package/lib-prod/typeorm/query-runner/QueryRunner.js +3 -0
- package/lib-prod/typeorm/query-runner/QueryRunner.js.map +1 -0
- package/lib-prod/typeorm/relation-path.d.ts +6 -0
- package/lib-prod/typeorm/relation-path.js +3 -0
- package/lib-prod/typeorm/relation-path.js.map +1 -0
- package/lib-prod/typeorm/repository/AbstractRepository.d.ts +51 -0
- package/lib-prod/typeorm/repository/AbstractRepository.js +98 -0
- package/lib-prod/typeorm/repository/AbstractRepository.js.map +1 -0
- package/lib-prod/typeorm/repository/BaseEntity.d.ts +297 -0
- package/lib-prod/typeorm/repository/BaseEntity.js +298 -0
- package/lib-prod/typeorm/repository/BaseEntity.js.map +1 -0
- package/lib-prod/typeorm/repository/EntityId.d.ts +2 -0
- package/lib-prod/typeorm/repository/EntityId.js +3 -0
- package/lib-prod/typeorm/repository/EntityId.js.map +1 -0
- package/lib-prod/typeorm/repository/FindTreesOptions.d.ts +9 -0
- package/lib-prod/typeorm/repository/FindTreesOptions.js +3 -0
- package/lib-prod/typeorm/repository/FindTreesOptions.js.map +1 -0
- package/lib-prod/typeorm/repository/MongoRepository.d.ts +262 -0
- package/lib-prod/typeorm/repository/MongoRepository.js +336 -0
- package/lib-prod/typeorm/repository/MongoRepository.js.map +1 -0
- package/lib-prod/typeorm/repository/RemoveOptions.d.ts +27 -0
- package/lib-prod/typeorm/repository/RemoveOptions.js +3 -0
- package/lib-prod/typeorm/repository/RemoveOptions.js.map +1 -0
- package/lib-prod/typeorm/repository/Repository.d.ts +291 -0
- package/lib-prod/typeorm/repository/Repository.js +307 -0
- package/lib-prod/typeorm/repository/Repository.js.map +1 -0
- package/lib-prod/typeorm/repository/SaveOptions.d.ts +35 -0
- package/lib-prod/typeorm/repository/SaveOptions.js +3 -0
- package/lib-prod/typeorm/repository/SaveOptions.js.map +1 -0
- package/lib-prod/typeorm/repository/TreeRepository.d.ts +55 -0
- package/lib-prod/typeorm/repository/TreeRepository.js +265 -0
- package/lib-prod/typeorm/repository/TreeRepository.js.map +1 -0
- package/lib-prod/typeorm/repository/UpsertOptions.d.ts +10 -0
- package/lib-prod/typeorm/repository/UpsertOptions.js +3 -0
- package/lib-prod/typeorm/repository/UpsertOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/MongoSchemaBuilder.d.ts +29 -0
- package/lib-prod/typeorm/schema-builder/MongoSchemaBuilder.js +66 -0
- package/lib-prod/typeorm/schema-builder/MongoSchemaBuilder.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/RdbmsSchemaBuilder.d.ts +144 -0
- package/lib-prod/typeorm/schema-builder/RdbmsSchemaBuilder.js +847 -0
- package/lib-prod/typeorm/schema-builder/RdbmsSchemaBuilder.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/SchemaBuilder.d.ts +14 -0
- package/lib-prod/typeorm/schema-builder/SchemaBuilder.js +3 -0
- package/lib-prod/typeorm/schema-builder/SchemaBuilder.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableCheckOptions.d.ts +17 -0
- package/lib-prod/typeorm/schema-builder/options/TableCheckOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableCheckOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableColumnOptions.d.ts +122 -0
- package/lib-prod/typeorm/schema-builder/options/TableColumnOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableColumnOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableExclusionOptions.d.ts +13 -0
- package/lib-prod/typeorm/schema-builder/options/TableExclusionOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableExclusionOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableForeignKeyOptions.d.ts +44 -0
- package/lib-prod/typeorm/schema-builder/options/TableForeignKeyOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableForeignKeyOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableIndexOptions.d.ts +44 -0
- package/lib-prod/typeorm/schema-builder/options/TableIndexOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableIndexOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableOptions.d.ts +61 -0
- package/lib-prod/typeorm/schema-builder/options/TableOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/TableUniqueOptions.d.ts +18 -0
- package/lib-prod/typeorm/schema-builder/options/TableUniqueOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/TableUniqueOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/options/ViewOptions.d.ts +26 -0
- package/lib-prod/typeorm/schema-builder/options/ViewOptions.js +3 -0
- package/lib-prod/typeorm/schema-builder/options/ViewOptions.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/Table.d.ts +142 -0
- package/lib-prod/typeorm/schema-builder/table/Table.js +313 -0
- package/lib-prod/typeorm/schema-builder/table/Table.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableCheck.d.ts +29 -0
- package/lib-prod/typeorm/schema-builder/table/TableCheck.js +59 -0
- package/lib-prod/typeorm/schema-builder/table/TableCheck.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableColumn.d.ts +126 -0
- package/lib-prod/typeorm/schema-builder/table/TableColumn.js +199 -0
- package/lib-prod/typeorm/schema-builder/table/TableColumn.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableExclusion.d.ts +25 -0
- package/lib-prod/typeorm/schema-builder/table/TableExclusion.js +53 -0
- package/lib-prod/typeorm/schema-builder/table/TableExclusion.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableForeignKey.d.ts +57 -0
- package/lib-prod/typeorm/schema-builder/table/TableForeignKey.js +105 -0
- package/lib-prod/typeorm/schema-builder/table/TableForeignKey.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableIndex.d.ts +56 -0
- package/lib-prod/typeorm/schema-builder/table/TableIndex.js +102 -0
- package/lib-prod/typeorm/schema-builder/table/TableIndex.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/table/TableUnique.d.ts +30 -0
- package/lib-prod/typeorm/schema-builder/table/TableUnique.js +61 -0
- package/lib-prod/typeorm/schema-builder/table/TableUnique.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/util/TableUtils.d.ts +6 -0
- package/lib-prod/typeorm/schema-builder/util/TableUtils.js +40 -0
- package/lib-prod/typeorm/schema-builder/util/TableUtils.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/util/ViewUtils.d.ts +7 -0
- package/lib-prod/typeorm/schema-builder/util/ViewUtils.js +26 -0
- package/lib-prod/typeorm/schema-builder/util/ViewUtils.js.map +1 -0
- package/lib-prod/typeorm/schema-builder/view/View.d.ts +37 -0
- package/lib-prod/typeorm/schema-builder/view/View.js +77 -0
- package/lib-prod/typeorm/schema-builder/view/View.js.map +1 -0
- package/lib-prod/typeorm/subscriber/Broadcaster.d.ts +167 -0
- package/lib-prod/typeorm/subscriber/Broadcaster.js +613 -0
- package/lib-prod/typeorm/subscriber/Broadcaster.js.map +1 -0
- package/lib-prod/typeorm/subscriber/BroadcasterResult.d.ts +17 -0
- package/lib-prod/typeorm/subscriber/BroadcasterResult.js +27 -0
- package/lib-prod/typeorm/subscriber/BroadcasterResult.js.map +1 -0
- package/lib-prod/typeorm/subscriber/EntitySubscriberInterface.d.ts +92 -0
- package/lib-prod/typeorm/subscriber/EntitySubscriberInterface.js +3 -0
- package/lib-prod/typeorm/subscriber/EntitySubscriberInterface.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/InsertEvent.d.ts +31 -0
- package/lib-prod/typeorm/subscriber/event/InsertEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/InsertEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/LoadEvent.d.ts +31 -0
- package/lib-prod/typeorm/subscriber/event/LoadEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/LoadEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/RecoverEvent.d.ts +6 -0
- package/lib-prod/typeorm/subscriber/event/RecoverEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/RecoverEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/RemoveEvent.d.ts +40 -0
- package/lib-prod/typeorm/subscriber/event/RemoveEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/RemoveEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/SoftRemoveEvent.d.ts +6 -0
- package/lib-prod/typeorm/subscriber/event/SoftRemoveEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/SoftRemoveEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/TransactionCommitEvent.d.ts +22 -0
- package/lib-prod/typeorm/subscriber/event/TransactionCommitEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/TransactionCommitEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/TransactionRollbackEvent.d.ts +22 -0
- package/lib-prod/typeorm/subscriber/event/TransactionRollbackEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/TransactionRollbackEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/TransactionStartEvent.d.ts +22 -0
- package/lib-prod/typeorm/subscriber/event/TransactionStartEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/TransactionStartEvent.js.map +1 -0
- package/lib-prod/typeorm/subscriber/event/UpdateEvent.d.ts +46 -0
- package/lib-prod/typeorm/subscriber/event/UpdateEvent.js +3 -0
- package/lib-prod/typeorm/subscriber/event/UpdateEvent.js.map +1 -0
- package/lib-prod/typeorm/util/ApplyValueTransformers.d.ts +5 -0
- package/lib-prod/typeorm/util/ApplyValueTransformers.js +24 -0
- package/lib-prod/typeorm/util/ApplyValueTransformers.js.map +1 -0
- package/lib-prod/typeorm/util/DateUtils.d.ts +58 -0
- package/lib-prod/typeorm/util/DateUtils.js +225 -0
- package/lib-prod/typeorm/util/DateUtils.js.map +1 -0
- package/lib-prod/typeorm/util/DepGraph.d.ts +64 -0
- package/lib-prod/typeorm/util/DepGraph.js +227 -0
- package/lib-prod/typeorm/util/DepGraph.js.map +1 -0
- package/lib-prod/typeorm/util/DirectoryExportedClassesLoader.d.ts +9 -0
- package/lib-prod/typeorm/util/DirectoryExportedClassesLoader.js +70 -0
- package/lib-prod/typeorm/util/DirectoryExportedClassesLoader.js.map +1 -0
- package/lib-prod/typeorm/util/ImportUtils.d.ts +1 -0
- package/lib-prod/typeorm/util/ImportUtils.js +82 -0
- package/lib-prod/typeorm/util/ImportUtils.js.map +1 -0
- package/lib-prod/typeorm/util/InstanceChecker.d.ts +63 -0
- package/lib-prod/typeorm/util/InstanceChecker.js +116 -0
- package/lib-prod/typeorm/util/InstanceChecker.js.map +1 -0
- package/lib-prod/typeorm/util/ObjectUtils.d.ts +37 -0
- package/lib-prod/typeorm/util/ObjectUtils.js +40 -0
- package/lib-prod/typeorm/util/ObjectUtils.js.map +1 -0
- package/lib-prod/typeorm/util/OrmUtils.d.ts +52 -0
- package/lib-prod/typeorm/util/OrmUtils.js +347 -0
- package/lib-prod/typeorm/util/OrmUtils.js.map +1 -0
- package/lib-prod/typeorm/util/PathUtils.d.ts +10 -0
- package/lib-prod/typeorm/util/PathUtils.js +38 -0
- package/lib-prod/typeorm/util/PathUtils.js.map +1 -0
- package/lib-prod/typeorm/util/RandomGenerator.d.ts +15 -0
- package/lib-prod/typeorm/util/RandomGenerator.js +153 -0
- package/lib-prod/typeorm/util/RandomGenerator.js.map +1 -0
- package/lib-prod/typeorm/util/StringUtils.d.ts +63 -0
- package/lib-prod/typeorm/util/StringUtils.js +115 -0
- package/lib-prod/typeorm/util/StringUtils.js.map +1 -0
- package/lib-prod/typeorm/util/TreeRepositoryUtils.d.ts +23 -0
- package/lib-prod/typeorm/util/TreeRepositoryUtils.js +59 -0
- package/lib-prod/typeorm/util/TreeRepositoryUtils.js.map +1 -0
- package/lib-prod/typeorm/util/VersionUtils.d.ts +4 -0
- package/lib-prod/typeorm/util/VersionUtils.js +19 -0
- package/lib-prod/typeorm/util/VersionUtils.js.map +1 -0
- package/lib-prod/typeorm/util/escapeRegExp.d.ts +1 -0
- package/lib-prod/typeorm/util/escapeRegExp.js +9 -0
- package/lib-prod/typeorm/util/escapeRegExp.js.map +1 -0
- package/package.json +12 -4
- package/tmp-environment.json +43 -0
- package/websql/package.json +1 -1
- package/websql-prod/README.md +24 -0
- package/websql-prod/fesm2022/taon-typeorm-websql.mjs +30423 -0
- package/websql-prod/fesm2022/taon-typeorm-websql.mjs.map +1 -0
- package/websql-prod/types/taon-typeorm-websql.d.ts +12402 -0
|
@@ -0,0 +1,2516 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var SelectQueryBuilder_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SelectQueryBuilder = void 0;
|
|
11
|
+
const RawSqlResultsToEntityTransformer_1 = require("./transformer/RawSqlResultsToEntityTransformer");
|
|
12
|
+
const PessimisticLockTransactionRequiredError_1 = require("../error/PessimisticLockTransactionRequiredError");
|
|
13
|
+
const NoVersionOrUpdateDateColumnError_1 = require("../error/NoVersionOrUpdateDateColumnError");
|
|
14
|
+
const OptimisticLockVersionMismatchError_1 = require("../error/OptimisticLockVersionMismatchError");
|
|
15
|
+
const OptimisticLockCanNotBeUsedError_1 = require("../error/OptimisticLockCanNotBeUsedError");
|
|
16
|
+
const JoinAttribute_1 = require("./JoinAttribute");
|
|
17
|
+
const RelationIdAttribute_1 = require("./relation-id/RelationIdAttribute");
|
|
18
|
+
const RelationCountAttribute_1 = require("./relation-count/RelationCountAttribute");
|
|
19
|
+
const RelationIdLoader_1 = require("./relation-id/RelationIdLoader");
|
|
20
|
+
const RelationIdMetadataToAttributeTransformer_1 = require("./relation-id/RelationIdMetadataToAttributeTransformer");
|
|
21
|
+
const RelationCountLoader_1 = require("./relation-count/RelationCountLoader");
|
|
22
|
+
const RelationCountMetadataToAttributeTransformer_1 = require("./relation-count/RelationCountMetadataToAttributeTransformer");
|
|
23
|
+
const QueryBuilder_1 = require("./QueryBuilder");
|
|
24
|
+
//#endregion
|
|
25
|
+
const LockNotSupportedOnGivenDriverError_1 = require("../error/LockNotSupportedOnGivenDriverError");
|
|
26
|
+
const OffsetWithoutLimitNotSupportedError_1 = require("../error/OffsetWithoutLimitNotSupportedError");
|
|
27
|
+
const ObjectUtils_1 = require("../util/ObjectUtils");
|
|
28
|
+
const DriverUtils_1 = require("../driver/DriverUtils");
|
|
29
|
+
const EntityNotFoundError_1 = require("../error/EntityNotFoundError");
|
|
30
|
+
const error_1 = require("../error");
|
|
31
|
+
const FindOptionsUtils_1 = require("../find-options/FindOptionsUtils");
|
|
32
|
+
const ApplyValueTransformers_1 = require("../util/ApplyValueTransformers");
|
|
33
|
+
const OrmUtils_1 = require("../util/OrmUtils");
|
|
34
|
+
const EntityPropertyNotFoundError_1 = require("../error/EntityPropertyNotFoundError");
|
|
35
|
+
//#endregion
|
|
36
|
+
const InstanceChecker_1 = require("../util/InstanceChecker");
|
|
37
|
+
const lib_prod_1 = require("typescript-class-helpers/lib-prod");
|
|
38
|
+
/**
|
|
39
|
+
* Allows to build complex sql queries in a fashion way and execute those queries.
|
|
40
|
+
*/
|
|
41
|
+
let SelectQueryBuilder = SelectQueryBuilder_1 = class SelectQueryBuilder extends QueryBuilder_1.QueryBuilder {
|
|
42
|
+
"@instanceof" = Symbol.for("SelectQueryBuilder");
|
|
43
|
+
findOptions = {};
|
|
44
|
+
selects = [];
|
|
45
|
+
joins = [];
|
|
46
|
+
conditions = "";
|
|
47
|
+
orderBys = [];
|
|
48
|
+
relationMetadatas = [];
|
|
49
|
+
// -------------------------------------------------------------------------
|
|
50
|
+
// Public Implemented Methods
|
|
51
|
+
// -------------------------------------------------------------------------
|
|
52
|
+
/**
|
|
53
|
+
* Gets generated SQL query without parameters being replaced.
|
|
54
|
+
*/
|
|
55
|
+
getQuery() {
|
|
56
|
+
let sql = this.createComment();
|
|
57
|
+
sql += this.createCteExpression();
|
|
58
|
+
sql += this.createSelectExpression();
|
|
59
|
+
sql += this.createJoinExpression();
|
|
60
|
+
sql += this.createWhereExpression();
|
|
61
|
+
sql += this.createGroupByExpression();
|
|
62
|
+
sql += this.createHavingExpression();
|
|
63
|
+
sql += this.createOrderByExpression();
|
|
64
|
+
sql += this.createLimitOffsetExpression();
|
|
65
|
+
sql += this.createLockExpression();
|
|
66
|
+
sql = sql.trim();
|
|
67
|
+
if (this.expressionMap.subQuery)
|
|
68
|
+
sql = "(" + sql + ")";
|
|
69
|
+
return sql;
|
|
70
|
+
}
|
|
71
|
+
// -------------------------------------------------------------------------
|
|
72
|
+
// Public Methods
|
|
73
|
+
// -------------------------------------------------------------------------
|
|
74
|
+
setFindOptions(findOptions) {
|
|
75
|
+
this.findOptions = findOptions;
|
|
76
|
+
this.applyFindOptions();
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Creates a subquery - query that can be used inside other queries.
|
|
81
|
+
*/
|
|
82
|
+
subQuery() {
|
|
83
|
+
const qb = this.createQueryBuilder();
|
|
84
|
+
qb.expressionMap.subQuery = true;
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
qb.parentQueryBuilder = this;
|
|
87
|
+
return qb;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Creates SELECT query and selects given data.
|
|
91
|
+
* Replaces all previous selections if they exist.
|
|
92
|
+
*/
|
|
93
|
+
select(selection, selectionAliasName) {
|
|
94
|
+
this.expressionMap.queryType = "select";
|
|
95
|
+
if (Array.isArray(selection)) {
|
|
96
|
+
this.expressionMap.selects = selection.map((selection) => ({
|
|
97
|
+
selection: selection,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
else if (typeof selection === "function") {
|
|
101
|
+
const subQueryBuilder = selection(this.subQuery());
|
|
102
|
+
this.setParameters(subQueryBuilder.getParameters());
|
|
103
|
+
this.expressionMap.selects.push({
|
|
104
|
+
selection: subQueryBuilder.getQuery(),
|
|
105
|
+
aliasName: selectionAliasName,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
else if (selection) {
|
|
109
|
+
this.expressionMap.selects = [
|
|
110
|
+
{ selection: selection, aliasName: selectionAliasName },
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Adds new selection to the SELECT query.
|
|
117
|
+
*/
|
|
118
|
+
addSelect(selection, selectionAliasName) {
|
|
119
|
+
if (!selection)
|
|
120
|
+
return this;
|
|
121
|
+
if (Array.isArray(selection)) {
|
|
122
|
+
this.expressionMap.selects = this.expressionMap.selects.concat(selection.map((selection) => ({ selection: selection })));
|
|
123
|
+
}
|
|
124
|
+
else if (typeof selection === "function") {
|
|
125
|
+
const subQueryBuilder = selection(this.subQuery());
|
|
126
|
+
this.setParameters(subQueryBuilder.getParameters());
|
|
127
|
+
this.expressionMap.selects.push({
|
|
128
|
+
selection: subQueryBuilder.getQuery(),
|
|
129
|
+
aliasName: selectionAliasName,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else if (selection) {
|
|
133
|
+
this.expressionMap.selects.push({
|
|
134
|
+
selection: selection,
|
|
135
|
+
aliasName: selectionAliasName,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Set max execution time.
|
|
142
|
+
* @param milliseconds
|
|
143
|
+
*/
|
|
144
|
+
maxExecutionTime(milliseconds) {
|
|
145
|
+
this.expressionMap.maxExecutionTime = milliseconds;
|
|
146
|
+
return this;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Sets whether the selection is DISTINCT.
|
|
150
|
+
*/
|
|
151
|
+
distinct(distinct = true) {
|
|
152
|
+
this.expressionMap.selectDistinct = distinct;
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Sets the distinct on clause for Postgres.
|
|
157
|
+
*/
|
|
158
|
+
distinctOn(distinctOn) {
|
|
159
|
+
this.expressionMap.selectDistinctOn = distinctOn;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Specifies FROM which entity's table select/update/delete will be executed.
|
|
164
|
+
* Also sets a main string alias of the selection data.
|
|
165
|
+
* Removes all previously set from-s.
|
|
166
|
+
*/
|
|
167
|
+
from(entityTarget, aliasName) {
|
|
168
|
+
const mainAlias = this.createFromAlias(entityTarget, aliasName);
|
|
169
|
+
this.expressionMap.setMainAlias(mainAlias);
|
|
170
|
+
return this;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Specifies FROM which entity's table select/update/delete will be executed.
|
|
174
|
+
* Also sets a main string alias of the selection data.
|
|
175
|
+
*/
|
|
176
|
+
addFrom(entityTarget, aliasName) {
|
|
177
|
+
const alias = this.createFromAlias(entityTarget, aliasName);
|
|
178
|
+
if (!this.expressionMap.mainAlias)
|
|
179
|
+
this.expressionMap.setMainAlias(alias);
|
|
180
|
+
return this;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* INNER JOINs (without selection).
|
|
184
|
+
* You also need to specify an alias of the joined data.
|
|
185
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
186
|
+
*/
|
|
187
|
+
innerJoin(entityOrProperty, alias, condition, parameters) {
|
|
188
|
+
this.join("INNER", entityOrProperty, alias, condition, parameters);
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* LEFT JOINs (without selection).
|
|
193
|
+
* You also need to specify an alias of the joined data.
|
|
194
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
195
|
+
*/
|
|
196
|
+
leftJoin(entityOrProperty, alias, condition, parameters) {
|
|
197
|
+
this.join("LEFT", entityOrProperty, alias, condition, parameters);
|
|
198
|
+
return this;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* INNER JOINs and adds all selection properties to SELECT.
|
|
202
|
+
* You also need to specify an alias of the joined data.
|
|
203
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
204
|
+
*/
|
|
205
|
+
innerJoinAndSelect(entityOrProperty, alias, condition, parameters) {
|
|
206
|
+
this.addSelect(alias);
|
|
207
|
+
this.innerJoin(entityOrProperty, alias, condition, parameters);
|
|
208
|
+
return this;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* LEFT JOINs and adds all selection properties to SELECT.
|
|
212
|
+
* You also need to specify an alias of the joined data.
|
|
213
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
214
|
+
*/
|
|
215
|
+
leftJoinAndSelect(entityOrProperty, alias, condition, parameters) {
|
|
216
|
+
this.addSelect(alias);
|
|
217
|
+
this.leftJoin(entityOrProperty, alias, condition, parameters);
|
|
218
|
+
return this;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* INNER JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property.
|
|
222
|
+
* This is extremely useful when you want to select some data and map it to some virtual property.
|
|
223
|
+
* It will assume that there are multiple rows of selecting data, and mapped result will be an array.
|
|
224
|
+
* You also need to specify an alias of the joined data.
|
|
225
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
226
|
+
*/
|
|
227
|
+
innerJoinAndMapMany(mapToProperty, entityOrProperty, alias, condition, parameters) {
|
|
228
|
+
this.addSelect(alias);
|
|
229
|
+
this.join("INNER", entityOrProperty, alias, condition, parameters, mapToProperty, true);
|
|
230
|
+
return this;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* INNER JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property.
|
|
234
|
+
* This is extremely useful when you want to select some data and map it to some virtual property.
|
|
235
|
+
* It will assume that there is a single row of selecting data, and mapped result will be a single selected value.
|
|
236
|
+
* You also need to specify an alias of the joined data.
|
|
237
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
238
|
+
*/
|
|
239
|
+
innerJoinAndMapOne(mapToProperty, entityOrProperty, alias, condition, parameters) {
|
|
240
|
+
this.addSelect(alias);
|
|
241
|
+
this.join("INNER", entityOrProperty, alias, condition, parameters, mapToProperty, false);
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* LEFT JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property.
|
|
246
|
+
* This is extremely useful when you want to select some data and map it to some virtual property.
|
|
247
|
+
* It will assume that there are multiple rows of selecting data, and mapped result will be an array.
|
|
248
|
+
* You also need to specify an alias of the joined data.
|
|
249
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
250
|
+
*/
|
|
251
|
+
leftJoinAndMapMany(mapToProperty, entityOrProperty, alias, condition, parameters) {
|
|
252
|
+
this.addSelect(alias);
|
|
253
|
+
this.join("LEFT", entityOrProperty, alias, condition, parameters, mapToProperty, true);
|
|
254
|
+
return this;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* LEFT JOINs, SELECTs the data returned by a join and MAPs all that data to some entity's property.
|
|
258
|
+
* This is extremely useful when you want to select some data and map it to some virtual property.
|
|
259
|
+
* It will assume that there is a single row of selecting data, and mapped result will be a single selected value.
|
|
260
|
+
* You also need to specify an alias of the joined data.
|
|
261
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
262
|
+
*/
|
|
263
|
+
leftJoinAndMapOne(mapToProperty, entityOrProperty, alias, condition, parameters) {
|
|
264
|
+
this.addSelect(alias);
|
|
265
|
+
this.join("LEFT", entityOrProperty, alias, condition, parameters, mapToProperty, false);
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* LEFT JOINs relation id and maps it into some entity's property.
|
|
270
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
271
|
+
*/
|
|
272
|
+
loadRelationIdAndMap(mapToProperty, relationName, aliasNameOrOptions, queryBuilderFactory) {
|
|
273
|
+
const relationIdAttribute = new RelationIdAttribute_1.RelationIdAttribute(this.expressionMap);
|
|
274
|
+
relationIdAttribute.mapToProperty = mapToProperty;
|
|
275
|
+
relationIdAttribute.relationName = relationName;
|
|
276
|
+
if (typeof aliasNameOrOptions === "string")
|
|
277
|
+
relationIdAttribute.alias = aliasNameOrOptions;
|
|
278
|
+
if (typeof aliasNameOrOptions === "object" &&
|
|
279
|
+
aliasNameOrOptions.disableMixedMap)
|
|
280
|
+
relationIdAttribute.disableMixedMap = true;
|
|
281
|
+
relationIdAttribute.queryBuilderFactory = queryBuilderFactory;
|
|
282
|
+
this.expressionMap.relationIdAttributes.push(relationIdAttribute);
|
|
283
|
+
if (relationIdAttribute.relation.junctionEntityMetadata) {
|
|
284
|
+
this.expressionMap.createAlias({
|
|
285
|
+
type: "other",
|
|
286
|
+
name: relationIdAttribute.junctionAlias,
|
|
287
|
+
metadata: relationIdAttribute.relation.junctionEntityMetadata,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return this;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Counts number of entities of entity's relation and maps the value into some entity's property.
|
|
294
|
+
* Optionally, you can add condition and parameters used in condition.
|
|
295
|
+
*/
|
|
296
|
+
loadRelationCountAndMap(mapToProperty, relationName, aliasName, queryBuilderFactory) {
|
|
297
|
+
const relationCountAttribute = new RelationCountAttribute_1.RelationCountAttribute(this.expressionMap);
|
|
298
|
+
relationCountAttribute.mapToProperty = mapToProperty;
|
|
299
|
+
relationCountAttribute.relationName = relationName;
|
|
300
|
+
relationCountAttribute.alias = aliasName;
|
|
301
|
+
relationCountAttribute.queryBuilderFactory = queryBuilderFactory;
|
|
302
|
+
this.expressionMap.relationCountAttributes.push(relationCountAttribute);
|
|
303
|
+
this.expressionMap.createAlias({
|
|
304
|
+
type: "other",
|
|
305
|
+
name: relationCountAttribute.junctionAlias,
|
|
306
|
+
});
|
|
307
|
+
if (relationCountAttribute.relation.junctionEntityMetadata) {
|
|
308
|
+
this.expressionMap.createAlias({
|
|
309
|
+
type: "other",
|
|
310
|
+
name: relationCountAttribute.junctionAlias,
|
|
311
|
+
metadata: relationCountAttribute.relation.junctionEntityMetadata,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
return this;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Loads all relation ids for all relations of the selected entity.
|
|
318
|
+
* All relation ids will be mapped to relation property themself.
|
|
319
|
+
* If array of strings is given then loads only relation ids of the given properties.
|
|
320
|
+
*/
|
|
321
|
+
loadAllRelationIds(options) {
|
|
322
|
+
// todo: add skip relations
|
|
323
|
+
this.expressionMap.mainAlias.metadata.relations.forEach((relation) => {
|
|
324
|
+
if (options !== undefined &&
|
|
325
|
+
options.relations !== undefined &&
|
|
326
|
+
options.relations.indexOf(relation.propertyPath) === -1)
|
|
327
|
+
return;
|
|
328
|
+
this.loadRelationIdAndMap(this.expressionMap.mainAlias.name +
|
|
329
|
+
"." +
|
|
330
|
+
relation.propertyPath, this.expressionMap.mainAlias.name +
|
|
331
|
+
"." +
|
|
332
|
+
relation.propertyPath, options);
|
|
333
|
+
});
|
|
334
|
+
return this;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Sets WHERE condition in the query builder.
|
|
338
|
+
* If you had previously WHERE expression defined,
|
|
339
|
+
* calling this function will override previously set WHERE conditions.
|
|
340
|
+
* Additionally you can add parameters used in where expression.
|
|
341
|
+
*/
|
|
342
|
+
where(where, parameters) {
|
|
343
|
+
this.expressionMap.wheres = []; // don't move this block below since computeWhereParameter can add where expressions
|
|
344
|
+
const condition = this.getWhereCondition(where);
|
|
345
|
+
if (condition)
|
|
346
|
+
this.expressionMap.wheres = [
|
|
347
|
+
{ type: "simple", condition: condition },
|
|
348
|
+
];
|
|
349
|
+
if (parameters)
|
|
350
|
+
this.setParameters(parameters);
|
|
351
|
+
return this;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Adds new AND WHERE condition in the query builder.
|
|
355
|
+
* Additionally you can add parameters used in where expression.
|
|
356
|
+
*/
|
|
357
|
+
andWhere(where, parameters) {
|
|
358
|
+
this.expressionMap.wheres.push({
|
|
359
|
+
type: "and",
|
|
360
|
+
condition: this.getWhereCondition(where),
|
|
361
|
+
});
|
|
362
|
+
if (parameters)
|
|
363
|
+
this.setParameters(parameters);
|
|
364
|
+
return this;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Adds new OR WHERE condition in the query builder.
|
|
368
|
+
* Additionally you can add parameters used in where expression.
|
|
369
|
+
*/
|
|
370
|
+
orWhere(where, parameters) {
|
|
371
|
+
this.expressionMap.wheres.push({
|
|
372
|
+
type: "or",
|
|
373
|
+
condition: this.getWhereCondition(where),
|
|
374
|
+
});
|
|
375
|
+
if (parameters)
|
|
376
|
+
this.setParameters(parameters);
|
|
377
|
+
return this;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Adds new AND WHERE with conditions for the given ids.
|
|
381
|
+
*
|
|
382
|
+
* Ids are mixed.
|
|
383
|
+
* It means if you have single primary key you can pass a simple id values, for example [1, 2, 3].
|
|
384
|
+
* If you have multiple primary keys you need to pass object with property names and values specified,
|
|
385
|
+
* for example [{ firstId: 1, secondId: 2 }, { firstId: 2, secondId: 3 }, ...]
|
|
386
|
+
*/
|
|
387
|
+
whereInIds(ids) {
|
|
388
|
+
return this.where(this.getWhereInIdsCondition(ids));
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Adds new AND WHERE with conditions for the given ids.
|
|
392
|
+
*
|
|
393
|
+
* Ids are mixed.
|
|
394
|
+
* It means if you have single primary key you can pass a simple id values, for example [1, 2, 3].
|
|
395
|
+
* If you have multiple primary keys you need to pass object with property names and values specified,
|
|
396
|
+
* for example [{ firstId: 1, secondId: 2 }, { firstId: 2, secondId: 3 }, ...]
|
|
397
|
+
*/
|
|
398
|
+
andWhereInIds(ids) {
|
|
399
|
+
return this.andWhere(this.getWhereInIdsCondition(ids));
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Adds new OR WHERE with conditions for the given ids.
|
|
403
|
+
*
|
|
404
|
+
* Ids are mixed.
|
|
405
|
+
* It means if you have single primary key you can pass a simple id values, for example [1, 2, 3].
|
|
406
|
+
* If you have multiple primary keys you need to pass object with property names and values specified,
|
|
407
|
+
* for example [{ firstId: 1, secondId: 2 }, { firstId: 2, secondId: 3 }, ...]
|
|
408
|
+
*/
|
|
409
|
+
orWhereInIds(ids) {
|
|
410
|
+
return this.orWhere(this.getWhereInIdsCondition(ids));
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Sets HAVING condition in the query builder.
|
|
414
|
+
* If you had previously HAVING expression defined,
|
|
415
|
+
* calling this function will override previously set HAVING conditions.
|
|
416
|
+
* Additionally you can add parameters used in where expression.
|
|
417
|
+
*/
|
|
418
|
+
having(having, parameters) {
|
|
419
|
+
this.expressionMap.havings.push({ type: "simple", condition: having });
|
|
420
|
+
if (parameters)
|
|
421
|
+
this.setParameters(parameters);
|
|
422
|
+
return this;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Adds new AND HAVING condition in the query builder.
|
|
426
|
+
* Additionally you can add parameters used in where expression.
|
|
427
|
+
*/
|
|
428
|
+
andHaving(having, parameters) {
|
|
429
|
+
this.expressionMap.havings.push({ type: "and", condition: having });
|
|
430
|
+
if (parameters)
|
|
431
|
+
this.setParameters(parameters);
|
|
432
|
+
return this;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Adds new OR HAVING condition in the query builder.
|
|
436
|
+
* Additionally you can add parameters used in where expression.
|
|
437
|
+
*/
|
|
438
|
+
orHaving(having, parameters) {
|
|
439
|
+
this.expressionMap.havings.push({ type: "or", condition: having });
|
|
440
|
+
if (parameters)
|
|
441
|
+
this.setParameters(parameters);
|
|
442
|
+
return this;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Sets GROUP BY condition in the query builder.
|
|
446
|
+
* If you had previously GROUP BY expression defined,
|
|
447
|
+
* calling this function will override previously set GROUP BY conditions.
|
|
448
|
+
*/
|
|
449
|
+
groupBy(groupBy) {
|
|
450
|
+
if (groupBy) {
|
|
451
|
+
this.expressionMap.groupBys = [groupBy];
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
this.expressionMap.groupBys = [];
|
|
455
|
+
}
|
|
456
|
+
return this;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Adds GROUP BY condition in the query builder.
|
|
460
|
+
*/
|
|
461
|
+
addGroupBy(groupBy) {
|
|
462
|
+
this.expressionMap.groupBys.push(groupBy);
|
|
463
|
+
return this;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Sets ORDER BY condition in the query builder.
|
|
467
|
+
* If you had previously ORDER BY expression defined,
|
|
468
|
+
* calling this function will override previously set ORDER BY conditions.
|
|
469
|
+
*/
|
|
470
|
+
orderBy(sort, order = "ASC", nulls) {
|
|
471
|
+
if (order !== undefined && order !== "ASC" && order !== "DESC")
|
|
472
|
+
throw new error_1.TypeORMError(`SelectQueryBuilder.addOrderBy "order" can accept only "ASC" and "DESC" values.`);
|
|
473
|
+
if (nulls !== undefined &&
|
|
474
|
+
nulls !== "NULLS FIRST" &&
|
|
475
|
+
nulls !== "NULLS LAST")
|
|
476
|
+
throw new error_1.TypeORMError(`SelectQueryBuilder.addOrderBy "nulls" can accept only "NULLS FIRST" and "NULLS LAST" values.`);
|
|
477
|
+
if (sort) {
|
|
478
|
+
if (typeof sort === "object") {
|
|
479
|
+
this.expressionMap.orderBys = sort;
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
if (nulls) {
|
|
483
|
+
this.expressionMap.orderBys = {
|
|
484
|
+
[sort]: { order, nulls },
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
this.expressionMap.orderBys = { [sort]: order };
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
this.expressionMap.orderBys = {};
|
|
494
|
+
}
|
|
495
|
+
return this;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Adds ORDER BY condition in the query builder.
|
|
499
|
+
*/
|
|
500
|
+
addOrderBy(sort, order = "ASC", nulls) {
|
|
501
|
+
if (order !== undefined && order !== "ASC" && order !== "DESC")
|
|
502
|
+
throw new error_1.TypeORMError(`SelectQueryBuilder.addOrderBy "order" can accept only "ASC" and "DESC" values.`);
|
|
503
|
+
if (nulls !== undefined &&
|
|
504
|
+
nulls !== "NULLS FIRST" &&
|
|
505
|
+
nulls !== "NULLS LAST")
|
|
506
|
+
throw new error_1.TypeORMError(`SelectQueryBuilder.addOrderBy "nulls" can accept only "NULLS FIRST" and "NULLS LAST" values.`);
|
|
507
|
+
if (nulls) {
|
|
508
|
+
this.expressionMap.orderBys[sort] = { order, nulls };
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
this.expressionMap.orderBys[sort] = order;
|
|
512
|
+
}
|
|
513
|
+
return this;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Set's LIMIT - maximum number of rows to be selected.
|
|
517
|
+
* NOTE that it may not work as you expect if you are using joins.
|
|
518
|
+
* If you want to implement pagination, and you are having join in your query,
|
|
519
|
+
* then use instead take method instead.
|
|
520
|
+
*/
|
|
521
|
+
limit(limit) {
|
|
522
|
+
this.expressionMap.limit = this.normalizeNumber(limit);
|
|
523
|
+
if (this.expressionMap.limit !== undefined &&
|
|
524
|
+
isNaN(this.expressionMap.limit))
|
|
525
|
+
throw new error_1.TypeORMError(`Provided "limit" value is not a number. Please provide a numeric value.`);
|
|
526
|
+
return this;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Set's OFFSET - selection offset.
|
|
530
|
+
* NOTE that it may not work as you expect if you are using joins.
|
|
531
|
+
* If you want to implement pagination, and you are having join in your query,
|
|
532
|
+
* then use instead skip method instead.
|
|
533
|
+
*/
|
|
534
|
+
offset(offset) {
|
|
535
|
+
this.expressionMap.offset = this.normalizeNumber(offset);
|
|
536
|
+
if (this.expressionMap.offset !== undefined &&
|
|
537
|
+
isNaN(this.expressionMap.offset))
|
|
538
|
+
throw new error_1.TypeORMError(`Provided "offset" value is not a number. Please provide a numeric value.`);
|
|
539
|
+
return this;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Sets maximal number of entities to take.
|
|
543
|
+
*/
|
|
544
|
+
take(take) {
|
|
545
|
+
this.expressionMap.take = this.normalizeNumber(take);
|
|
546
|
+
if (this.expressionMap.take !== undefined &&
|
|
547
|
+
isNaN(this.expressionMap.take))
|
|
548
|
+
throw new error_1.TypeORMError(`Provided "take" value is not a number. Please provide a numeric value.`);
|
|
549
|
+
return this;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Sets number of entities to skip.
|
|
553
|
+
*/
|
|
554
|
+
skip(skip) {
|
|
555
|
+
this.expressionMap.skip = this.normalizeNumber(skip);
|
|
556
|
+
if (this.expressionMap.skip !== undefined &&
|
|
557
|
+
isNaN(this.expressionMap.skip))
|
|
558
|
+
throw new error_1.TypeORMError(`Provided "skip" value is not a number. Please provide a numeric value.`);
|
|
559
|
+
return this;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Set certain index to be used by the query.
|
|
563
|
+
*
|
|
564
|
+
* @param index Name of index to be used.
|
|
565
|
+
*/
|
|
566
|
+
useIndex(index) {
|
|
567
|
+
this.expressionMap.useIndex = index;
|
|
568
|
+
return this;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Sets locking mode.
|
|
572
|
+
*/
|
|
573
|
+
setLock(lockMode, lockVersion, lockTables) {
|
|
574
|
+
this.expressionMap.lockMode = lockMode;
|
|
575
|
+
this.expressionMap.lockVersion = lockVersion;
|
|
576
|
+
this.expressionMap.lockTables = lockTables;
|
|
577
|
+
return this;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Sets lock handling by adding NO WAIT or SKIP LOCKED.
|
|
581
|
+
*/
|
|
582
|
+
setOnLocked(onLocked) {
|
|
583
|
+
this.expressionMap.onLocked = onLocked;
|
|
584
|
+
return this;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Disables the global condition of "non-deleted" for the entity with delete date columns.
|
|
588
|
+
*/
|
|
589
|
+
withDeleted() {
|
|
590
|
+
this.expressionMap.withDeleted = true;
|
|
591
|
+
return this;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Gets first raw result returned by execution of generated query builder sql.
|
|
595
|
+
*/
|
|
596
|
+
async getRawOne() {
|
|
597
|
+
return (await this.getRawMany())[0];
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Gets all raw results returned by execution of generated query builder sql.
|
|
601
|
+
*/
|
|
602
|
+
async getRawMany() {
|
|
603
|
+
if (this.expressionMap.lockMode === "optimistic")
|
|
604
|
+
throw new OptimisticLockCanNotBeUsedError_1.OptimisticLockCanNotBeUsedError();
|
|
605
|
+
this.expressionMap.queryEntity = false;
|
|
606
|
+
const queryRunner = this.obtainQueryRunner();
|
|
607
|
+
let transactionStartedByUs = false;
|
|
608
|
+
try {
|
|
609
|
+
// start transaction if it was enabled
|
|
610
|
+
if (this.expressionMap.useTransaction === true &&
|
|
611
|
+
queryRunner.isTransactionActive === false) {
|
|
612
|
+
await queryRunner.startTransaction();
|
|
613
|
+
transactionStartedByUs = true;
|
|
614
|
+
}
|
|
615
|
+
const results = await this.loadRawResults(queryRunner);
|
|
616
|
+
// close transaction if we started it
|
|
617
|
+
if (transactionStartedByUs) {
|
|
618
|
+
await queryRunner.commitTransaction();
|
|
619
|
+
}
|
|
620
|
+
return results;
|
|
621
|
+
}
|
|
622
|
+
catch (error) {
|
|
623
|
+
// rollback transaction if we started it
|
|
624
|
+
if (transactionStartedByUs) {
|
|
625
|
+
try {
|
|
626
|
+
await queryRunner.rollbackTransaction();
|
|
627
|
+
}
|
|
628
|
+
catch (rollbackError) { }
|
|
629
|
+
}
|
|
630
|
+
throw error;
|
|
631
|
+
}
|
|
632
|
+
finally {
|
|
633
|
+
if (queryRunner !== this.queryRunner) {
|
|
634
|
+
// means we created our own query runner
|
|
635
|
+
await queryRunner.release();
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Executes sql generated by query builder and returns object with raw results and entities created from them.
|
|
641
|
+
*/
|
|
642
|
+
async getRawAndEntities() {
|
|
643
|
+
const queryRunner = this.obtainQueryRunner();
|
|
644
|
+
let transactionStartedByUs = false;
|
|
645
|
+
try {
|
|
646
|
+
// start transaction if it was enabled
|
|
647
|
+
if (this.expressionMap.useTransaction === true &&
|
|
648
|
+
queryRunner.isTransactionActive === false) {
|
|
649
|
+
await queryRunner.startTransaction();
|
|
650
|
+
transactionStartedByUs = true;
|
|
651
|
+
}
|
|
652
|
+
this.expressionMap.queryEntity = true;
|
|
653
|
+
const results = await this.executeEntitiesAndRawResults(queryRunner);
|
|
654
|
+
// close transaction if we started it
|
|
655
|
+
if (transactionStartedByUs) {
|
|
656
|
+
await queryRunner.commitTransaction();
|
|
657
|
+
}
|
|
658
|
+
return results;
|
|
659
|
+
}
|
|
660
|
+
catch (error) {
|
|
661
|
+
// rollback transaction if we started it
|
|
662
|
+
if (transactionStartedByUs) {
|
|
663
|
+
try {
|
|
664
|
+
await queryRunner.rollbackTransaction();
|
|
665
|
+
}
|
|
666
|
+
catch (rollbackError) { }
|
|
667
|
+
}
|
|
668
|
+
throw error;
|
|
669
|
+
}
|
|
670
|
+
finally {
|
|
671
|
+
if (queryRunner !== this.queryRunner)
|
|
672
|
+
// means we created our own query runner
|
|
673
|
+
await queryRunner.release();
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Gets single entity returned by execution of generated query builder sql.
|
|
678
|
+
*/
|
|
679
|
+
async getOne() {
|
|
680
|
+
const results = await this.getRawAndEntities();
|
|
681
|
+
const result = results.entities[0];
|
|
682
|
+
if (result &&
|
|
683
|
+
this.expressionMap.lockMode === "optimistic" &&
|
|
684
|
+
this.expressionMap.lockVersion) {
|
|
685
|
+
const metadata = this.expressionMap.mainAlias.metadata;
|
|
686
|
+
if (this.expressionMap.lockVersion instanceof Date) {
|
|
687
|
+
const actualVersion = metadata.updateDateColumn.getEntityValue(result); // what if columns arent set?
|
|
688
|
+
if (actualVersion.getTime() !==
|
|
689
|
+
this.expressionMap.lockVersion.getTime())
|
|
690
|
+
throw new OptimisticLockVersionMismatchError_1.OptimisticLockVersionMismatchError(metadata.name, this.expressionMap.lockVersion, actualVersion);
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
const actualVersion = metadata.versionColumn.getEntityValue(result); // what if columns arent set?
|
|
694
|
+
if (actualVersion !== this.expressionMap.lockVersion)
|
|
695
|
+
throw new OptimisticLockVersionMismatchError_1.OptimisticLockVersionMismatchError(metadata.name, this.expressionMap.lockVersion, actualVersion);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
if (result === undefined) {
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
701
|
+
return result;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Gets the first entity returned by execution of generated query builder sql or rejects the returned promise on error.
|
|
705
|
+
*/
|
|
706
|
+
async getOneOrFail() {
|
|
707
|
+
const entity = await this.getOne();
|
|
708
|
+
if (!entity) {
|
|
709
|
+
throw new EntityNotFoundError_1.EntityNotFoundError(this.expressionMap.mainAlias.target, this);
|
|
710
|
+
}
|
|
711
|
+
return entity;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Gets entities returned by execution of generated query builder sql.
|
|
715
|
+
*/
|
|
716
|
+
async getMany() {
|
|
717
|
+
if (this.expressionMap.lockMode === "optimistic")
|
|
718
|
+
throw new OptimisticLockCanNotBeUsedError_1.OptimisticLockCanNotBeUsedError();
|
|
719
|
+
const results = await this.getRawAndEntities();
|
|
720
|
+
return results.entities;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Gets count - number of entities selected by sql generated by this query builder.
|
|
724
|
+
* Count excludes all limitations set by setFirstResult and setMaxResults methods call.
|
|
725
|
+
*/
|
|
726
|
+
async getCount() {
|
|
727
|
+
if (this.expressionMap.lockMode === "optimistic")
|
|
728
|
+
throw new OptimisticLockCanNotBeUsedError_1.OptimisticLockCanNotBeUsedError();
|
|
729
|
+
const queryRunner = this.obtainQueryRunner();
|
|
730
|
+
let transactionStartedByUs = false;
|
|
731
|
+
try {
|
|
732
|
+
// start transaction if it was enabled
|
|
733
|
+
if (this.expressionMap.useTransaction === true &&
|
|
734
|
+
queryRunner.isTransactionActive === false) {
|
|
735
|
+
await queryRunner.startTransaction();
|
|
736
|
+
transactionStartedByUs = true;
|
|
737
|
+
}
|
|
738
|
+
this.expressionMap.queryEntity = false;
|
|
739
|
+
const results = await this.executeCountQuery(queryRunner);
|
|
740
|
+
// close transaction if we started it
|
|
741
|
+
if (transactionStartedByUs) {
|
|
742
|
+
await queryRunner.commitTransaction();
|
|
743
|
+
}
|
|
744
|
+
return results;
|
|
745
|
+
}
|
|
746
|
+
catch (error) {
|
|
747
|
+
// rollback transaction if we started it
|
|
748
|
+
if (transactionStartedByUs) {
|
|
749
|
+
try {
|
|
750
|
+
await queryRunner.rollbackTransaction();
|
|
751
|
+
}
|
|
752
|
+
catch (rollbackError) { }
|
|
753
|
+
}
|
|
754
|
+
throw error;
|
|
755
|
+
}
|
|
756
|
+
finally {
|
|
757
|
+
if (queryRunner !== this.queryRunner)
|
|
758
|
+
// means we created our own query runner
|
|
759
|
+
await queryRunner.release();
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Executes built SQL query and returns entities and overall entities count (without limitation).
|
|
764
|
+
* This method is useful to build pagination.
|
|
765
|
+
*/
|
|
766
|
+
async getManyAndCount() {
|
|
767
|
+
if (this.expressionMap.lockMode === "optimistic")
|
|
768
|
+
throw new OptimisticLockCanNotBeUsedError_1.OptimisticLockCanNotBeUsedError();
|
|
769
|
+
const queryRunner = this.obtainQueryRunner();
|
|
770
|
+
let transactionStartedByUs = false;
|
|
771
|
+
try {
|
|
772
|
+
// start transaction if it was enabled
|
|
773
|
+
if (this.expressionMap.useTransaction === true &&
|
|
774
|
+
queryRunner.isTransactionActive === false) {
|
|
775
|
+
await queryRunner.startTransaction();
|
|
776
|
+
transactionStartedByUs = true;
|
|
777
|
+
}
|
|
778
|
+
this.expressionMap.queryEntity = true;
|
|
779
|
+
const entitiesAndRaw = await this.executeEntitiesAndRawResults(queryRunner);
|
|
780
|
+
this.expressionMap.queryEntity = false;
|
|
781
|
+
const cacheId = this.expressionMap.cacheId;
|
|
782
|
+
// Creates a new cacheId for the count query, or it will retreive the above query results
|
|
783
|
+
// and count will return 0.
|
|
784
|
+
this.expressionMap.cacheId = cacheId ? `${cacheId}-count` : cacheId;
|
|
785
|
+
const count = await this.executeCountQuery(queryRunner);
|
|
786
|
+
const results = [entitiesAndRaw.entities, count];
|
|
787
|
+
// close transaction if we started it
|
|
788
|
+
if (transactionStartedByUs) {
|
|
789
|
+
await queryRunner.commitTransaction();
|
|
790
|
+
}
|
|
791
|
+
return results;
|
|
792
|
+
}
|
|
793
|
+
catch (error) {
|
|
794
|
+
// rollback transaction if we started it
|
|
795
|
+
if (transactionStartedByUs) {
|
|
796
|
+
try {
|
|
797
|
+
await queryRunner.rollbackTransaction();
|
|
798
|
+
}
|
|
799
|
+
catch (rollbackError) { }
|
|
800
|
+
}
|
|
801
|
+
throw error;
|
|
802
|
+
}
|
|
803
|
+
finally {
|
|
804
|
+
if (queryRunner !== this.queryRunner)
|
|
805
|
+
// means we created our own query runner
|
|
806
|
+
await queryRunner.release();
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
//#region @backend
|
|
810
|
+
/**
|
|
811
|
+
* Executes built SQL query and returns raw data stream.
|
|
812
|
+
*/
|
|
813
|
+
async stream() {
|
|
814
|
+
this.expressionMap.queryEntity = false;
|
|
815
|
+
const [sql, parameters] = this.getQueryAndParameters();
|
|
816
|
+
const queryRunner = this.obtainQueryRunner();
|
|
817
|
+
let transactionStartedByUs = false;
|
|
818
|
+
try {
|
|
819
|
+
// start transaction if it was enabled
|
|
820
|
+
if (this.expressionMap.useTransaction === true &&
|
|
821
|
+
queryRunner.isTransactionActive === false) {
|
|
822
|
+
await queryRunner.startTransaction();
|
|
823
|
+
transactionStartedByUs = true;
|
|
824
|
+
}
|
|
825
|
+
const releaseFn = () => {
|
|
826
|
+
if (queryRunner !== this.queryRunner)
|
|
827
|
+
// means we created our own query runner
|
|
828
|
+
return queryRunner.release();
|
|
829
|
+
return;
|
|
830
|
+
};
|
|
831
|
+
const results = queryRunner.stream(sql, parameters, releaseFn, releaseFn);
|
|
832
|
+
// close transaction if we started it
|
|
833
|
+
if (transactionStartedByUs) {
|
|
834
|
+
await queryRunner.commitTransaction();
|
|
835
|
+
}
|
|
836
|
+
return results;
|
|
837
|
+
}
|
|
838
|
+
catch (error) {
|
|
839
|
+
// rollback transaction if we started it
|
|
840
|
+
if (transactionStartedByUs) {
|
|
841
|
+
try {
|
|
842
|
+
await queryRunner.rollbackTransaction();
|
|
843
|
+
}
|
|
844
|
+
catch (rollbackError) { }
|
|
845
|
+
}
|
|
846
|
+
throw error;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Enables or disables query result caching.
|
|
851
|
+
*/
|
|
852
|
+
cache(enabledOrMillisecondsOrId, maybeMilliseconds) {
|
|
853
|
+
if (typeof enabledOrMillisecondsOrId === "boolean") {
|
|
854
|
+
this.expressionMap.cache = enabledOrMillisecondsOrId;
|
|
855
|
+
}
|
|
856
|
+
else if (typeof enabledOrMillisecondsOrId === "number") {
|
|
857
|
+
this.expressionMap.cache = true;
|
|
858
|
+
this.expressionMap.cacheDuration = enabledOrMillisecondsOrId;
|
|
859
|
+
}
|
|
860
|
+
else if (typeof enabledOrMillisecondsOrId === "string" ||
|
|
861
|
+
typeof enabledOrMillisecondsOrId === "number") {
|
|
862
|
+
this.expressionMap.cache = true;
|
|
863
|
+
this.expressionMap.cacheId = enabledOrMillisecondsOrId;
|
|
864
|
+
}
|
|
865
|
+
if (maybeMilliseconds) {
|
|
866
|
+
this.expressionMap.cacheDuration = maybeMilliseconds;
|
|
867
|
+
}
|
|
868
|
+
return this;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Sets extra options that can be used to configure how query builder works.
|
|
872
|
+
*/
|
|
873
|
+
setOption(option) {
|
|
874
|
+
this.expressionMap.options.push(option);
|
|
875
|
+
return this;
|
|
876
|
+
}
|
|
877
|
+
// -------------------------------------------------------------------------
|
|
878
|
+
// Protected Methods
|
|
879
|
+
// -------------------------------------------------------------------------
|
|
880
|
+
join(direction, entityOrProperty, aliasName, condition, parameters, mapToProperty, isMappingMany) {
|
|
881
|
+
this.setParameters(parameters || {});
|
|
882
|
+
const joinAttribute = new JoinAttribute_1.JoinAttribute(this.connection, this.expressionMap);
|
|
883
|
+
joinAttribute.direction = direction;
|
|
884
|
+
joinAttribute.mapToProperty = mapToProperty;
|
|
885
|
+
joinAttribute.isMappingMany = isMappingMany;
|
|
886
|
+
joinAttribute.entityOrProperty = entityOrProperty; // relationName
|
|
887
|
+
joinAttribute.condition = condition ? condition : undefined; // joinInverseSideCondition
|
|
888
|
+
// joinAttribute.junctionAlias = joinAttribute.relation.isOwning ? parentAlias + "_" + destinationTableAlias : destinationTableAlias + "_" + parentAlias;
|
|
889
|
+
this.expressionMap.joinAttributes.push(joinAttribute);
|
|
890
|
+
if (joinAttribute.metadata) {
|
|
891
|
+
if (joinAttribute.metadata.deleteDateColumn &&
|
|
892
|
+
!this.expressionMap.withDeleted) {
|
|
893
|
+
const conditionDeleteColumn = `${aliasName}.${joinAttribute.metadata.deleteDateColumn.propertyName} IS NULL`;
|
|
894
|
+
joinAttribute.condition = joinAttribute.condition
|
|
895
|
+
? ` ${joinAttribute.condition} AND ${conditionDeleteColumn}`
|
|
896
|
+
: `${conditionDeleteColumn}`;
|
|
897
|
+
}
|
|
898
|
+
// todo: find and set metadata right there?
|
|
899
|
+
joinAttribute.alias = this.expressionMap.createAlias({
|
|
900
|
+
type: "join",
|
|
901
|
+
name: aliasName,
|
|
902
|
+
metadata: joinAttribute.metadata,
|
|
903
|
+
});
|
|
904
|
+
if (joinAttribute.relation &&
|
|
905
|
+
joinAttribute.relation.junctionEntityMetadata) {
|
|
906
|
+
this.expressionMap.createAlias({
|
|
907
|
+
type: "join",
|
|
908
|
+
name: joinAttribute.junctionAlias,
|
|
909
|
+
metadata: joinAttribute.relation.junctionEntityMetadata,
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
let subQuery = "";
|
|
915
|
+
if (typeof entityOrProperty === "function") {
|
|
916
|
+
const subQueryBuilder = entityOrProperty(this.subQuery());
|
|
917
|
+
this.setParameters(subQueryBuilder.getParameters());
|
|
918
|
+
subQuery = subQueryBuilder.getQuery();
|
|
919
|
+
}
|
|
920
|
+
else {
|
|
921
|
+
subQuery = entityOrProperty;
|
|
922
|
+
}
|
|
923
|
+
const isSubQuery = typeof entityOrProperty === "function" ||
|
|
924
|
+
(entityOrProperty.substr(0, 1) === "(" &&
|
|
925
|
+
entityOrProperty.substr(-1) === ")");
|
|
926
|
+
joinAttribute.alias = this.expressionMap.createAlias({
|
|
927
|
+
type: "join",
|
|
928
|
+
name: aliasName,
|
|
929
|
+
tablePath: isSubQuery === false
|
|
930
|
+
? entityOrProperty
|
|
931
|
+
: undefined,
|
|
932
|
+
subQuery: isSubQuery === true ? subQuery : undefined,
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Creates "SELECT FROM" part of SQL query.
|
|
938
|
+
*/
|
|
939
|
+
createSelectExpression() {
|
|
940
|
+
if (!this.expressionMap.mainAlias)
|
|
941
|
+
throw new error_1.TypeORMError("Cannot build query because main alias is not set (call qb#from method)");
|
|
942
|
+
// todo throw exception if selects or from is missing
|
|
943
|
+
const allSelects = [];
|
|
944
|
+
const excludedSelects = [];
|
|
945
|
+
if (this.expressionMap.mainAlias.hasMetadata) {
|
|
946
|
+
const metadata = this.expressionMap.mainAlias.metadata;
|
|
947
|
+
allSelects.push(...this.buildEscapedEntityColumnSelects(this.expressionMap.mainAlias.name, metadata));
|
|
948
|
+
excludedSelects.push(...this.findEntityColumnSelects(this.expressionMap.mainAlias.name, metadata));
|
|
949
|
+
}
|
|
950
|
+
// add selects from joins
|
|
951
|
+
this.expressionMap.joinAttributes.forEach((join) => {
|
|
952
|
+
if (join.metadata) {
|
|
953
|
+
allSelects.push(...this.buildEscapedEntityColumnSelects(join.alias.name, join.metadata));
|
|
954
|
+
excludedSelects.push(...this.findEntityColumnSelects(join.alias.name, join.metadata));
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
const hasMainAlias = this.expressionMap.selects.some((select) => select.selection === join.alias.name);
|
|
958
|
+
if (hasMainAlias) {
|
|
959
|
+
allSelects.push({
|
|
960
|
+
selection: this.escape(join.alias.name) + ".*",
|
|
961
|
+
});
|
|
962
|
+
const excludedSelect = this.expressionMap.selects.find((select) => select.selection === join.alias.name);
|
|
963
|
+
excludedSelects.push(excludedSelect);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
// add all other selects
|
|
968
|
+
this.expressionMap.selects
|
|
969
|
+
.filter((select) => excludedSelects.indexOf(select) === -1)
|
|
970
|
+
.forEach((select) => allSelects.push({
|
|
971
|
+
selection: this.replacePropertyNames(select.selection),
|
|
972
|
+
aliasName: select.aliasName,
|
|
973
|
+
}));
|
|
974
|
+
// if still selection is empty, then simply set it to all (*)
|
|
975
|
+
if (allSelects.length === 0)
|
|
976
|
+
allSelects.push({ selection: "*" });
|
|
977
|
+
// Use certain index
|
|
978
|
+
let useIndex = "";
|
|
979
|
+
if (this.expressionMap.useIndex) {
|
|
980
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver)) {
|
|
981
|
+
useIndex = ` USE INDEX (${this.expressionMap.useIndex})`;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
// create a selection query
|
|
985
|
+
const froms = this.expressionMap.aliases
|
|
986
|
+
.filter((alias) => alias.type === "from" &&
|
|
987
|
+
(alias.tablePath || alias.subQuery))
|
|
988
|
+
.map((alias) => {
|
|
989
|
+
if (alias.subQuery)
|
|
990
|
+
return alias.subQuery + " " + this.escape(alias.name);
|
|
991
|
+
return (this.getTableName(alias.tablePath) +
|
|
992
|
+
" " +
|
|
993
|
+
this.escape(alias.name));
|
|
994
|
+
});
|
|
995
|
+
const select = this.createSelectDistinctExpression();
|
|
996
|
+
const selection = allSelects
|
|
997
|
+
.map((select) => select.selection +
|
|
998
|
+
(select.aliasName
|
|
999
|
+
? " AS " + this.escape(select.aliasName)
|
|
1000
|
+
: ""))
|
|
1001
|
+
.join(", ");
|
|
1002
|
+
return (select +
|
|
1003
|
+
selection +
|
|
1004
|
+
" FROM " +
|
|
1005
|
+
froms.join(", ") +
|
|
1006
|
+
this.createTableLockExpression() +
|
|
1007
|
+
useIndex);
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* Creates select | select distinct part of SQL query.
|
|
1011
|
+
*/
|
|
1012
|
+
createSelectDistinctExpression() {
|
|
1013
|
+
const { selectDistinct, selectDistinctOn, maxExecutionTime } = this.expressionMap;
|
|
1014
|
+
const { driver } = this.connection;
|
|
1015
|
+
let select = "SELECT ";
|
|
1016
|
+
if (maxExecutionTime > 0) {
|
|
1017
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(driver)) {
|
|
1018
|
+
select += `/*+ MAX_EXECUTION_TIME(${this.expressionMap.maxExecutionTime}) */ `;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(driver) &&
|
|
1022
|
+
selectDistinctOn.length > 0) {
|
|
1023
|
+
const selectDistinctOnMap = selectDistinctOn
|
|
1024
|
+
.map((on) => this.replacePropertyNames(on))
|
|
1025
|
+
.join(", ");
|
|
1026
|
+
select = `SELECT DISTINCT ON (${selectDistinctOnMap}) `;
|
|
1027
|
+
}
|
|
1028
|
+
else if (selectDistinct) {
|
|
1029
|
+
select = "SELECT DISTINCT ";
|
|
1030
|
+
}
|
|
1031
|
+
return select;
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Creates "JOIN" part of SQL query.
|
|
1035
|
+
*/
|
|
1036
|
+
createJoinExpression() {
|
|
1037
|
+
// examples:
|
|
1038
|
+
// select from owning side
|
|
1039
|
+
// qb.select("post")
|
|
1040
|
+
// .leftJoinAndSelect("post.category", "category");
|
|
1041
|
+
// select from non-owning side
|
|
1042
|
+
// qb.select("category")
|
|
1043
|
+
// .leftJoinAndSelect("category.post", "post");
|
|
1044
|
+
const joins = this.expressionMap.joinAttributes.map((joinAttr) => {
|
|
1045
|
+
const relation = joinAttr.relation;
|
|
1046
|
+
const destinationTableName = joinAttr.tablePath;
|
|
1047
|
+
const destinationTableAlias = joinAttr.alias.name;
|
|
1048
|
+
let appendedCondition = joinAttr.condition
|
|
1049
|
+
? " AND (" + joinAttr.condition + ")"
|
|
1050
|
+
: "";
|
|
1051
|
+
const parentAlias = joinAttr.parentAlias;
|
|
1052
|
+
// if join was build without relation (e.g. without "post.category") then it means that we have direct
|
|
1053
|
+
// table to join, without junction table involved. This means we simply join direct table.
|
|
1054
|
+
if (!parentAlias || !relation) {
|
|
1055
|
+
const destinationJoin = joinAttr.alias.subQuery
|
|
1056
|
+
? joinAttr.alias.subQuery
|
|
1057
|
+
: this.getTableName(destinationTableName);
|
|
1058
|
+
return (" " +
|
|
1059
|
+
joinAttr.direction +
|
|
1060
|
+
" JOIN " +
|
|
1061
|
+
destinationJoin +
|
|
1062
|
+
" " +
|
|
1063
|
+
this.escape(destinationTableAlias) +
|
|
1064
|
+
this.createTableLockExpression() +
|
|
1065
|
+
(joinAttr.condition
|
|
1066
|
+
? " ON " + this.replacePropertyNames(joinAttr.condition)
|
|
1067
|
+
: ""));
|
|
1068
|
+
}
|
|
1069
|
+
// if real entity relation is involved
|
|
1070
|
+
if (relation.isManyToOne || relation.isOneToOneOwner) {
|
|
1071
|
+
// JOIN `category` `category` ON `category`.`id` = `post`.`categoryId`
|
|
1072
|
+
const condition = relation.joinColumns
|
|
1073
|
+
.map((joinColumn) => {
|
|
1074
|
+
return (destinationTableAlias +
|
|
1075
|
+
"." +
|
|
1076
|
+
joinColumn.referencedColumn.propertyPath +
|
|
1077
|
+
"=" +
|
|
1078
|
+
parentAlias +
|
|
1079
|
+
"." +
|
|
1080
|
+
relation.propertyPath +
|
|
1081
|
+
"." +
|
|
1082
|
+
joinColumn.referencedColumn.propertyPath);
|
|
1083
|
+
})
|
|
1084
|
+
.join(" AND ");
|
|
1085
|
+
return (" " +
|
|
1086
|
+
joinAttr.direction +
|
|
1087
|
+
" JOIN " +
|
|
1088
|
+
this.getTableName(destinationTableName) +
|
|
1089
|
+
" " +
|
|
1090
|
+
this.escape(destinationTableAlias) +
|
|
1091
|
+
this.createTableLockExpression() +
|
|
1092
|
+
" ON " +
|
|
1093
|
+
this.replacePropertyNames(condition + appendedCondition));
|
|
1094
|
+
}
|
|
1095
|
+
else if (relation.isOneToMany || relation.isOneToOneNotOwner) {
|
|
1096
|
+
// JOIN `post` `post` ON `post`.`categoryId` = `category`.`id`
|
|
1097
|
+
const condition = relation
|
|
1098
|
+
.inverseRelation.joinColumns.map((joinColumn) => {
|
|
1099
|
+
if (relation.inverseEntityMetadata.tableType ===
|
|
1100
|
+
"entity-child" &&
|
|
1101
|
+
relation.inverseEntityMetadata.discriminatorColumn) {
|
|
1102
|
+
appendedCondition +=
|
|
1103
|
+
" AND " +
|
|
1104
|
+
destinationTableAlias +
|
|
1105
|
+
"." +
|
|
1106
|
+
relation.inverseEntityMetadata
|
|
1107
|
+
.discriminatorColumn.databaseName +
|
|
1108
|
+
"='" +
|
|
1109
|
+
relation.inverseEntityMetadata
|
|
1110
|
+
.discriminatorValue +
|
|
1111
|
+
"'";
|
|
1112
|
+
}
|
|
1113
|
+
return (destinationTableAlias +
|
|
1114
|
+
"." +
|
|
1115
|
+
relation.inverseRelation.propertyPath +
|
|
1116
|
+
"." +
|
|
1117
|
+
joinColumn.referencedColumn.propertyPath +
|
|
1118
|
+
"=" +
|
|
1119
|
+
parentAlias +
|
|
1120
|
+
"." +
|
|
1121
|
+
joinColumn.referencedColumn.propertyPath);
|
|
1122
|
+
})
|
|
1123
|
+
.join(" AND ");
|
|
1124
|
+
return (" " +
|
|
1125
|
+
joinAttr.direction +
|
|
1126
|
+
" JOIN " +
|
|
1127
|
+
this.getTableName(destinationTableName) +
|
|
1128
|
+
" " +
|
|
1129
|
+
this.escape(destinationTableAlias) +
|
|
1130
|
+
this.createTableLockExpression() +
|
|
1131
|
+
" ON " +
|
|
1132
|
+
this.replacePropertyNames(condition + appendedCondition));
|
|
1133
|
+
}
|
|
1134
|
+
else {
|
|
1135
|
+
// means many-to-many
|
|
1136
|
+
const junctionTableName = relation.junctionEntityMetadata.tablePath;
|
|
1137
|
+
const junctionAlias = joinAttr.junctionAlias;
|
|
1138
|
+
let junctionCondition = "", destinationCondition = "";
|
|
1139
|
+
if (relation.isOwning) {
|
|
1140
|
+
junctionCondition = relation.joinColumns
|
|
1141
|
+
.map((joinColumn) => {
|
|
1142
|
+
// `post_category`.`postId` = `post`.`id`
|
|
1143
|
+
return (junctionAlias +
|
|
1144
|
+
"." +
|
|
1145
|
+
joinColumn.propertyPath +
|
|
1146
|
+
"=" +
|
|
1147
|
+
parentAlias +
|
|
1148
|
+
"." +
|
|
1149
|
+
joinColumn.referencedColumn.propertyPath);
|
|
1150
|
+
})
|
|
1151
|
+
.join(" AND ");
|
|
1152
|
+
destinationCondition = relation.inverseJoinColumns
|
|
1153
|
+
.map((joinColumn) => {
|
|
1154
|
+
// `category`.`id` = `post_category`.`categoryId`
|
|
1155
|
+
return (destinationTableAlias +
|
|
1156
|
+
"." +
|
|
1157
|
+
joinColumn.referencedColumn.propertyPath +
|
|
1158
|
+
"=" +
|
|
1159
|
+
junctionAlias +
|
|
1160
|
+
"." +
|
|
1161
|
+
joinColumn.propertyPath);
|
|
1162
|
+
})
|
|
1163
|
+
.join(" AND ");
|
|
1164
|
+
}
|
|
1165
|
+
else {
|
|
1166
|
+
junctionCondition = relation
|
|
1167
|
+
.inverseRelation.inverseJoinColumns.map((joinColumn) => {
|
|
1168
|
+
// `post_category`.`categoryId` = `category`.`id`
|
|
1169
|
+
return (junctionAlias +
|
|
1170
|
+
"." +
|
|
1171
|
+
joinColumn.propertyPath +
|
|
1172
|
+
"=" +
|
|
1173
|
+
parentAlias +
|
|
1174
|
+
"." +
|
|
1175
|
+
joinColumn.referencedColumn.propertyPath);
|
|
1176
|
+
})
|
|
1177
|
+
.join(" AND ");
|
|
1178
|
+
destinationCondition = relation
|
|
1179
|
+
.inverseRelation.joinColumns.map((joinColumn) => {
|
|
1180
|
+
// `post`.`id` = `post_category`.`postId`
|
|
1181
|
+
return (destinationTableAlias +
|
|
1182
|
+
"." +
|
|
1183
|
+
joinColumn.referencedColumn.propertyPath +
|
|
1184
|
+
"=" +
|
|
1185
|
+
junctionAlias +
|
|
1186
|
+
"." +
|
|
1187
|
+
joinColumn.propertyPath);
|
|
1188
|
+
})
|
|
1189
|
+
.join(" AND ");
|
|
1190
|
+
}
|
|
1191
|
+
return (" " +
|
|
1192
|
+
joinAttr.direction +
|
|
1193
|
+
" JOIN " +
|
|
1194
|
+
this.getTableName(junctionTableName) +
|
|
1195
|
+
" " +
|
|
1196
|
+
this.escape(junctionAlias) +
|
|
1197
|
+
this.createTableLockExpression() +
|
|
1198
|
+
" ON " +
|
|
1199
|
+
this.replacePropertyNames(junctionCondition) +
|
|
1200
|
+
" " +
|
|
1201
|
+
joinAttr.direction +
|
|
1202
|
+
" JOIN " +
|
|
1203
|
+
this.getTableName(destinationTableName) +
|
|
1204
|
+
" " +
|
|
1205
|
+
this.escape(destinationTableAlias) +
|
|
1206
|
+
this.createTableLockExpression() +
|
|
1207
|
+
" ON " +
|
|
1208
|
+
this.replacePropertyNames(destinationCondition + appendedCondition));
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
return joins.join(" ");
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* Creates "GROUP BY" part of SQL query.
|
|
1215
|
+
*/
|
|
1216
|
+
createGroupByExpression() {
|
|
1217
|
+
if (!this.expressionMap.groupBys || !this.expressionMap.groupBys.length)
|
|
1218
|
+
return "";
|
|
1219
|
+
return (" GROUP BY " +
|
|
1220
|
+
this.replacePropertyNames(this.expressionMap.groupBys.join(", ")));
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Creates "ORDER BY" part of SQL query.
|
|
1224
|
+
*/
|
|
1225
|
+
createOrderByExpression() {
|
|
1226
|
+
const orderBys = this.expressionMap.allOrderBys;
|
|
1227
|
+
if (Object.keys(orderBys).length > 0)
|
|
1228
|
+
return (" ORDER BY " +
|
|
1229
|
+
Object.keys(orderBys)
|
|
1230
|
+
.map((columnName) => {
|
|
1231
|
+
if (typeof orderBys[columnName] === "string") {
|
|
1232
|
+
return (this.replacePropertyNames(columnName) +
|
|
1233
|
+
" " +
|
|
1234
|
+
orderBys[columnName]);
|
|
1235
|
+
}
|
|
1236
|
+
else {
|
|
1237
|
+
return (this.replacePropertyNames(columnName) +
|
|
1238
|
+
" " +
|
|
1239
|
+
orderBys[columnName].order +
|
|
1240
|
+
" " +
|
|
1241
|
+
orderBys[columnName].nulls);
|
|
1242
|
+
}
|
|
1243
|
+
})
|
|
1244
|
+
.join(", "));
|
|
1245
|
+
return "";
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Creates "LIMIT" and "OFFSET" parts of SQL query.
|
|
1249
|
+
*/
|
|
1250
|
+
createLimitOffsetExpression() {
|
|
1251
|
+
// in the case if nothing is joined in the query builder we don't need to make two requests to get paginated results
|
|
1252
|
+
// we can use regular limit / offset, that's why we add offset and limit construction here based on skip and take values
|
|
1253
|
+
let offset = this.expressionMap.offset, limit = this.expressionMap.limit;
|
|
1254
|
+
if (!offset &&
|
|
1255
|
+
!limit &&
|
|
1256
|
+
this.expressionMap.joinAttributes.length === 0) {
|
|
1257
|
+
offset = this.expressionMap.skip;
|
|
1258
|
+
limit = this.expressionMap.take;
|
|
1259
|
+
}
|
|
1260
|
+
if (this.connection.driver.options.type === "mssql") {
|
|
1261
|
+
// Due to a limitation in SQL Server's parser implementation it does not support using
|
|
1262
|
+
// OFFSET or FETCH NEXT without an ORDER BY clause being provided. In cases where the
|
|
1263
|
+
// user does not request one we insert a dummy ORDER BY that does nothing and should
|
|
1264
|
+
// have no effect on the query planner or on the order of the results returned.
|
|
1265
|
+
// https://dba.stackexchange.com/a/193799
|
|
1266
|
+
let prefix = "";
|
|
1267
|
+
if ((limit || offset) &&
|
|
1268
|
+
Object.keys(this.expressionMap.allOrderBys).length <= 0) {
|
|
1269
|
+
prefix = " ORDER BY (SELECT NULL)";
|
|
1270
|
+
}
|
|
1271
|
+
if (limit && offset)
|
|
1272
|
+
return (prefix +
|
|
1273
|
+
" OFFSET " +
|
|
1274
|
+
offset +
|
|
1275
|
+
" ROWS FETCH NEXT " +
|
|
1276
|
+
limit +
|
|
1277
|
+
" ROWS ONLY");
|
|
1278
|
+
if (limit)
|
|
1279
|
+
return (prefix + " OFFSET 0 ROWS FETCH NEXT " + limit + " ROWS ONLY");
|
|
1280
|
+
if (offset)
|
|
1281
|
+
return prefix + " OFFSET " + offset + " ROWS";
|
|
1282
|
+
}
|
|
1283
|
+
else if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
1284
|
+
this.connection.driver.options.type === "aurora-mysql" ||
|
|
1285
|
+
this.connection.driver.options.type === "sap" ||
|
|
1286
|
+
this.connection.driver.options.type === "spanner") {
|
|
1287
|
+
if (limit && offset)
|
|
1288
|
+
return " LIMIT " + limit + " OFFSET " + offset;
|
|
1289
|
+
if (limit)
|
|
1290
|
+
return " LIMIT " + limit;
|
|
1291
|
+
if (offset)
|
|
1292
|
+
throw new OffsetWithoutLimitNotSupportedError_1.OffsetWithoutLimitNotSupportedError();
|
|
1293
|
+
}
|
|
1294
|
+
else if (DriverUtils_1.DriverUtils.isSQLiteFamily(this.connection.driver)) {
|
|
1295
|
+
if (limit && offset)
|
|
1296
|
+
return " LIMIT " + limit + " OFFSET " + offset;
|
|
1297
|
+
if (limit)
|
|
1298
|
+
return " LIMIT " + limit;
|
|
1299
|
+
if (offset)
|
|
1300
|
+
return " LIMIT -1 OFFSET " + offset;
|
|
1301
|
+
}
|
|
1302
|
+
else if (this.connection.driver.options.type === "oracle") {
|
|
1303
|
+
if (limit && offset)
|
|
1304
|
+
return (" OFFSET " +
|
|
1305
|
+
offset +
|
|
1306
|
+
" ROWS FETCH NEXT " +
|
|
1307
|
+
limit +
|
|
1308
|
+
" ROWS ONLY");
|
|
1309
|
+
if (limit)
|
|
1310
|
+
return " FETCH NEXT " + limit + " ROWS ONLY";
|
|
1311
|
+
if (offset)
|
|
1312
|
+
return " OFFSET " + offset + " ROWS";
|
|
1313
|
+
}
|
|
1314
|
+
else {
|
|
1315
|
+
if (limit && offset)
|
|
1316
|
+
return " LIMIT " + limit + " OFFSET " + offset;
|
|
1317
|
+
if (limit)
|
|
1318
|
+
return " LIMIT " + limit;
|
|
1319
|
+
if (offset)
|
|
1320
|
+
return " OFFSET " + offset;
|
|
1321
|
+
}
|
|
1322
|
+
return "";
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Creates "LOCK" part of SELECT Query after table Clause
|
|
1326
|
+
* ex.
|
|
1327
|
+
* SELECT 1
|
|
1328
|
+
* FROM USER U WITH (NOLOCK)
|
|
1329
|
+
* JOIN ORDER O WITH (NOLOCK)
|
|
1330
|
+
* ON U.ID=O.OrderID
|
|
1331
|
+
*/
|
|
1332
|
+
createTableLockExpression() {
|
|
1333
|
+
if (this.connection.driver.options.type === "mssql") {
|
|
1334
|
+
switch (this.expressionMap.lockMode) {
|
|
1335
|
+
case "pessimistic_read":
|
|
1336
|
+
return " WITH (HOLDLOCK, ROWLOCK)";
|
|
1337
|
+
case "pessimistic_write":
|
|
1338
|
+
return " WITH (UPDLOCK, ROWLOCK)";
|
|
1339
|
+
case "dirty_read":
|
|
1340
|
+
return " WITH (NOLOCK)";
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
return "";
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Creates "LOCK" part of SQL query.
|
|
1347
|
+
*/
|
|
1348
|
+
createLockExpression() {
|
|
1349
|
+
const driver = this.connection.driver;
|
|
1350
|
+
let lockTablesClause = "";
|
|
1351
|
+
if (this.expressionMap.lockTables) {
|
|
1352
|
+
if (!(DriverUtils_1.DriverUtils.isPostgresFamily(driver) ||
|
|
1353
|
+
driver.options.type === "cockroachdb")) {
|
|
1354
|
+
throw new error_1.TypeORMError("Lock tables not supported in selected driver");
|
|
1355
|
+
}
|
|
1356
|
+
if (this.expressionMap.lockTables.length < 1) {
|
|
1357
|
+
throw new error_1.TypeORMError("lockTables cannot be an empty array");
|
|
1358
|
+
}
|
|
1359
|
+
lockTablesClause = " OF " + this.expressionMap.lockTables.join(", ");
|
|
1360
|
+
}
|
|
1361
|
+
let onLockExpression = "";
|
|
1362
|
+
if (this.expressionMap.onLocked === "nowait") {
|
|
1363
|
+
onLockExpression = " NOWAIT";
|
|
1364
|
+
}
|
|
1365
|
+
else if (this.expressionMap.onLocked === "skip_locked") {
|
|
1366
|
+
onLockExpression = " SKIP LOCKED";
|
|
1367
|
+
}
|
|
1368
|
+
switch (this.expressionMap.lockMode) {
|
|
1369
|
+
case "pessimistic_read":
|
|
1370
|
+
if (driver.options.type === "mysql" ||
|
|
1371
|
+
driver.options.type === "aurora-mysql") {
|
|
1372
|
+
if (DriverUtils_1.DriverUtils.isReleaseVersionOrGreater(driver, "8.0.0")) {
|
|
1373
|
+
return (" FOR SHARE" + lockTablesClause + onLockExpression);
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
return " LOCK IN SHARE MODE";
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
else if (driver.options.type === "mariadb") {
|
|
1380
|
+
return " LOCK IN SHARE MODE";
|
|
1381
|
+
}
|
|
1382
|
+
else if (DriverUtils_1.DriverUtils.isPostgresFamily(driver)) {
|
|
1383
|
+
return " FOR SHARE" + lockTablesClause + onLockExpression;
|
|
1384
|
+
}
|
|
1385
|
+
else if (driver.options.type === "oracle") {
|
|
1386
|
+
return " FOR UPDATE";
|
|
1387
|
+
}
|
|
1388
|
+
else if (driver.options.type === "mssql") {
|
|
1389
|
+
return "";
|
|
1390
|
+
}
|
|
1391
|
+
else {
|
|
1392
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1393
|
+
}
|
|
1394
|
+
case "pessimistic_write":
|
|
1395
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(driver) ||
|
|
1396
|
+
driver.options.type === "aurora-mysql" ||
|
|
1397
|
+
driver.options.type === "oracle") {
|
|
1398
|
+
return " FOR UPDATE" + onLockExpression;
|
|
1399
|
+
}
|
|
1400
|
+
else if (DriverUtils_1.DriverUtils.isPostgresFamily(driver) ||
|
|
1401
|
+
driver.options.type === "cockroachdb") {
|
|
1402
|
+
return " FOR UPDATE" + lockTablesClause + onLockExpression;
|
|
1403
|
+
}
|
|
1404
|
+
else if (driver.options.type === "mssql") {
|
|
1405
|
+
return "";
|
|
1406
|
+
}
|
|
1407
|
+
else {
|
|
1408
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1409
|
+
}
|
|
1410
|
+
case "pessimistic_partial_write":
|
|
1411
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(driver)) {
|
|
1412
|
+
return " FOR UPDATE" + lockTablesClause + " SKIP LOCKED";
|
|
1413
|
+
}
|
|
1414
|
+
else if (DriverUtils_1.DriverUtils.isMySQLFamily(driver)) {
|
|
1415
|
+
return " FOR UPDATE SKIP LOCKED";
|
|
1416
|
+
}
|
|
1417
|
+
else {
|
|
1418
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1419
|
+
}
|
|
1420
|
+
case "pessimistic_write_or_fail":
|
|
1421
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(driver) ||
|
|
1422
|
+
driver.options.type === "cockroachdb") {
|
|
1423
|
+
return " FOR UPDATE" + lockTablesClause + " NOWAIT";
|
|
1424
|
+
}
|
|
1425
|
+
else if (DriverUtils_1.DriverUtils.isMySQLFamily(driver)) {
|
|
1426
|
+
return " FOR UPDATE NOWAIT";
|
|
1427
|
+
}
|
|
1428
|
+
else {
|
|
1429
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1430
|
+
}
|
|
1431
|
+
case "for_no_key_update":
|
|
1432
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(driver) ||
|
|
1433
|
+
driver.options.type === "cockroachdb") {
|
|
1434
|
+
return (" FOR NO KEY UPDATE" +
|
|
1435
|
+
lockTablesClause +
|
|
1436
|
+
onLockExpression);
|
|
1437
|
+
}
|
|
1438
|
+
else {
|
|
1439
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1440
|
+
}
|
|
1441
|
+
case "for_key_share":
|
|
1442
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(driver)) {
|
|
1443
|
+
return (" FOR KEY SHARE" + lockTablesClause + onLockExpression);
|
|
1444
|
+
}
|
|
1445
|
+
else {
|
|
1446
|
+
throw new LockNotSupportedOnGivenDriverError_1.LockNotSupportedOnGivenDriverError();
|
|
1447
|
+
}
|
|
1448
|
+
default:
|
|
1449
|
+
return "";
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Creates "HAVING" part of SQL query.
|
|
1454
|
+
*/
|
|
1455
|
+
createHavingExpression() {
|
|
1456
|
+
if (!this.expressionMap.havings || !this.expressionMap.havings.length)
|
|
1457
|
+
return "";
|
|
1458
|
+
const conditions = this.expressionMap.havings
|
|
1459
|
+
.map((having, index) => {
|
|
1460
|
+
switch (having.type) {
|
|
1461
|
+
case "and":
|
|
1462
|
+
return ((index > 0 ? "AND " : "") +
|
|
1463
|
+
this.replacePropertyNames(having.condition));
|
|
1464
|
+
case "or":
|
|
1465
|
+
return ((index > 0 ? "OR " : "") +
|
|
1466
|
+
this.replacePropertyNames(having.condition));
|
|
1467
|
+
default:
|
|
1468
|
+
return this.replacePropertyNames(having.condition);
|
|
1469
|
+
}
|
|
1470
|
+
})
|
|
1471
|
+
.join(" ");
|
|
1472
|
+
if (!conditions.length)
|
|
1473
|
+
return "";
|
|
1474
|
+
return " HAVING " + conditions;
|
|
1475
|
+
}
|
|
1476
|
+
buildEscapedEntityColumnSelects(aliasName, metadata) {
|
|
1477
|
+
const hasMainAlias = this.expressionMap.selects.some((select) => select.selection === aliasName);
|
|
1478
|
+
const columns = [];
|
|
1479
|
+
if (hasMainAlias) {
|
|
1480
|
+
columns.push(...metadata.columns.filter((column) => column.isSelect === true));
|
|
1481
|
+
}
|
|
1482
|
+
columns.push(...metadata.columns.filter((column) => {
|
|
1483
|
+
return this.expressionMap.selects.some((select) => select.selection ===
|
|
1484
|
+
aliasName + "." + column.propertyPath);
|
|
1485
|
+
}));
|
|
1486
|
+
// if user used partial selection and did not select some primary columns which are required to be selected
|
|
1487
|
+
// we select those primary columns and mark them as "virtual". Later virtual column values will be removed from final entity
|
|
1488
|
+
// to make entity contain exactly what user selected
|
|
1489
|
+
if (columns.length === 0)
|
|
1490
|
+
// however not in the case when nothing (even partial) was selected from this target (for example joins without selection)
|
|
1491
|
+
return [];
|
|
1492
|
+
const nonSelectedPrimaryColumns = this.expressionMap.queryEntity
|
|
1493
|
+
? metadata.primaryColumns.filter((primaryColumn) => columns.indexOf(primaryColumn) === -1)
|
|
1494
|
+
: [];
|
|
1495
|
+
const allColumns = [...columns, ...nonSelectedPrimaryColumns];
|
|
1496
|
+
const finalSelects = [];
|
|
1497
|
+
const escapedAliasName = this.escape(aliasName);
|
|
1498
|
+
allColumns.forEach((column) => {
|
|
1499
|
+
let selectionPath = escapedAliasName + "." + this.escape(column.databaseName);
|
|
1500
|
+
if (column.isVirtualProperty && column.query) {
|
|
1501
|
+
selectionPath = `(${column.query(escapedAliasName)})`;
|
|
1502
|
+
}
|
|
1503
|
+
if (this.connection.driver.spatialTypes.indexOf(column.type) !== -1) {
|
|
1504
|
+
//#region @backend
|
|
1505
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver) ||
|
|
1506
|
+
this.connection.driver.options.type === "aurora-mysql") {
|
|
1507
|
+
const useLegacy = this.connection.driver.options.legacySpatialSupport;
|
|
1508
|
+
const asText = useLegacy ? "AsText" : "ST_AsText";
|
|
1509
|
+
selectionPath = `${asText}(${selectionPath})`;
|
|
1510
|
+
}
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region @backend
|
|
1513
|
+
if (DriverUtils_1.DriverUtils.isPostgresFamily(this.connection.driver))
|
|
1514
|
+
if (column.precision) {
|
|
1515
|
+
// cast to JSON to trigger parsing in the driver
|
|
1516
|
+
selectionPath = `ST_AsGeoJSON(${selectionPath}, ${column.precision})::json`;
|
|
1517
|
+
}
|
|
1518
|
+
else {
|
|
1519
|
+
selectionPath = `ST_AsGeoJSON(${selectionPath})::json`;
|
|
1520
|
+
}
|
|
1521
|
+
if (this.connection.driver.options.type === "mssql")
|
|
1522
|
+
selectionPath = `${selectionPath}.ToString()`;
|
|
1523
|
+
//#endregion
|
|
1524
|
+
}
|
|
1525
|
+
const selections = this.expressionMap.selects.filter((select) => select.selection === aliasName + "." + column.propertyPath);
|
|
1526
|
+
if (selections.length) {
|
|
1527
|
+
selections.forEach((selection) => {
|
|
1528
|
+
finalSelects.push({
|
|
1529
|
+
selection: selectionPath,
|
|
1530
|
+
aliasName: selection.aliasName
|
|
1531
|
+
? selection.aliasName
|
|
1532
|
+
: DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, aliasName, column.databaseName),
|
|
1533
|
+
// todo: need to keep in mind that custom selection.aliasName breaks hydrator. fix it later!
|
|
1534
|
+
virtual: selection.virtual,
|
|
1535
|
+
});
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
else {
|
|
1539
|
+
finalSelects.push({
|
|
1540
|
+
selection: selectionPath,
|
|
1541
|
+
aliasName: DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, aliasName, column.databaseName),
|
|
1542
|
+
// todo: need to keep in mind that custom selection.aliasName breaks hydrator. fix it later!
|
|
1543
|
+
virtual: hasMainAlias,
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
});
|
|
1547
|
+
return finalSelects;
|
|
1548
|
+
}
|
|
1549
|
+
findEntityColumnSelects(aliasName, metadata) {
|
|
1550
|
+
const mainSelect = this.expressionMap.selects.find((select) => select.selection === aliasName);
|
|
1551
|
+
if (mainSelect)
|
|
1552
|
+
return [mainSelect];
|
|
1553
|
+
return this.expressionMap.selects.filter((select) => {
|
|
1554
|
+
return metadata.columns.some((column) => select.selection === aliasName + "." + column.propertyPath);
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
computeCountExpression() {
|
|
1558
|
+
const mainAlias = this.expressionMap.mainAlias.name; // todo: will this work with "fromTableName"?
|
|
1559
|
+
const metadata = this.expressionMap.mainAlias.metadata;
|
|
1560
|
+
const primaryColumns = metadata.primaryColumns;
|
|
1561
|
+
const distinctAlias = this.escape(mainAlias);
|
|
1562
|
+
// If we aren't doing anything that will create a join, we can use a simpler `COUNT` instead
|
|
1563
|
+
// so we prevent poor query patterns in the most likely cases
|
|
1564
|
+
if (this.expressionMap.joinAttributes.length === 0 &&
|
|
1565
|
+
this.expressionMap.relationIdAttributes.length === 0 &&
|
|
1566
|
+
this.expressionMap.relationCountAttributes.length === 0) {
|
|
1567
|
+
return "COUNT(1)";
|
|
1568
|
+
}
|
|
1569
|
+
// For everything else, we'll need to do some hackery to get the correct count values.
|
|
1570
|
+
if (this.connection.driver.options.type === "cockroachdb" ||
|
|
1571
|
+
DriverUtils_1.DriverUtils.isPostgresFamily(this.connection.driver)) {
|
|
1572
|
+
// Postgres and CockroachDB can pass multiple parameters to the `DISTINCT` function
|
|
1573
|
+
// https://www.postgresql.org/docs/9.5/sql-select.html#SQL-DISTINCT
|
|
1574
|
+
return ("COUNT(DISTINCT(" +
|
|
1575
|
+
primaryColumns
|
|
1576
|
+
.map((c) => `${distinctAlias}.${this.escape(c.databaseName)}`)
|
|
1577
|
+
.join(", ") +
|
|
1578
|
+
"))");
|
|
1579
|
+
}
|
|
1580
|
+
if (DriverUtils_1.DriverUtils.isMySQLFamily(this.connection.driver)) {
|
|
1581
|
+
// MySQL & MariaDB can pass multiple parameters to the `DISTINCT` language construct
|
|
1582
|
+
// https://mariadb.com/kb/en/count-distinct/
|
|
1583
|
+
return ("COUNT(DISTINCT " +
|
|
1584
|
+
primaryColumns
|
|
1585
|
+
.map((c) => `${distinctAlias}.${this.escape(c.databaseName)}`)
|
|
1586
|
+
.join(", ") +
|
|
1587
|
+
")");
|
|
1588
|
+
}
|
|
1589
|
+
if (this.connection.driver.options.type === "mssql") {
|
|
1590
|
+
// SQL Server has gotta be different from everyone else. They don't support
|
|
1591
|
+
// distinct counting multiple columns & they don't have the same operator
|
|
1592
|
+
// characteristic for concatenating, so we gotta use the `CONCAT` function.
|
|
1593
|
+
// However, If it's exactly 1 column we can omit the `CONCAT` for better performance.
|
|
1594
|
+
const columnsExpression = primaryColumns
|
|
1595
|
+
.map((primaryColumn) => `${distinctAlias}.${this.escape(primaryColumn.databaseName)}`)
|
|
1596
|
+
.join(", '|;|', ");
|
|
1597
|
+
if (primaryColumns.length === 1) {
|
|
1598
|
+
return `COUNT(DISTINCT(${columnsExpression}))`;
|
|
1599
|
+
}
|
|
1600
|
+
return `COUNT(DISTINCT(CONCAT(${columnsExpression})))`;
|
|
1601
|
+
}
|
|
1602
|
+
if (this.connection.driver.options.type === "spanner") {
|
|
1603
|
+
// spanner also has gotta be different from everyone else.
|
|
1604
|
+
// they do not support concatenation of different column types without casting them to string
|
|
1605
|
+
if (primaryColumns.length === 1) {
|
|
1606
|
+
return `COUNT(DISTINCT(${distinctAlias}.${this.escape(primaryColumns[0].databaseName)}))`;
|
|
1607
|
+
}
|
|
1608
|
+
const columnsExpression = primaryColumns
|
|
1609
|
+
.map((primaryColumn) => `CAST(${distinctAlias}.${this.escape(primaryColumn.databaseName)} AS STRING)`)
|
|
1610
|
+
.join(", '|;|', ");
|
|
1611
|
+
return `COUNT(DISTINCT(CONCAT(${columnsExpression})))`;
|
|
1612
|
+
}
|
|
1613
|
+
// If all else fails, fall back to a `COUNT` and `DISTINCT` across all the primary columns concatenated.
|
|
1614
|
+
// Per the SQL spec, this is the canonical string concatenation mechanism which is most
|
|
1615
|
+
// likely to work across servers implementing the SQL standard.
|
|
1616
|
+
// Please note, if there is only one primary column that the concatenation does not occur in this
|
|
1617
|
+
// query and the query is a standard `COUNT DISTINCT` in that case.
|
|
1618
|
+
return (`COUNT(DISTINCT(` +
|
|
1619
|
+
primaryColumns
|
|
1620
|
+
.map((c) => `${distinctAlias}.${this.escape(c.databaseName)}`)
|
|
1621
|
+
.join(" || '|;|' || ") +
|
|
1622
|
+
"))");
|
|
1623
|
+
}
|
|
1624
|
+
async executeCountQuery(queryRunner) {
|
|
1625
|
+
const countSql = this.computeCountExpression();
|
|
1626
|
+
const results = await this.clone()
|
|
1627
|
+
.orderBy()
|
|
1628
|
+
.groupBy()
|
|
1629
|
+
.offset(undefined)
|
|
1630
|
+
.limit(undefined)
|
|
1631
|
+
.skip(undefined)
|
|
1632
|
+
.take(undefined)
|
|
1633
|
+
.select(countSql, "cnt")
|
|
1634
|
+
.setOption("disable-global-order")
|
|
1635
|
+
.loadRawResults(queryRunner);
|
|
1636
|
+
if (!results || !results[0] || !results[0]["cnt"])
|
|
1637
|
+
return 0;
|
|
1638
|
+
return parseInt(results[0]["cnt"]);
|
|
1639
|
+
}
|
|
1640
|
+
applyFindOptions() {
|
|
1641
|
+
// todo: convert relations: string[] to object map to simplify code
|
|
1642
|
+
// todo: same with selects
|
|
1643
|
+
if (this.expressionMap.mainAlias.metadata) {
|
|
1644
|
+
if (this.findOptions.relationLoadStrategy) {
|
|
1645
|
+
this.expressionMap.relationLoadStrategy =
|
|
1646
|
+
this.findOptions.relationLoadStrategy;
|
|
1647
|
+
}
|
|
1648
|
+
if (this.findOptions.comment) {
|
|
1649
|
+
this.comment(this.findOptions.comment);
|
|
1650
|
+
}
|
|
1651
|
+
if (this.findOptions.withDeleted) {
|
|
1652
|
+
this.withDeleted();
|
|
1653
|
+
}
|
|
1654
|
+
if (this.findOptions.select) {
|
|
1655
|
+
const select = Array.isArray(this.findOptions.select)
|
|
1656
|
+
? OrmUtils_1.OrmUtils.propertyPathsToTruthyObject(this.findOptions.select)
|
|
1657
|
+
: this.findOptions.select;
|
|
1658
|
+
this.buildSelect(select, this.expressionMap.mainAlias.metadata, this.expressionMap.mainAlias.name);
|
|
1659
|
+
}
|
|
1660
|
+
if (this.selects.length) {
|
|
1661
|
+
this.select(this.selects);
|
|
1662
|
+
}
|
|
1663
|
+
this.selects = [];
|
|
1664
|
+
if (this.findOptions.relations) {
|
|
1665
|
+
const relations = Array.isArray(this.findOptions.relations)
|
|
1666
|
+
? OrmUtils_1.OrmUtils.propertyPathsToTruthyObject(this.findOptions.relations)
|
|
1667
|
+
: this.findOptions.relations;
|
|
1668
|
+
this.buildRelations(relations, typeof this.findOptions.select === "object"
|
|
1669
|
+
? this.findOptions.select
|
|
1670
|
+
: undefined, this.expressionMap.mainAlias.metadata, this.expressionMap.mainAlias.name);
|
|
1671
|
+
if (this.findOptions.loadEagerRelations !== false &&
|
|
1672
|
+
this.expressionMap.relationLoadStrategy === "join") {
|
|
1673
|
+
this.buildEagerRelations(relations, typeof this.findOptions.select === "object"
|
|
1674
|
+
? this.findOptions
|
|
1675
|
+
.select
|
|
1676
|
+
: undefined, this.expressionMap.mainAlias.metadata, this.expressionMap.mainAlias.name);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
if (this.selects.length) {
|
|
1680
|
+
this.addSelect(this.selects);
|
|
1681
|
+
}
|
|
1682
|
+
if (this.findOptions.where) {
|
|
1683
|
+
this.conditions = this.buildWhere(this.findOptions.where, this.expressionMap.mainAlias.metadata, this.expressionMap.mainAlias.name);
|
|
1684
|
+
if (this.conditions.length)
|
|
1685
|
+
this.andWhere(this.conditions.substr(0, 1) !== "("
|
|
1686
|
+
? "(" + this.conditions + ")"
|
|
1687
|
+
: this.conditions); // temporary and where and braces
|
|
1688
|
+
}
|
|
1689
|
+
if (this.findOptions.order) {
|
|
1690
|
+
this.buildOrder(this.findOptions.order, this.expressionMap.mainAlias.metadata, this.expressionMap.mainAlias.name);
|
|
1691
|
+
}
|
|
1692
|
+
// apply joins
|
|
1693
|
+
if (this.joins.length) {
|
|
1694
|
+
this.joins.forEach((join) => {
|
|
1695
|
+
if (join.select && !join.selection) {
|
|
1696
|
+
// if (join.selection) {
|
|
1697
|
+
//
|
|
1698
|
+
// } else {
|
|
1699
|
+
if (join.type === "inner") {
|
|
1700
|
+
this.innerJoinAndSelect(`${join.parentAlias}.${join.relationMetadata.propertyPath}`, join.alias);
|
|
1701
|
+
}
|
|
1702
|
+
else {
|
|
1703
|
+
this.leftJoinAndSelect(`${join.parentAlias}.${join.relationMetadata.propertyPath}`, join.alias);
|
|
1704
|
+
}
|
|
1705
|
+
// }
|
|
1706
|
+
}
|
|
1707
|
+
else {
|
|
1708
|
+
if (join.type === "inner") {
|
|
1709
|
+
this.innerJoin(`${join.parentAlias}.${join.relationMetadata.propertyPath}`, join.alias);
|
|
1710
|
+
}
|
|
1711
|
+
else {
|
|
1712
|
+
this.leftJoin(`${join.parentAlias}.${join.relationMetadata.propertyPath}`, join.alias);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
// if (join.select) {
|
|
1716
|
+
// if (this.findOptions.loadEagerRelations !== false) {
|
|
1717
|
+
// FindOptionsUtils.joinEagerRelations(
|
|
1718
|
+
// this,
|
|
1719
|
+
// join.alias,
|
|
1720
|
+
// join.relationMetadata.inverseEntityMetadata
|
|
1721
|
+
// );
|
|
1722
|
+
// }
|
|
1723
|
+
// }
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
// if (this.conditions.length) {
|
|
1727
|
+
// this.where(this.conditions.join(" AND "));
|
|
1728
|
+
// }
|
|
1729
|
+
// apply offset
|
|
1730
|
+
if (this.findOptions.skip !== undefined) {
|
|
1731
|
+
// if (this.findOptions.options && this.findOptions.options.pagination === false) {
|
|
1732
|
+
// this.offset(this.findOptions.skip);
|
|
1733
|
+
// } else {
|
|
1734
|
+
this.skip(this.findOptions.skip);
|
|
1735
|
+
// }
|
|
1736
|
+
}
|
|
1737
|
+
// apply limit
|
|
1738
|
+
if (this.findOptions.take !== undefined) {
|
|
1739
|
+
// if (this.findOptions.options && this.findOptions.options.pagination === false) {
|
|
1740
|
+
// this.limit(this.findOptions.take);
|
|
1741
|
+
// } else {
|
|
1742
|
+
this.take(this.findOptions.take);
|
|
1743
|
+
// }
|
|
1744
|
+
}
|
|
1745
|
+
// apply caching options
|
|
1746
|
+
if (typeof this.findOptions.cache === "number") {
|
|
1747
|
+
this.cache(this.findOptions.cache);
|
|
1748
|
+
}
|
|
1749
|
+
else if (typeof this.findOptions.cache === "boolean") {
|
|
1750
|
+
this.cache(this.findOptions.cache);
|
|
1751
|
+
}
|
|
1752
|
+
else if (typeof this.findOptions.cache === "object") {
|
|
1753
|
+
this.cache(this.findOptions.cache.id, this.findOptions.cache.milliseconds);
|
|
1754
|
+
}
|
|
1755
|
+
if (this.findOptions.join) {
|
|
1756
|
+
if (this.findOptions.join.leftJoin)
|
|
1757
|
+
Object.keys(this.findOptions.join.leftJoin).forEach((key) => {
|
|
1758
|
+
this.leftJoin(this.findOptions.join.leftJoin[key], key);
|
|
1759
|
+
});
|
|
1760
|
+
if (this.findOptions.join.innerJoin)
|
|
1761
|
+
Object.keys(this.findOptions.join.innerJoin).forEach((key) => {
|
|
1762
|
+
this.innerJoin(this.findOptions.join.innerJoin[key], key);
|
|
1763
|
+
});
|
|
1764
|
+
if (this.findOptions.join.leftJoinAndSelect)
|
|
1765
|
+
Object.keys(this.findOptions.join.leftJoinAndSelect).forEach((key) => {
|
|
1766
|
+
this.leftJoinAndSelect(this.findOptions.join.leftJoinAndSelect[key], key);
|
|
1767
|
+
});
|
|
1768
|
+
if (this.findOptions.join.innerJoinAndSelect)
|
|
1769
|
+
Object.keys(this.findOptions.join.innerJoinAndSelect).forEach((key) => {
|
|
1770
|
+
this.innerJoinAndSelect(this.findOptions.join.innerJoinAndSelect[key], key);
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
if (this.findOptions.lock) {
|
|
1774
|
+
if (this.findOptions.lock.mode === "optimistic") {
|
|
1775
|
+
this.setLock(this.findOptions.lock.mode, this.findOptions.lock.version);
|
|
1776
|
+
}
|
|
1777
|
+
else if (this.findOptions.lock.mode === "pessimistic_read" ||
|
|
1778
|
+
this.findOptions.lock.mode === "pessimistic_write" ||
|
|
1779
|
+
this.findOptions.lock.mode === "dirty_read" ||
|
|
1780
|
+
this.findOptions.lock.mode ===
|
|
1781
|
+
"pessimistic_partial_write" ||
|
|
1782
|
+
this.findOptions.lock.mode ===
|
|
1783
|
+
"pessimistic_write_or_fail" ||
|
|
1784
|
+
this.findOptions.lock.mode === "for_no_key_update" ||
|
|
1785
|
+
this.findOptions.lock.mode === "for_key_share") {
|
|
1786
|
+
const tableNames = this.findOptions.lock.tables
|
|
1787
|
+
? this.findOptions.lock.tables.map((table) => {
|
|
1788
|
+
const tableAlias = this.expressionMap.aliases.find((alias) => {
|
|
1789
|
+
return (alias.metadata
|
|
1790
|
+
.tableNameWithoutPrefix === table);
|
|
1791
|
+
});
|
|
1792
|
+
if (!tableAlias) {
|
|
1793
|
+
throw new error_1.TypeORMError(`"${table}" is not part of this query`);
|
|
1794
|
+
}
|
|
1795
|
+
return this.escape(tableAlias.name);
|
|
1796
|
+
})
|
|
1797
|
+
: undefined;
|
|
1798
|
+
this.setLock(this.findOptions.lock.mode, undefined, tableNames);
|
|
1799
|
+
if (this.findOptions.lock.onLocked) {
|
|
1800
|
+
this.setOnLocked(this.findOptions.lock.onLocked);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
if (this.findOptions.loadRelationIds === true) {
|
|
1805
|
+
this.loadAllRelationIds();
|
|
1806
|
+
}
|
|
1807
|
+
else if (typeof this.findOptions.loadRelationIds === "object") {
|
|
1808
|
+
this.loadAllRelationIds(this.findOptions.loadRelationIds);
|
|
1809
|
+
}
|
|
1810
|
+
if (this.findOptions.loadEagerRelations !== false) {
|
|
1811
|
+
FindOptionsUtils_1.FindOptionsUtils.joinEagerRelations(this, this.expressionMap.mainAlias.name, this.expressionMap.mainAlias.metadata);
|
|
1812
|
+
}
|
|
1813
|
+
if (this.findOptions.transaction === true) {
|
|
1814
|
+
this.expressionMap.useTransaction = true;
|
|
1815
|
+
}
|
|
1816
|
+
// if (this.orderBys.length) {
|
|
1817
|
+
// this.orderBys.forEach(orderBy => {
|
|
1818
|
+
// this.addOrderBy(orderBy.alias, orderBy.direction, orderBy.nulls);
|
|
1819
|
+
// });
|
|
1820
|
+
// }
|
|
1821
|
+
// todo
|
|
1822
|
+
// if (this.options.options && this.options.options.eagerRelations) {
|
|
1823
|
+
// this.queryBuilder
|
|
1824
|
+
// }
|
|
1825
|
+
// todo
|
|
1826
|
+
// if (this.findOptions.options && this.findOptions.listeners === false) {
|
|
1827
|
+
// this.callListeners(false);
|
|
1828
|
+
// }
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* Executes sql generated by query builder and returns object with raw results and entities created from them.
|
|
1833
|
+
*/
|
|
1834
|
+
async executeEntitiesAndRawResults(queryRunner) {
|
|
1835
|
+
if (!this.expressionMap.mainAlias)
|
|
1836
|
+
throw new error_1.TypeORMError(`Alias is not set. Use "from" method to set an alias.`);
|
|
1837
|
+
if ((this.expressionMap.lockMode === "pessimistic_read" ||
|
|
1838
|
+
this.expressionMap.lockMode === "pessimistic_write" ||
|
|
1839
|
+
this.expressionMap.lockMode === "pessimistic_partial_write" ||
|
|
1840
|
+
this.expressionMap.lockMode === "pessimistic_write_or_fail" ||
|
|
1841
|
+
this.expressionMap.lockMode === "for_no_key_update" ||
|
|
1842
|
+
this.expressionMap.lockMode === "for_key_share") &&
|
|
1843
|
+
!queryRunner.isTransactionActive)
|
|
1844
|
+
throw new PessimisticLockTransactionRequiredError_1.PessimisticLockTransactionRequiredError();
|
|
1845
|
+
if (this.expressionMap.lockMode === "optimistic") {
|
|
1846
|
+
const metadata = this.expressionMap.mainAlias.metadata;
|
|
1847
|
+
if (!metadata.versionColumn && !metadata.updateDateColumn)
|
|
1848
|
+
throw new NoVersionOrUpdateDateColumnError_1.NoVersionOrUpdateDateColumnError(metadata.name);
|
|
1849
|
+
}
|
|
1850
|
+
const relationIdLoader = new RelationIdLoader_1.RelationIdLoader(this.connection, queryRunner, this.expressionMap.relationIdAttributes);
|
|
1851
|
+
const relationCountLoader = new RelationCountLoader_1.RelationCountLoader(this.connection, queryRunner, this.expressionMap.relationCountAttributes);
|
|
1852
|
+
const relationIdMetadataTransformer = new RelationIdMetadataToAttributeTransformer_1.RelationIdMetadataToAttributeTransformer(this.expressionMap);
|
|
1853
|
+
relationIdMetadataTransformer.transform();
|
|
1854
|
+
const relationCountMetadataTransformer = new RelationCountMetadataToAttributeTransformer_1.RelationCountMetadataToAttributeTransformer(this.expressionMap);
|
|
1855
|
+
relationCountMetadataTransformer.transform();
|
|
1856
|
+
let rawResults = [], entities = [];
|
|
1857
|
+
// for pagination enabled (e.g. skip and take) its much more complicated - its a special process
|
|
1858
|
+
// where we make two queries to find the data we need
|
|
1859
|
+
// first query find ids in skip and take range
|
|
1860
|
+
// and second query loads the actual data in given ids range
|
|
1861
|
+
if ((this.expressionMap.skip || this.expressionMap.take) &&
|
|
1862
|
+
this.expressionMap.joinAttributes.length > 0) {
|
|
1863
|
+
// we are skipping order by here because its not working in subqueries anyway
|
|
1864
|
+
// to make order by working we need to apply it on a distinct query
|
|
1865
|
+
const [selects, orderBys] = this.createOrderByCombinedWithSelectExpression("distinctAlias");
|
|
1866
|
+
const metadata = this.expressionMap.mainAlias.metadata;
|
|
1867
|
+
const mainAliasName = this.expressionMap.mainAlias.name;
|
|
1868
|
+
const querySelects = metadata.primaryColumns.map((primaryColumn) => {
|
|
1869
|
+
const distinctAlias = this.escape("distinctAlias");
|
|
1870
|
+
const columnAlias = this.escape(DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, mainAliasName, primaryColumn.databaseName));
|
|
1871
|
+
if (!orderBys[columnAlias])
|
|
1872
|
+
// make sure we aren't overriding user-defined order in inverse direction
|
|
1873
|
+
orderBys[columnAlias] = "ASC";
|
|
1874
|
+
const alias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, "ids_" + mainAliasName, primaryColumn.databaseName);
|
|
1875
|
+
return `${distinctAlias}.${columnAlias} AS ${this.escape(alias)}`;
|
|
1876
|
+
});
|
|
1877
|
+
rawResults = await new SelectQueryBuilder_1(this.connection, queryRunner)
|
|
1878
|
+
.select(`DISTINCT ${querySelects.join(", ")}`)
|
|
1879
|
+
.addSelect(selects)
|
|
1880
|
+
.from(`(${this.clone().orderBy().getQuery()})`, "distinctAlias")
|
|
1881
|
+
.offset(this.expressionMap.skip)
|
|
1882
|
+
.limit(this.expressionMap.take)
|
|
1883
|
+
.orderBy(orderBys)
|
|
1884
|
+
.cache(this.expressionMap.cache
|
|
1885
|
+
? this.expressionMap.cache
|
|
1886
|
+
: this.expressionMap.cacheId, this.expressionMap.cacheDuration)
|
|
1887
|
+
.setParameters(this.getParameters())
|
|
1888
|
+
.setNativeParameters(this.expressionMap.nativeParameters)
|
|
1889
|
+
.getRawMany();
|
|
1890
|
+
if (rawResults.length > 0) {
|
|
1891
|
+
let condition = "";
|
|
1892
|
+
const parameters = {};
|
|
1893
|
+
if (metadata.hasMultiplePrimaryKeys) {
|
|
1894
|
+
condition = rawResults
|
|
1895
|
+
.map((result, index) => {
|
|
1896
|
+
return metadata.primaryColumns
|
|
1897
|
+
.map((primaryColumn) => {
|
|
1898
|
+
const paramKey = `orm_distinct_ids_${index}_${primaryColumn.databaseName}`;
|
|
1899
|
+
parameters[paramKey] =
|
|
1900
|
+
result[`ids_${mainAliasName}_${primaryColumn.databaseName}`];
|
|
1901
|
+
return `${mainAliasName}.${primaryColumn.propertyPath}=:${paramKey}`;
|
|
1902
|
+
})
|
|
1903
|
+
.join(" AND ");
|
|
1904
|
+
})
|
|
1905
|
+
.join(" OR ");
|
|
1906
|
+
}
|
|
1907
|
+
else {
|
|
1908
|
+
const alias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, "ids_" + mainAliasName, metadata.primaryColumns[0].databaseName);
|
|
1909
|
+
const ids = rawResults.map((result) => result[alias]);
|
|
1910
|
+
const areAllNumbers = ids.every((id) => typeof id === "number");
|
|
1911
|
+
if (areAllNumbers) {
|
|
1912
|
+
// fixes #190. if all numbers then its safe to perform query without parameter
|
|
1913
|
+
condition = `${mainAliasName}.${metadata.primaryColumns[0].propertyPath} IN (${ids.join(", ")})`;
|
|
1914
|
+
}
|
|
1915
|
+
else {
|
|
1916
|
+
parameters["orm_distinct_ids"] = ids;
|
|
1917
|
+
condition =
|
|
1918
|
+
mainAliasName +
|
|
1919
|
+
"." +
|
|
1920
|
+
metadata.primaryColumns[0].propertyPath +
|
|
1921
|
+
" IN (:...orm_distinct_ids)";
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
rawResults = await this.clone()
|
|
1925
|
+
.mergeExpressionMap({
|
|
1926
|
+
extraAppendedAndWhereCondition: condition,
|
|
1927
|
+
})
|
|
1928
|
+
.setParameters(parameters)
|
|
1929
|
+
.loadRawResults(queryRunner);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
else {
|
|
1933
|
+
rawResults = await this.loadRawResults(queryRunner);
|
|
1934
|
+
}
|
|
1935
|
+
if (rawResults.length > 0) {
|
|
1936
|
+
// transform raw results into entities
|
|
1937
|
+
const rawRelationIdResults = await relationIdLoader.load(rawResults);
|
|
1938
|
+
const rawRelationCountResults = await relationCountLoader.load(rawResults);
|
|
1939
|
+
const transformer = new RawSqlResultsToEntityTransformer_1.RawSqlResultsToEntityTransformer(this.expressionMap, this.connection.driver, rawRelationIdResults, rawRelationCountResults, this.queryRunner);
|
|
1940
|
+
entities = transformer.transform(rawResults, this.expressionMap.mainAlias);
|
|
1941
|
+
// broadcast all "after load" events
|
|
1942
|
+
if (this.expressionMap.callListeners === true &&
|
|
1943
|
+
this.expressionMap.mainAlias.hasMetadata) {
|
|
1944
|
+
await queryRunner.broadcaster.broadcast("Load", this.expressionMap.mainAlias.metadata, entities);
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
if (this.expressionMap.relationLoadStrategy === "query") {
|
|
1948
|
+
await Promise.all(this.relationMetadatas.map(async (relation) => {
|
|
1949
|
+
const relationTarget = relation.inverseEntityMetadata.target;
|
|
1950
|
+
const relationAlias = relation.inverseEntityMetadata.targetName;
|
|
1951
|
+
const select = Array.isArray(this.findOptions.select)
|
|
1952
|
+
? OrmUtils_1.OrmUtils.propertyPathsToTruthyObject(this.findOptions.select)
|
|
1953
|
+
: this.findOptions.select;
|
|
1954
|
+
const relations = Array.isArray(this.findOptions.relations)
|
|
1955
|
+
? OrmUtils_1.OrmUtils.propertyPathsToTruthyObject(this.findOptions.relations)
|
|
1956
|
+
: this.findOptions.relations;
|
|
1957
|
+
const queryBuilder = this.createQueryBuilder()
|
|
1958
|
+
.select(relationAlias)
|
|
1959
|
+
.from(relationTarget, relationAlias)
|
|
1960
|
+
.setFindOptions({
|
|
1961
|
+
select: select
|
|
1962
|
+
? OrmUtils_1.OrmUtils.deepValue(select, relation.propertyPath)
|
|
1963
|
+
: undefined,
|
|
1964
|
+
order: this.findOptions.order
|
|
1965
|
+
? OrmUtils_1.OrmUtils.deepValue(this.findOptions.order, relation.propertyPath)
|
|
1966
|
+
: undefined,
|
|
1967
|
+
relations: relations
|
|
1968
|
+
? OrmUtils_1.OrmUtils.deepValue(relations, relation.propertyPath)
|
|
1969
|
+
: undefined,
|
|
1970
|
+
withDeleted: this.findOptions.withDeleted,
|
|
1971
|
+
relationLoadStrategy: this.findOptions.relationLoadStrategy,
|
|
1972
|
+
});
|
|
1973
|
+
if (entities.length > 0) {
|
|
1974
|
+
const relatedEntityGroups = await this.connection.relationIdLoader.loadManyToManyRelationIdsAndGroup(relation, entities, undefined, queryBuilder);
|
|
1975
|
+
entities.forEach((entity) => {
|
|
1976
|
+
const relatedEntityGroup = relatedEntityGroups.find((group) => group.entity === entity);
|
|
1977
|
+
if (relatedEntityGroup) {
|
|
1978
|
+
const value = relatedEntityGroup.related === undefined
|
|
1979
|
+
? null
|
|
1980
|
+
: relatedEntityGroup.related;
|
|
1981
|
+
relation.setEntityValue(entity, value);
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
}));
|
|
1986
|
+
}
|
|
1987
|
+
return {
|
|
1988
|
+
raw: rawResults,
|
|
1989
|
+
entities: entities,
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
createOrderByCombinedWithSelectExpression(parentAlias) {
|
|
1993
|
+
// if table has a default order then apply it
|
|
1994
|
+
const orderBys = this.expressionMap.allOrderBys;
|
|
1995
|
+
const selectString = Object.keys(orderBys)
|
|
1996
|
+
.map((orderCriteria) => {
|
|
1997
|
+
if (orderCriteria.indexOf(".") !== -1) {
|
|
1998
|
+
const criteriaParts = orderCriteria.split(".");
|
|
1999
|
+
const aliasName = criteriaParts[0];
|
|
2000
|
+
const propertyPath = criteriaParts.slice(1).join(".");
|
|
2001
|
+
const alias = this.expressionMap.findAliasByName(aliasName);
|
|
2002
|
+
const column = alias.metadata.findColumnWithPropertyPath(propertyPath);
|
|
2003
|
+
return (this.escape(parentAlias) +
|
|
2004
|
+
"." +
|
|
2005
|
+
this.escape(DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, aliasName, column.databaseName)));
|
|
2006
|
+
}
|
|
2007
|
+
else {
|
|
2008
|
+
if (this.expressionMap.selects.find((select) => select.selection === orderCriteria ||
|
|
2009
|
+
select.aliasName === orderCriteria))
|
|
2010
|
+
return this.escape(parentAlias) + "." + orderCriteria;
|
|
2011
|
+
return "";
|
|
2012
|
+
}
|
|
2013
|
+
})
|
|
2014
|
+
.join(", ");
|
|
2015
|
+
const orderByObject = {};
|
|
2016
|
+
Object.keys(orderBys).forEach((orderCriteria) => {
|
|
2017
|
+
if (orderCriteria.indexOf(".") !== -1) {
|
|
2018
|
+
const criteriaParts = orderCriteria.split(".");
|
|
2019
|
+
const aliasName = criteriaParts[0];
|
|
2020
|
+
const propertyPath = criteriaParts.slice(1).join(".");
|
|
2021
|
+
const alias = this.expressionMap.findAliasByName(aliasName);
|
|
2022
|
+
const column = alias.metadata.findColumnWithPropertyPath(propertyPath);
|
|
2023
|
+
orderByObject[this.escape(parentAlias) +
|
|
2024
|
+
"." +
|
|
2025
|
+
this.escape(DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, aliasName, column.databaseName))] = orderBys[orderCriteria];
|
|
2026
|
+
}
|
|
2027
|
+
else {
|
|
2028
|
+
if (this.expressionMap.selects.find((select) => select.selection === orderCriteria ||
|
|
2029
|
+
select.aliasName === orderCriteria)) {
|
|
2030
|
+
orderByObject[this.escape(parentAlias) + "." + orderCriteria] = orderBys[orderCriteria];
|
|
2031
|
+
}
|
|
2032
|
+
else {
|
|
2033
|
+
orderByObject[orderCriteria] = orderBys[orderCriteria];
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
});
|
|
2037
|
+
return [selectString, orderByObject];
|
|
2038
|
+
}
|
|
2039
|
+
/**
|
|
2040
|
+
* Loads raw results from the database.
|
|
2041
|
+
*/
|
|
2042
|
+
async loadRawResults(queryRunner) {
|
|
2043
|
+
const [sql, parameters] = this.getQueryAndParameters();
|
|
2044
|
+
const queryId = sql + " -- PARAMETERS: " + JSON.stringify(parameters);
|
|
2045
|
+
const cacheOptions = typeof this.connection.options.cache === "object"
|
|
2046
|
+
? this.connection.options.cache
|
|
2047
|
+
: {};
|
|
2048
|
+
let savedQueryResultCacheOptions = undefined;
|
|
2049
|
+
let cacheError = false;
|
|
2050
|
+
if (this.connection.queryResultCache &&
|
|
2051
|
+
(this.expressionMap.cache || cacheOptions.alwaysEnabled)) {
|
|
2052
|
+
try {
|
|
2053
|
+
savedQueryResultCacheOptions =
|
|
2054
|
+
await this.connection.queryResultCache.getFromCache({
|
|
2055
|
+
identifier: this.expressionMap.cacheId,
|
|
2056
|
+
query: queryId,
|
|
2057
|
+
duration: this.expressionMap.cacheDuration ||
|
|
2058
|
+
cacheOptions.duration ||
|
|
2059
|
+
1000,
|
|
2060
|
+
}, queryRunner);
|
|
2061
|
+
if (savedQueryResultCacheOptions &&
|
|
2062
|
+
!this.connection.queryResultCache.isExpired(savedQueryResultCacheOptions)) {
|
|
2063
|
+
return JSON.parse(savedQueryResultCacheOptions.result);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
catch (error) {
|
|
2067
|
+
if (!cacheOptions.ignoreErrors) {
|
|
2068
|
+
throw error;
|
|
2069
|
+
}
|
|
2070
|
+
cacheError = true;
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
const results = await queryRunner.query(sql, parameters, true);
|
|
2074
|
+
if (!cacheError &&
|
|
2075
|
+
this.connection.queryResultCache &&
|
|
2076
|
+
(this.expressionMap.cache || cacheOptions.alwaysEnabled)) {
|
|
2077
|
+
try {
|
|
2078
|
+
await this.connection.queryResultCache.storeInCache({
|
|
2079
|
+
identifier: this.expressionMap.cacheId,
|
|
2080
|
+
query: queryId,
|
|
2081
|
+
time: new Date().getTime(),
|
|
2082
|
+
duration: this.expressionMap.cacheDuration ||
|
|
2083
|
+
cacheOptions.duration ||
|
|
2084
|
+
1000,
|
|
2085
|
+
result: JSON.stringify(results.records),
|
|
2086
|
+
}, savedQueryResultCacheOptions, queryRunner);
|
|
2087
|
+
}
|
|
2088
|
+
catch (error) {
|
|
2089
|
+
if (!cacheOptions.ignoreErrors) {
|
|
2090
|
+
throw error;
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
return results.records;
|
|
2095
|
+
}
|
|
2096
|
+
/**
|
|
2097
|
+
* Merges into expression map given expression map properties.
|
|
2098
|
+
*/
|
|
2099
|
+
mergeExpressionMap(expressionMap) {
|
|
2100
|
+
ObjectUtils_1.ObjectUtils.assign(this.expressionMap, expressionMap);
|
|
2101
|
+
return this;
|
|
2102
|
+
}
|
|
2103
|
+
/**
|
|
2104
|
+
* Normalizes a give number - converts to int if possible.
|
|
2105
|
+
*/
|
|
2106
|
+
normalizeNumber(num) {
|
|
2107
|
+
if (typeof num === "number" || num === undefined || num === null)
|
|
2108
|
+
return num;
|
|
2109
|
+
return Number(num);
|
|
2110
|
+
}
|
|
2111
|
+
/**
|
|
2112
|
+
* Creates a query builder used to execute sql queries inside this query builder.
|
|
2113
|
+
*/
|
|
2114
|
+
obtainQueryRunner() {
|
|
2115
|
+
return this.queryRunner || this.connection.createQueryRunner("slave");
|
|
2116
|
+
}
|
|
2117
|
+
buildSelect(select, metadata, alias, embedPrefix) {
|
|
2118
|
+
for (let key in select) {
|
|
2119
|
+
if (select[key] === undefined || select[key] === false)
|
|
2120
|
+
continue;
|
|
2121
|
+
const propertyPath = embedPrefix ? embedPrefix + "." + key : key;
|
|
2122
|
+
const column = metadata.findColumnWithPropertyPathStrict(propertyPath);
|
|
2123
|
+
const embed = metadata.findEmbeddedWithPropertyPath(propertyPath);
|
|
2124
|
+
const relation = metadata.findRelationWithPropertyPath(propertyPath);
|
|
2125
|
+
if (!embed && !column && !relation)
|
|
2126
|
+
throw new EntityPropertyNotFoundError_1.EntityPropertyNotFoundError(propertyPath, metadata);
|
|
2127
|
+
if (column) {
|
|
2128
|
+
this.selects.push(alias + "." + propertyPath);
|
|
2129
|
+
// this.addSelect(alias + "." + propertyPath);
|
|
2130
|
+
}
|
|
2131
|
+
else if (embed) {
|
|
2132
|
+
this.buildSelect(// @ts-ignore
|
|
2133
|
+
select[key], metadata, alias, propertyPath);
|
|
2134
|
+
// } else if (relation) {
|
|
2135
|
+
// const joinAlias = alias + "_" + relation.propertyName;
|
|
2136
|
+
// const existJoin = this.joins.find(join => join.alias === joinAlias);
|
|
2137
|
+
// if (!existJoin) {
|
|
2138
|
+
// this.joins.push({
|
|
2139
|
+
// type: "left",
|
|
2140
|
+
// select: false,
|
|
2141
|
+
// alias: joinAlias,
|
|
2142
|
+
// parentAlias: alias,
|
|
2143
|
+
// relationMetadata: relation
|
|
2144
|
+
// });
|
|
2145
|
+
// }
|
|
2146
|
+
// this.buildOrder(select[key] as FindOptionsOrder<any>, relation.inverseEntityMetadata, joinAlias);
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
buildRelations(relations, selection, metadata, alias, embedPrefix) {
|
|
2151
|
+
if (!relations)
|
|
2152
|
+
return;
|
|
2153
|
+
Object.keys(relations).forEach((relationName) => {
|
|
2154
|
+
const relationValue = relations[relationName];
|
|
2155
|
+
const propertyPath = embedPrefix
|
|
2156
|
+
? embedPrefix + "." + relationName
|
|
2157
|
+
: relationName;
|
|
2158
|
+
const embed = metadata.findEmbeddedWithPropertyPath(propertyPath);
|
|
2159
|
+
const relation = metadata.findRelationWithPropertyPath(propertyPath);
|
|
2160
|
+
if (!embed && !relation)
|
|
2161
|
+
throw new EntityPropertyNotFoundError_1.EntityPropertyNotFoundError(propertyPath, metadata);
|
|
2162
|
+
if (embed) {
|
|
2163
|
+
this.buildRelations(relationValue, typeof selection === "object"
|
|
2164
|
+
? OrmUtils_1.OrmUtils.deepValue(selection, embed.propertyPath)
|
|
2165
|
+
: undefined, metadata, alias, propertyPath);
|
|
2166
|
+
}
|
|
2167
|
+
else if (relation) {
|
|
2168
|
+
let joinAlias = alias + "_" + propertyPath.replace(".", "_");
|
|
2169
|
+
joinAlias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, { joiner: "__" }, alias, joinAlias);
|
|
2170
|
+
if (relationValue === true ||
|
|
2171
|
+
typeof relationValue === "object") {
|
|
2172
|
+
if (this.expressionMap.relationLoadStrategy === "query") {
|
|
2173
|
+
this.relationMetadatas.push(relation);
|
|
2174
|
+
}
|
|
2175
|
+
else {
|
|
2176
|
+
// join
|
|
2177
|
+
this.joins.push({
|
|
2178
|
+
type: "left",
|
|
2179
|
+
select: true,
|
|
2180
|
+
selection: selection &&
|
|
2181
|
+
typeof selection[relationName] === "object" // @ts-ignore
|
|
2182
|
+
? selection[relationName]
|
|
2183
|
+
: undefined,
|
|
2184
|
+
alias: joinAlias,
|
|
2185
|
+
parentAlias: alias,
|
|
2186
|
+
relationMetadata: relation,
|
|
2187
|
+
});
|
|
2188
|
+
if (selection &&
|
|
2189
|
+
typeof selection[relationName] === "object") {
|
|
2190
|
+
this.buildSelect(// @ts-ignore
|
|
2191
|
+
selection[relationName], relation.inverseEntityMetadata, joinAlias);
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
if (typeof relationValue === "object" &&
|
|
2196
|
+
this.expressionMap.relationLoadStrategy === "join") {
|
|
2197
|
+
this.buildRelations(relationValue, typeof selection === "object"
|
|
2198
|
+
? OrmUtils_1.OrmUtils.deepValue(selection, relation.propertyPath)
|
|
2199
|
+
: undefined, relation.inverseEntityMetadata, joinAlias, undefined);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
});
|
|
2203
|
+
}
|
|
2204
|
+
buildEagerRelations(relations, selection, metadata, alias, embedPrefix) {
|
|
2205
|
+
if (!relations)
|
|
2206
|
+
return;
|
|
2207
|
+
Object.keys(relations).forEach((relationName) => {
|
|
2208
|
+
const relationValue = relations[relationName];
|
|
2209
|
+
const propertyPath = embedPrefix
|
|
2210
|
+
? embedPrefix + "." + relationName
|
|
2211
|
+
: relationName;
|
|
2212
|
+
const embed = metadata.findEmbeddedWithPropertyPath(propertyPath);
|
|
2213
|
+
const relation = metadata.findRelationWithPropertyPath(propertyPath);
|
|
2214
|
+
if (!embed && !relation)
|
|
2215
|
+
throw new EntityPropertyNotFoundError_1.EntityPropertyNotFoundError(propertyPath, metadata);
|
|
2216
|
+
if (embed) {
|
|
2217
|
+
this.buildEagerRelations(relationValue, typeof selection === "object"
|
|
2218
|
+
? OrmUtils_1.OrmUtils.deepValue(selection, embed.propertyPath)
|
|
2219
|
+
: undefined, metadata, alias, propertyPath);
|
|
2220
|
+
}
|
|
2221
|
+
else if (relation) {
|
|
2222
|
+
let joinAlias = alias + "_" + propertyPath.replace(".", "_");
|
|
2223
|
+
joinAlias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, { joiner: "__" }, alias, joinAlias);
|
|
2224
|
+
if (relationValue === true ||
|
|
2225
|
+
typeof relationValue === "object") {
|
|
2226
|
+
relation.inverseEntityMetadata.eagerRelations.forEach((eagerRelation) => {
|
|
2227
|
+
let eagerRelationJoinAlias = joinAlias +
|
|
2228
|
+
"_" +
|
|
2229
|
+
eagerRelation.propertyPath.replace(".", "_");
|
|
2230
|
+
eagerRelationJoinAlias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, { joiner: "__" }, joinAlias, eagerRelationJoinAlias);
|
|
2231
|
+
const existJoin = this.joins.find((join) => join.alias === eagerRelationJoinAlias);
|
|
2232
|
+
if (!existJoin) {
|
|
2233
|
+
this.joins.push({
|
|
2234
|
+
type: "left",
|
|
2235
|
+
select: true,
|
|
2236
|
+
alias: eagerRelationJoinAlias,
|
|
2237
|
+
parentAlias: joinAlias,
|
|
2238
|
+
selection: undefined,
|
|
2239
|
+
relationMetadata: eagerRelation,
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
if (selection &&
|
|
2243
|
+
typeof selection[relationName] === "object") {
|
|
2244
|
+
this.buildSelect(// @ts-ignore
|
|
2245
|
+
selection[relationName], relation.inverseEntityMetadata, joinAlias);
|
|
2246
|
+
}
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
if (typeof relationValue === "object") {
|
|
2250
|
+
this.buildEagerRelations(relationValue, typeof selection === "object"
|
|
2251
|
+
? OrmUtils_1.OrmUtils.deepValue(selection, relation.propertyPath)
|
|
2252
|
+
: undefined, relation.inverseEntityMetadata, joinAlias, undefined);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
buildOrder(order, metadata, alias, embedPrefix) {
|
|
2258
|
+
for (let key in order) {
|
|
2259
|
+
if (order[key] === undefined)
|
|
2260
|
+
continue;
|
|
2261
|
+
const propertyPath = embedPrefix ? embedPrefix + "." + key : key;
|
|
2262
|
+
const column = metadata.findColumnWithPropertyPathStrict(propertyPath);
|
|
2263
|
+
const embed = metadata.findEmbeddedWithPropertyPath(propertyPath);
|
|
2264
|
+
const relation = metadata.findRelationWithPropertyPath(propertyPath);
|
|
2265
|
+
if (!embed && !column && !relation)
|
|
2266
|
+
throw new EntityPropertyNotFoundError_1.EntityPropertyNotFoundError(propertyPath, metadata);
|
|
2267
|
+
if (column) {
|
|
2268
|
+
let direction = typeof order[key] === "object"
|
|
2269
|
+
? order[key].direction
|
|
2270
|
+
: order[key];
|
|
2271
|
+
direction =
|
|
2272
|
+
direction === "DESC" ||
|
|
2273
|
+
direction === "desc" ||
|
|
2274
|
+
direction === -1
|
|
2275
|
+
? "DESC"
|
|
2276
|
+
: "ASC";
|
|
2277
|
+
let nulls = typeof order[key] === "object"
|
|
2278
|
+
? order[key].nulls
|
|
2279
|
+
: undefined;
|
|
2280
|
+
nulls =
|
|
2281
|
+
nulls?.toLowerCase() === "first"
|
|
2282
|
+
? "NULLS FIRST"
|
|
2283
|
+
: nulls?.toLowerCase() === "last"
|
|
2284
|
+
? "NULLS LAST"
|
|
2285
|
+
: undefined;
|
|
2286
|
+
let aliasPath = `${alias}.${propertyPath}`;
|
|
2287
|
+
if (column.isVirtualProperty && column.query) {
|
|
2288
|
+
const selection = this.expressionMap.selects.find((s) => s.selection === aliasPath);
|
|
2289
|
+
if (selection) {
|
|
2290
|
+
// this is not building correctly now???
|
|
2291
|
+
aliasPath = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, alias, column.databaseName);
|
|
2292
|
+
selection.aliasName = aliasPath;
|
|
2293
|
+
}
|
|
2294
|
+
else {
|
|
2295
|
+
aliasPath = `(${column.query(alias)})`;
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
this.addOrderBy(aliasPath, direction, nulls);
|
|
2299
|
+
// this.orderBys.push({ alias: alias + "." + propertyPath, direction, nulls });
|
|
2300
|
+
}
|
|
2301
|
+
else if (embed) {
|
|
2302
|
+
this.buildOrder(order[key], metadata, alias, propertyPath);
|
|
2303
|
+
}
|
|
2304
|
+
else if (relation) {
|
|
2305
|
+
let joinAlias = alias + "_" + propertyPath.replace(".", "_");
|
|
2306
|
+
joinAlias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, { joiner: "__" }, alias, joinAlias);
|
|
2307
|
+
// console.log("joinAlias", joinAlias, joinAlias.length, this.connection.driver.maxAliasLength)
|
|
2308
|
+
// todo: use expressionMap.joinAttributes, and create a new one using
|
|
2309
|
+
// const joinAttribute = new JoinAttribute(this.connection, this.expressionMap);
|
|
2310
|
+
const existJoin = this.joins.find((join) => join.alias === joinAlias);
|
|
2311
|
+
if (!existJoin) {
|
|
2312
|
+
this.joins.push({
|
|
2313
|
+
type: "left",
|
|
2314
|
+
select: false,
|
|
2315
|
+
alias: joinAlias,
|
|
2316
|
+
parentAlias: alias,
|
|
2317
|
+
selection: undefined,
|
|
2318
|
+
relationMetadata: relation,
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
this.buildOrder(order[key], relation.inverseEntityMetadata, joinAlias);
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
buildWhere(where, metadata, alias, embedPrefix) {
|
|
2326
|
+
let condition = "";
|
|
2327
|
+
// let parameterIndex = Object.keys(this.expressionMap.nativeParameters).length;
|
|
2328
|
+
if (Array.isArray(where)) {
|
|
2329
|
+
condition =
|
|
2330
|
+
"(" +
|
|
2331
|
+
where
|
|
2332
|
+
.map((whereItem) => {
|
|
2333
|
+
return this.buildWhere(whereItem, metadata, alias, embedPrefix);
|
|
2334
|
+
})
|
|
2335
|
+
.filter((condition) => !!condition)
|
|
2336
|
+
.map((condition) => "(" + condition + ")")
|
|
2337
|
+
.join(" OR ") +
|
|
2338
|
+
")";
|
|
2339
|
+
}
|
|
2340
|
+
else {
|
|
2341
|
+
let andConditions = [];
|
|
2342
|
+
for (let key in where) {
|
|
2343
|
+
if (where[key] === undefined || where[key] === null)
|
|
2344
|
+
continue;
|
|
2345
|
+
const propertyPath = embedPrefix ? embedPrefix + "." + key : key;
|
|
2346
|
+
const column = metadata.findColumnWithPropertyPathStrict(propertyPath);
|
|
2347
|
+
const embed = metadata.findEmbeddedWithPropertyPath(propertyPath);
|
|
2348
|
+
const relation = metadata.findRelationWithPropertyPath(propertyPath);
|
|
2349
|
+
if (!embed && !column && !relation)
|
|
2350
|
+
throw new EntityPropertyNotFoundError_1.EntityPropertyNotFoundError(propertyPath, metadata);
|
|
2351
|
+
if (column) {
|
|
2352
|
+
let aliasPath = `${alias}.${propertyPath}`;
|
|
2353
|
+
if (column.isVirtualProperty && column.query) {
|
|
2354
|
+
aliasPath = `(${column.query(alias)})`;
|
|
2355
|
+
}
|
|
2356
|
+
// const parameterName = alias + "_" + propertyPath.split(".").join("_") + "_" + parameterIndex;
|
|
2357
|
+
// todo: we need to handle other operators as well?
|
|
2358
|
+
let parameterValue = where[key];
|
|
2359
|
+
if (InstanceChecker_1.InstanceChecker.isEqualOperator(where[key])) {
|
|
2360
|
+
parameterValue = where[key].value;
|
|
2361
|
+
}
|
|
2362
|
+
if (column.transformer) {
|
|
2363
|
+
parameterValue = ApplyValueTransformers_1.ApplyValueTransformers.transformTo(column.transformer, parameterValue);
|
|
2364
|
+
}
|
|
2365
|
+
// if (parameterValue === null) {
|
|
2366
|
+
// andConditions.push(`${aliasPath} IS NULL`);
|
|
2367
|
+
//
|
|
2368
|
+
// } else if (parameterValue instanceof FindOperator) {
|
|
2369
|
+
// // let parameters: any[] = [];
|
|
2370
|
+
// // if (parameterValue.useParameter) {
|
|
2371
|
+
// // const realParameterValues: any[] = parameterValue.multipleParameters ? parameterValue.value : [parameterValue.value];
|
|
2372
|
+
// // realParameterValues.forEach((realParameterValue, realParameterValueIndex) => {
|
|
2373
|
+
// //
|
|
2374
|
+
// // // don't create parameters for number to prevent max number of variables issues as much as possible
|
|
2375
|
+
// // if (typeof realParameterValue === "number") {
|
|
2376
|
+
// // parameters.push(realParameterValue);
|
|
2377
|
+
// //
|
|
2378
|
+
// // } else {
|
|
2379
|
+
// // this.expressionMap.nativeParameters[parameterName + realParameterValueIndex] = realParameterValue;
|
|
2380
|
+
// // parameterIndex++;
|
|
2381
|
+
// // parameters.push(this.connection.driver.createParameter(parameterName + realParameterValueIndex, parameterIndex - 1));
|
|
2382
|
+
// // }
|
|
2383
|
+
// // });
|
|
2384
|
+
// // }
|
|
2385
|
+
// andConditions.push(
|
|
2386
|
+
// this.createWhereConditionExpression(this.getWherePredicateCondition(aliasPath, parameterValue))
|
|
2387
|
+
// // parameterValue.toSql(this.connection, aliasPath, parameters));
|
|
2388
|
+
// )
|
|
2389
|
+
//
|
|
2390
|
+
// } else {
|
|
2391
|
+
// this.expressionMap.nativeParameters[parameterName] = parameterValue;
|
|
2392
|
+
// parameterIndex++;
|
|
2393
|
+
// const parameter = this.connection.driver.createParameter(parameterName, parameterIndex - 1);
|
|
2394
|
+
// andConditions.push(`${aliasPath} = ${parameter}`);
|
|
2395
|
+
// }
|
|
2396
|
+
andConditions.push(this.createWhereConditionExpression(this.getWherePredicateCondition(aliasPath, parameterValue)));
|
|
2397
|
+
// this.conditions.push(`${alias}.${propertyPath} = :${paramName}`);
|
|
2398
|
+
// this.expressionMap.parameters[paramName] = where[key]; // todo: handle functions and other edge cases
|
|
2399
|
+
}
|
|
2400
|
+
else if (embed) {
|
|
2401
|
+
const condition = this.buildWhere(where[key], metadata, alias, propertyPath);
|
|
2402
|
+
if (condition)
|
|
2403
|
+
andConditions.push(condition);
|
|
2404
|
+
}
|
|
2405
|
+
else if (relation) {
|
|
2406
|
+
// if all properties of where are undefined we don't need to join anything
|
|
2407
|
+
// this can happen when user defines map with conditional queries inside
|
|
2408
|
+
if (typeof where[key] === "object") {
|
|
2409
|
+
const allAllUndefined = Object.keys(where[key]).every((k) => where[key][k] === undefined);
|
|
2410
|
+
if (allAllUndefined) {
|
|
2411
|
+
continue;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
if (InstanceChecker_1.InstanceChecker.isFindOperator(where[key])) {
|
|
2415
|
+
if (where[key].type === "moreThan" ||
|
|
2416
|
+
where[key].type === "lessThan") {
|
|
2417
|
+
const sqlOperator = where[key].type === "moreThan" ? ">" : "<";
|
|
2418
|
+
// basically relation count functionality
|
|
2419
|
+
const qb = this.subQuery();
|
|
2420
|
+
if (relation.isManyToManyOwner) {
|
|
2421
|
+
qb.select("COUNT(*)")
|
|
2422
|
+
.from(relation.joinTableName, relation.joinTableName)
|
|
2423
|
+
.where(relation.joinColumns
|
|
2424
|
+
.map((column) => {
|
|
2425
|
+
return `${relation.joinTableName}.${column.propertyName} = ${alias}.${column.referencedColumn
|
|
2426
|
+
.propertyName}`;
|
|
2427
|
+
})
|
|
2428
|
+
.join(" AND "));
|
|
2429
|
+
}
|
|
2430
|
+
else if (relation.isManyToManyNotOwner) {
|
|
2431
|
+
qb.select("COUNT(*)")
|
|
2432
|
+
.from(relation.inverseRelation.joinTableName, relation.inverseRelation.joinTableName)
|
|
2433
|
+
.where(relation
|
|
2434
|
+
.inverseRelation.inverseJoinColumns.map((column) => {
|
|
2435
|
+
return `${relation.inverseRelation
|
|
2436
|
+
.joinTableName}.${column.propertyName} = ${alias}.${column.referencedColumn
|
|
2437
|
+
.propertyName}`;
|
|
2438
|
+
})
|
|
2439
|
+
.join(" AND "));
|
|
2440
|
+
}
|
|
2441
|
+
else if (relation.isOneToMany) {
|
|
2442
|
+
qb.select("COUNT(*)")
|
|
2443
|
+
.from(relation.inverseEntityMetadata.target, relation.inverseEntityMetadata
|
|
2444
|
+
.tableName)
|
|
2445
|
+
.where(relation
|
|
2446
|
+
.inverseRelation.joinColumns.map((column) => {
|
|
2447
|
+
return `${relation
|
|
2448
|
+
.inverseEntityMetadata
|
|
2449
|
+
.tableName}.${column.propertyName} = ${alias}.${column.referencedColumn
|
|
2450
|
+
.propertyName}`;
|
|
2451
|
+
})
|
|
2452
|
+
.join(" AND "));
|
|
2453
|
+
}
|
|
2454
|
+
else {
|
|
2455
|
+
throw new Error(`This relation isn't supported by given find operator`);
|
|
2456
|
+
}
|
|
2457
|
+
// this
|
|
2458
|
+
// .addSelect(qb.getSql(), relation.propertyAliasName + "_cnt")
|
|
2459
|
+
// .andWhere(this.escape(relation.propertyAliasName + "_cnt") + " " + sqlOperator + " " + parseInt(where[key].value));
|
|
2460
|
+
this.andWhere(qb.getSql() +
|
|
2461
|
+
" " +
|
|
2462
|
+
sqlOperator +
|
|
2463
|
+
" " +
|
|
2464
|
+
parseInt(where[key].value));
|
|
2465
|
+
}
|
|
2466
|
+
else {
|
|
2467
|
+
if (relation.isManyToOne ||
|
|
2468
|
+
(relation.isOneToOne &&
|
|
2469
|
+
relation.isOneToOneOwner)) {
|
|
2470
|
+
const aliasPath = `${alias}.${propertyPath}`;
|
|
2471
|
+
andConditions.push(this.createWhereConditionExpression(this.getWherePredicateCondition(aliasPath, where[key])));
|
|
2472
|
+
}
|
|
2473
|
+
else {
|
|
2474
|
+
throw new Error(`This relation isn't supported by given find operator`);
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
else {
|
|
2479
|
+
// const joinAlias = alias + "_" + relation.propertyName;
|
|
2480
|
+
let joinAlias = alias +
|
|
2481
|
+
"_" +
|
|
2482
|
+
relation.propertyPath.replace(".", "_");
|
|
2483
|
+
joinAlias = DriverUtils_1.DriverUtils.buildAlias(this.connection.driver, { joiner: "__" }, alias, joinAlias);
|
|
2484
|
+
const existJoin = this.joins.find((join) => join.alias === joinAlias);
|
|
2485
|
+
if (!existJoin) {
|
|
2486
|
+
this.joins.push({
|
|
2487
|
+
type: "inner",
|
|
2488
|
+
select: false,
|
|
2489
|
+
selection: undefined,
|
|
2490
|
+
alias: joinAlias,
|
|
2491
|
+
parentAlias: alias,
|
|
2492
|
+
relationMetadata: relation,
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
else {
|
|
2496
|
+
if (existJoin.type === "left")
|
|
2497
|
+
existJoin.type = "inner";
|
|
2498
|
+
}
|
|
2499
|
+
const condition = this.buildWhere(where[key], relation.inverseEntityMetadata, joinAlias);
|
|
2500
|
+
if (condition) {
|
|
2501
|
+
andConditions.push(condition);
|
|
2502
|
+
// parameterIndex = Object.keys(this.expressionMap.nativeParameters).length;
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
condition = andConditions.join(" AND ");
|
|
2508
|
+
}
|
|
2509
|
+
return condition;
|
|
2510
|
+
}
|
|
2511
|
+
};
|
|
2512
|
+
exports.SelectQueryBuilder = SelectQueryBuilder;
|
|
2513
|
+
exports.SelectQueryBuilder = SelectQueryBuilder = SelectQueryBuilder_1 = __decorate([
|
|
2514
|
+
lib_prod_1.CLASS.NAME('SelectQueryBuilder')
|
|
2515
|
+
], SelectQueryBuilder);
|
|
2516
|
+
//# sourceMappingURL=SelectQueryBuilder.js.map
|