taon-typeorm 18.0.19 → 18.0.21
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/typeorm/driver/cordova/CordovaDriver.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/cordova/CordovaQueryRunner.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/nativescript/NativescriptDriver.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/nativescript/NativescriptQueryRunner.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/react-native/ReactNativeDriver.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/react-native/ReactNativeQueryRunner.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/sqljs/SqljsDriver.mjs +1 -1
- package/browser/esm2022/lib/typeorm/driver/sqljs/SqljsQueryRunner.mjs +1 -1
- package/browser/esm2022/lib/typeorm/index.mjs +1 -3
- package/browser/fesm2022/taon-typeorm.mjs.map +1 -1
- package/client/esm2022/lib/typeorm/driver/cordova/CordovaDriver.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/cordova/CordovaQueryRunner.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/nativescript/NativescriptDriver.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/nativescript/NativescriptQueryRunner.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/react-native/ReactNativeDriver.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/react-native/ReactNativeQueryRunner.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/sqljs/SqljsDriver.mjs +1 -1
- package/client/esm2022/lib/typeorm/driver/sqljs/SqljsQueryRunner.mjs +1 -1
- package/client/esm2022/lib/typeorm/index.mjs +1 -3
- package/client/fesm2022/taon-typeorm.mjs.map +1 -1
- package/index.js +15 -2
- package/index.js.map +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/index._auto-generated_.d.ts +1 -0
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/index.js +15 -2
- package/lib/index.js.map +1 -1
- package/lib/typeorm/cache/DbQueryResultCache.js +178 -231
- package/lib/typeorm/cache/DbQueryResultCache.js.map +1 -1
- package/lib/typeorm/cache/QueryResultCache.js.map +1 -1
- package/lib/typeorm/cache/QueryResultCacheFactory.js +11 -11
- package/lib/typeorm/cache/QueryResultCacheFactory.js.map +1 -1
- package/lib/typeorm/cache/QueryResultCacheOptions.js.map +1 -1
- package/lib/typeorm/cache/RedisQueryResultCache.js +121 -149
- package/lib/typeorm/cache/RedisQueryResultCache.js.map +1 -1
- package/lib/typeorm/cli-ts-node-commonjs.js.map +1 -1
- package/lib/typeorm/cli-ts-node-esm.js +7 -5
- package/lib/typeorm/cli-ts-node-esm.js.map +1 -1
- package/lib/typeorm/cli.d.ts +1 -1
- package/lib/typeorm/cli.js +15 -16
- package/lib/typeorm/cli.js.map +1 -1
- package/lib/typeorm/commands/CacheClearCommand.js +37 -65
- package/lib/typeorm/commands/CacheClearCommand.js.map +1 -1
- package/lib/typeorm/commands/CommandUtils.js +57 -112
- package/lib/typeorm/commands/CommandUtils.js.map +1 -1
- package/lib/typeorm/commands/EntityCreateCommand.js +35 -47
- package/lib/typeorm/commands/EntityCreateCommand.js.map +1 -1
- package/lib/typeorm/commands/InitCommand.js +397 -168
- package/lib/typeorm/commands/InitCommand.js.map +1 -1
- package/lib/typeorm/commands/MigrationCreateCommand.js +58 -52
- package/lib/typeorm/commands/MigrationCreateCommand.js.map +1 -1
- package/lib/typeorm/commands/MigrationGenerateCommand.js +141 -138
- package/lib/typeorm/commands/MigrationGenerateCommand.js.map +1 -1
- package/lib/typeorm/commands/MigrationRevertCommand.js +49 -77
- package/lib/typeorm/commands/MigrationRevertCommand.js.map +1 -1
- package/lib/typeorm/commands/MigrationRunCommand.js +52 -82
- package/lib/typeorm/commands/MigrationRunCommand.js.map +1 -1
- package/lib/typeorm/commands/MigrationShowCommand.js +32 -60
- package/lib/typeorm/commands/MigrationShowCommand.js.map +1 -1
- package/lib/typeorm/commands/QueryCommand.js +47 -83
- package/lib/typeorm/commands/QueryCommand.js.map +1 -1
- package/lib/typeorm/commands/SchemaDropCommand.js +33 -61
- package/lib/typeorm/commands/SchemaDropCommand.js.map +1 -1
- package/lib/typeorm/commands/SchemaLogCommand.js +57 -81
- package/lib/typeorm/commands/SchemaLogCommand.js.map +1 -1
- package/lib/typeorm/commands/SchemaSyncCommand.js +33 -61
- package/lib/typeorm/commands/SchemaSyncCommand.js.map +1 -1
- package/lib/typeorm/commands/SubscriberCreateCommand.js +35 -47
- package/lib/typeorm/commands/SubscriberCreateCommand.js.map +1 -1
- package/lib/typeorm/commands/VersionCommand.js +38 -54
- package/lib/typeorm/commands/VersionCommand.js.map +1 -1
- package/lib/typeorm/common/DeepPartial.js.map +1 -1
- package/lib/typeorm/common/EntityTarget.js.map +1 -1
- package/lib/typeorm/common/MixedList.js.map +1 -1
- package/lib/typeorm/common/NonNever.js.map +1 -1
- package/lib/typeorm/common/ObjectLiteral.js.map +1 -1
- package/lib/typeorm/common/ObjectType.js.map +1 -1
- package/lib/typeorm/common/RelationType.js.map +1 -1
- package/lib/typeorm/connection/BaseConnectionOptions.js.map +1 -1
- package/lib/typeorm/connection/Connection.js +3 -9
- package/lib/typeorm/connection/Connection.js.map +1 -1
- package/lib/typeorm/connection/ConnectionManager.js +23 -31
- package/lib/typeorm/connection/ConnectionManager.js.map +1 -1
- package/lib/typeorm/connection/ConnectionMetadataBuilder.js +48 -78
- package/lib/typeorm/connection/ConnectionMetadataBuilder.js.map +1 -1
- package/lib/typeorm/connection/ConnectionOptions.js.map +1 -1
- package/lib/typeorm/connection/ConnectionOptionsReader.js +146 -214
- package/lib/typeorm/connection/ConnectionOptionsReader.js.map +1 -1
- package/lib/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +50 -58
- package/lib/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js.map +1 -1
- package/lib/typeorm/connection/options-reader/ConnectionOptionsXmlReader.js +45 -58
- package/lib/typeorm/connection/options-reader/ConnectionOptionsXmlReader.js.map +1 -1
- package/lib/typeorm/connection/options-reader/ConnectionOptionsYmlReader.js +14 -23
- package/lib/typeorm/connection/options-reader/ConnectionOptionsYmlReader.js.map +1 -1
- package/lib/typeorm/constants.js.map +1 -1
- package/lib/typeorm/container.js +9 -12
- package/lib/typeorm/container.js.map +1 -1
- package/lib/typeorm/data-source/BaseDataSourceOptions.js.map +1 -1
- package/lib/typeorm/data-source/DataSource.js +320 -478
- package/lib/typeorm/data-source/DataSource.js.map +1 -1
- package/lib/typeorm/data-source/DataSourceOptions.js.map +1 -1
- package/lib/typeorm/data-source/index.js +16 -3
- package/lib/typeorm/data-source/index.js.map +1 -1
- package/lib/typeorm/decorator/Check.js +5 -5
- package/lib/typeorm/decorator/Check.js.map +1 -1
- package/lib/typeorm/decorator/EntityRepository.js +1 -1
- package/lib/typeorm/decorator/EntityRepository.js.map +1 -1
- package/lib/typeorm/decorator/Exclusion.js +5 -5
- package/lib/typeorm/decorator/Exclusion.js.map +1 -1
- package/lib/typeorm/decorator/Generated.js +2 -3
- package/lib/typeorm/decorator/Generated.js.map +1 -1
- package/lib/typeorm/decorator/Index.js +5 -5
- package/lib/typeorm/decorator/Index.js.map +1 -1
- package/lib/typeorm/decorator/Unique.js +8 -8
- package/lib/typeorm/decorator/Unique.js.map +1 -1
- package/lib/typeorm/decorator/columns/Column.js +4 -4
- package/lib/typeorm/decorator/columns/Column.js.map +1 -1
- package/lib/typeorm/decorator/columns/CreateDateColumn.js +1 -1
- package/lib/typeorm/decorator/columns/CreateDateColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/DeleteDateColumn.js +1 -1
- package/lib/typeorm/decorator/columns/DeleteDateColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/ObjectIdColumn.js +1 -1
- package/lib/typeorm/decorator/columns/ObjectIdColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/PrimaryColumn.js +5 -5
- package/lib/typeorm/decorator/columns/PrimaryColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/PrimaryGeneratedColumn.js +4 -4
- package/lib/typeorm/decorator/columns/PrimaryGeneratedColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/UpdateDateColumn.js +1 -1
- package/lib/typeorm/decorator/columns/UpdateDateColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/VersionColumn.js +1 -1
- package/lib/typeorm/decorator/columns/VersionColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/ViewColumn.js +1 -1
- package/lib/typeorm/decorator/columns/ViewColumn.js.map +1 -1
- package/lib/typeorm/decorator/columns/VirtualColumn.js +5 -5
- package/lib/typeorm/decorator/columns/VirtualColumn.js.map +1 -1
- package/lib/typeorm/decorator/entity/ChildEntity.js +1 -1
- package/lib/typeorm/decorator/entity/ChildEntity.js.map +1 -1
- package/lib/typeorm/decorator/entity/Entity.js +4 -4
- package/lib/typeorm/decorator/entity/Entity.js.map +1 -1
- package/lib/typeorm/decorator/entity/TableInheritance.js +1 -1
- package/lib/typeorm/decorator/entity/TableInheritance.js.map +1 -1
- package/lib/typeorm/decorator/entity-view/ViewEntity.js +4 -4
- package/lib/typeorm/decorator/entity-view/ViewEntity.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterInsert.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterInsert.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterLoad.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterLoad.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterRecover.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterRecover.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterRemove.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterRemove.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterSoftRemove.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterSoftRemove.js.map +1 -1
- package/lib/typeorm/decorator/listeners/AfterUpdate.js +2 -2
- package/lib/typeorm/decorator/listeners/AfterUpdate.js.map +1 -1
- package/lib/typeorm/decorator/listeners/BeforeInsert.js +2 -2
- package/lib/typeorm/decorator/listeners/BeforeInsert.js.map +1 -1
- package/lib/typeorm/decorator/listeners/BeforeRecover.js +2 -2
- package/lib/typeorm/decorator/listeners/BeforeRecover.js.map +1 -1
- package/lib/typeorm/decorator/listeners/BeforeRemove.js +2 -2
- package/lib/typeorm/decorator/listeners/BeforeRemove.js.map +1 -1
- package/lib/typeorm/decorator/listeners/BeforeSoftRemove.js +2 -2
- package/lib/typeorm/decorator/listeners/BeforeSoftRemove.js.map +1 -1
- package/lib/typeorm/decorator/listeners/BeforeUpdate.js +2 -2
- package/lib/typeorm/decorator/listeners/BeforeUpdate.js.map +1 -1
- package/lib/typeorm/decorator/listeners/EventSubscriber.js +1 -1
- package/lib/typeorm/decorator/listeners/EventSubscriber.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnCommonOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnEmbeddedOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnEnumOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnHstoreOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnNumericOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnWithLengthOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ColumnWithWidthOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/EntityOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/IndexOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/JoinColumnOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/JoinTableMultipleColumnsOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/JoinTableOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/PrimaryGeneratedColumnIdentityOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/PrimaryGeneratedColumnNumericOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/PrimaryGeneratedColumnUUIDOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/RelationOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/SpatialColumnOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/TransactionOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/UniqueOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ValueTransformer.js.map +1 -1
- package/lib/typeorm/decorator/options/ViewColumnOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/ViewEntityOptions.js.map +1 -1
- package/lib/typeorm/decorator/options/VirtualColumnOptions.js.map +1 -1
- package/lib/typeorm/decorator/relations/JoinColumn.js +3 -3
- package/lib/typeorm/decorator/relations/JoinColumn.js.map +1 -1
- package/lib/typeorm/decorator/relations/JoinTable.js +1 -1
- package/lib/typeorm/decorator/relations/JoinTable.js.map +1 -1
- package/lib/typeorm/decorator/relations/ManyToMany.js +5 -5
- package/lib/typeorm/decorator/relations/ManyToMany.js.map +1 -1
- package/lib/typeorm/decorator/relations/ManyToOne.js +5 -5
- package/lib/typeorm/decorator/relations/ManyToOne.js.map +1 -1
- package/lib/typeorm/decorator/relations/OneToMany.js +3 -3
- package/lib/typeorm/decorator/relations/OneToMany.js.map +1 -1
- package/lib/typeorm/decorator/relations/OneToOne.js +5 -5
- package/lib/typeorm/decorator/relations/OneToOne.js.map +1 -1
- package/lib/typeorm/decorator/relations/RelationCount.js +1 -1
- package/lib/typeorm/decorator/relations/RelationCount.js.map +1 -1
- package/lib/typeorm/decorator/relations/RelationId.js +1 -1
- package/lib/typeorm/decorator/relations/RelationId.js.map +1 -1
- package/lib/typeorm/decorator/tree/Tree.js +1 -1
- package/lib/typeorm/decorator/tree/Tree.js.map +1 -1
- package/lib/typeorm/decorator/tree/TreeChildren.js +4 -4
- package/lib/typeorm/decorator/tree/TreeChildren.js.map +1 -1
- package/lib/typeorm/decorator/tree/TreeLevelColumn.js +1 -1
- package/lib/typeorm/decorator/tree/TreeLevelColumn.js.map +1 -1
- package/lib/typeorm/decorator/tree/TreeParent.js +4 -4
- package/lib/typeorm/decorator/tree/TreeParent.js.map +1 -1
- package/lib/typeorm/driver/Driver.js.map +1 -1
- package/lib/typeorm/driver/DriverFactory.js +24 -27
- package/lib/typeorm/driver/DriverFactory.js.map +1 -1
- package/lib/typeorm/driver/DriverUtils.js +78 -126
- package/lib/typeorm/driver/DriverUtils.js.map +1 -1
- package/lib/typeorm/driver/Query.js +6 -5
- package/lib/typeorm/driver/Query.js.map +1 -1
- package/lib/typeorm/driver/SqlInMemory.js +4 -7
- package/lib/typeorm/driver/SqlInMemory.js.map +1 -1
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlConnection.js +9 -12
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlConnection.js.map +1 -1
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +392 -399
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js.map +1 -1
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1320 -2084
- package/lib/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/aurora-postgres/AuroraPostgresConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +50 -78
- package/lib/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js.map +1 -1
- package/lib/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +89 -160
- package/lib/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/better-sqlite3/BetterSqlite3ConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +78 -152
- package/lib/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
- package/lib/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +96 -155
- package/lib/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
- package/lib/typeorm/driver/capacitor/CapacitorConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/capacitor/CapacitorDriver.js +44 -89
- package/lib/typeorm/driver/capacitor/CapacitorDriver.js.map +1 -1
- package/lib/typeorm/driver/capacitor/CapacitorQueryRunner.js +70 -122
- package/lib/typeorm/driver/capacitor/CapacitorQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/cockroachdb/CockroachDriver.js +368 -404
- package/lib/typeorm/driver/cockroachdb/CockroachDriver.js.map +1 -1
- package/lib/typeorm/driver/cockroachdb/CockroachQueryRunner.js +1752 -2862
- package/lib/typeorm/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/cordova/CordovaConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/cordova/CordovaDriver.js +36 -58
- package/lib/typeorm/driver/cordova/CordovaDriver.js.map +1 -1
- package/lib/typeorm/driver/cordova/CordovaQueryRunner.js +86 -164
- package/lib/typeorm/driver/cordova/CordovaQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/expo/ExpoConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/expo/ExpoDriver.js +34 -44
- package/lib/typeorm/driver/expo/ExpoDriver.js.map +1 -1
- package/lib/typeorm/driver/expo/ExpoQueryRunner.js +114 -204
- package/lib/typeorm/driver/expo/ExpoQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/mongodb/MongoConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/mongodb/MongoDriver.js +269 -243
- package/lib/typeorm/driver/mongodb/MongoDriver.js.map +1 -1
- package/lib/typeorm/driver/mongodb/MongoQueryRunner.js +357 -793
- package/lib/typeorm/driver/mongodb/MongoQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/mongodb/typings.js.map +1 -1
- package/lib/typeorm/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/mysql/MysqlConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/mysql/MysqlDriver.js +475 -480
- package/lib/typeorm/driver/mysql/MysqlDriver.js.map +1 -1
- package/lib/typeorm/driver/mysql/MysqlQueryRunner.js +1692 -2466
- package/lib/typeorm/driver/mysql/MysqlQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/nativescript/NativescriptConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/nativescript/NativescriptDriver.js +46 -50
- package/lib/typeorm/driver/nativescript/NativescriptDriver.js.map +1 -1
- package/lib/typeorm/driver/nativescript/NativescriptQueryRunner.js +62 -101
- package/lib/typeorm/driver/nativescript/NativescriptQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/oracle/OracleConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/oracle/OracleDriver.js +345 -377
- package/lib/typeorm/driver/oracle/OracleDriver.js.map +1 -1
- package/lib/typeorm/driver/oracle/OracleQueryRunner.js +1484 -2384
- package/lib/typeorm/driver/oracle/OracleQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/postgres/PostgresConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/postgres/PostgresDriver.js +574 -690
- package/lib/typeorm/driver/postgres/PostgresDriver.js.map +1 -1
- package/lib/typeorm/driver/postgres/PostgresQueryRunner.js +2153 -3379
- package/lib/typeorm/driver/postgres/PostgresQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/react-native/ReactNativeConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/react-native/ReactNativeDriver.js +34 -44
- package/lib/typeorm/driver/react-native/ReactNativeDriver.js.map +1 -1
- package/lib/typeorm/driver/react-native/ReactNativeQueryRunner.js +60 -94
- package/lib/typeorm/driver/react-native/ReactNativeQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sap/SapConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/sap/SapConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/sap/SapDriver.js +310 -305
- package/lib/typeorm/driver/sap/SapDriver.js.map +1 -1
- package/lib/typeorm/driver/sap/SapQueryRunner.js +1635 -2561
- package/lib/typeorm/driver/sap/SapQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/spanner/SpannerConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/spanner/SpannerDriver.js +250 -236
- package/lib/typeorm/driver/spanner/SpannerDriver.js.map +1 -1
- package/lib/typeorm/driver/spanner/SpannerQueryRunner.js +1136 -2168
- package/lib/typeorm/driver/spanner/SpannerQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sqlite/SqliteConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/sqlite/SqliteDriver.js +82 -169
- package/lib/typeorm/driver/sqlite/SqliteDriver.js.map +1 -1
- package/lib/typeorm/driver/sqlite/SqliteQueryRunner.js +78 -122
- package/lib/typeorm/driver/sqlite/SqliteQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +280 -268
- package/lib/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js.map +1 -1
- package/lib/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1158 -1990
- package/lib/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sqljs/SqljsConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/sqljs/SqljsDriver.js +187 -253
- package/lib/typeorm/driver/sqljs/SqljsDriver.js.map +1 -1
- package/lib/typeorm/driver/sqljs/SqljsQueryRunner.js +88 -147
- package/lib/typeorm/driver/sqljs/SqljsQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/MssqlParameter.js +10 -13
- package/lib/typeorm/driver/sqlserver/MssqlParameter.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/SqlServerDriver.js +352 -372
- package/lib/typeorm/driver/sqlserver/SqlServerDriver.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/SqlServerQueryRunner.js +1979 -3068
- package/lib/typeorm/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryAccessTokenAuthentication.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiAppServiceAuthentication.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryMsiVmAuthentication.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryPasswordAuthentication.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/AzureActiveDirectoryServicePrincipalSecret.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/DefaultAuthentication.js.map +1 -1
- package/lib/typeorm/driver/sqlserver/authentication/NtlmAuthentication.js.map +1 -1
- package/lib/typeorm/driver/types/ColumnTypes.js.map +1 -1
- package/lib/typeorm/driver/types/CteCapabilities.js.map +1 -1
- package/lib/typeorm/driver/types/DataTypeDefaults.js.map +1 -1
- package/lib/typeorm/driver/types/DatabaseType.js.map +1 -1
- package/lib/typeorm/driver/types/IsolationLevel.js.map +1 -1
- package/lib/typeorm/driver/types/MappedColumnTypes.js.map +1 -1
- package/lib/typeorm/driver/types/MetadataTableType.js.map +1 -1
- package/lib/typeorm/driver/types/ReplicationMode.js.map +1 -1
- package/lib/typeorm/driver/types/UpsertType.js.map +1 -1
- package/lib/typeorm/entity-manager/EntityManager.js +351 -469
- package/lib/typeorm/entity-manager/EntityManager.js.map +1 -1
- package/lib/typeorm/entity-manager/EntityManagerFactory.js +7 -10
- package/lib/typeorm/entity-manager/EntityManagerFactory.js.map +1 -1
- package/lib/typeorm/entity-manager/MongoEntityManager.js +371 -487
- package/lib/typeorm/entity-manager/MongoEntityManager.js.map +1 -1
- package/lib/typeorm/entity-manager/SqljsEntityManager.js +16 -37
- package/lib/typeorm/entity-manager/SqljsEntityManager.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchema.js +5 -5
- package/lib/typeorm/entity-schema/EntitySchema.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaCheckOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaColumnOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +17 -5
- package/lib/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaEmbeddedError.js +11 -14
- package/lib/typeorm/entity-schema/EntitySchemaEmbeddedError.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaExclusionOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaIndexOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaOptions.js +82 -5
- package/lib/typeorm/entity-schema/EntitySchemaOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaRelationIdOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaRelationOptions.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaTransformer.js +51 -68
- package/lib/typeorm/entity-schema/EntitySchemaTransformer.js.map +1 -1
- package/lib/typeorm/entity-schema/EntitySchemaUniqueOptions.js.map +1 -1
- package/lib/typeorm/error/AlreadyHasActiveConnectionError.js +6 -9
- package/lib/typeorm/error/AlreadyHasActiveConnectionError.js.map +1 -1
- package/lib/typeorm/error/CannotAttachTreeChildrenEntityError.js +6 -9
- package/lib/typeorm/error/CannotAttachTreeChildrenEntityError.js.map +1 -1
- package/lib/typeorm/error/CannotConnectAlreadyConnectedError.js +5 -8
- package/lib/typeorm/error/CannotConnectAlreadyConnectedError.js.map +1 -1
- package/lib/typeorm/error/CannotCreateEntityIdMapError.js +7 -11
- package/lib/typeorm/error/CannotCreateEntityIdMapError.js.map +1 -1
- package/lib/typeorm/error/CannotDetermineEntityError.js +6 -9
- package/lib/typeorm/error/CannotDetermineEntityError.js.map +1 -1
- package/lib/typeorm/error/CannotExecuteNotConnectedError.js +5 -8
- package/lib/typeorm/error/CannotExecuteNotConnectedError.js.map +1 -1
- package/lib/typeorm/error/CannotGetEntityManagerNotConnectedError.js +5 -8
- package/lib/typeorm/error/CannotGetEntityManagerNotConnectedError.js.map +1 -1
- package/lib/typeorm/error/CannotReflectMethodParameterTypeError.js +7 -10
- package/lib/typeorm/error/CannotReflectMethodParameterTypeError.js.map +1 -1
- package/lib/typeorm/error/CircularRelationsError.js +6 -9
- package/lib/typeorm/error/CircularRelationsError.js.map +1 -1
- package/lib/typeorm/error/ColumnTypeUndefinedError.js +8 -11
- package/lib/typeorm/error/ColumnTypeUndefinedError.js.map +1 -1
- package/lib/typeorm/error/ConnectionIsNotSetError.js +5 -8
- package/lib/typeorm/error/ConnectionIsNotSetError.js.map +1 -1
- package/lib/typeorm/error/ConnectionNotFoundError.js +5 -8
- package/lib/typeorm/error/ConnectionNotFoundError.js.map +1 -1
- package/lib/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +7 -10
- package/lib/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js.map +1 -1
- package/lib/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +7 -10
- package/lib/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js.map +1 -1
- package/lib/typeorm/error/CustomRepositoryNotFoundError.js +7 -10
- package/lib/typeorm/error/CustomRepositoryNotFoundError.js.map +1 -1
- package/lib/typeorm/error/DataTypeNotSupportedError.js +7 -11
- package/lib/typeorm/error/DataTypeNotSupportedError.js.map +1 -1
- package/lib/typeorm/error/DriverOptionNotSetError.js +6 -9
- package/lib/typeorm/error/DriverOptionNotSetError.js.map +1 -1
- package/lib/typeorm/error/DriverPackageNotInstalledError.js +6 -9
- package/lib/typeorm/error/DriverPackageNotInstalledError.js.map +1 -1
- package/lib/typeorm/error/EntityMetadataNotFoundError.js +10 -14
- package/lib/typeorm/error/EntityMetadataNotFoundError.js.map +1 -1
- package/lib/typeorm/error/EntityNotFoundError.js +13 -17
- package/lib/typeorm/error/EntityNotFoundError.js.map +1 -1
- package/lib/typeorm/error/EntityPropertyNotFoundError.js +7 -11
- package/lib/typeorm/error/EntityPropertyNotFoundError.js.map +1 -1
- package/lib/typeorm/error/FindRelationsNotFoundError.js +9 -13
- package/lib/typeorm/error/FindRelationsNotFoundError.js.map +1 -1
- package/lib/typeorm/error/ForbiddenTransactionModeOverrideError.js +6 -9
- package/lib/typeorm/error/ForbiddenTransactionModeOverrideError.js.map +1 -1
- package/lib/typeorm/error/InitializedRelationError.js +7 -10
- package/lib/typeorm/error/InitializedRelationError.js.map +1 -1
- package/lib/typeorm/error/InsertValuesMissingError.js +6 -9
- package/lib/typeorm/error/InsertValuesMissingError.js.map +1 -1
- package/lib/typeorm/error/LimitOnUpdateNotSupportedError.js +5 -8
- package/lib/typeorm/error/LimitOnUpdateNotSupportedError.js.map +1 -1
- package/lib/typeorm/error/LockNotSupportedOnGivenDriverError.js +5 -8
- package/lib/typeorm/error/LockNotSupportedOnGivenDriverError.js.map +1 -1
- package/lib/typeorm/error/MetadataAlreadyExistsError.js +6 -9
- package/lib/typeorm/error/MetadataAlreadyExistsError.js.map +1 -1
- package/lib/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +6 -9
- package/lib/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js.map +1 -1
- package/lib/typeorm/error/MissingDeleteDateColumnError.js +5 -8
- package/lib/typeorm/error/MissingDeleteDateColumnError.js.map +1 -1
- package/lib/typeorm/error/MissingDriverError.js +6 -10
- package/lib/typeorm/error/MissingDriverError.js.map +1 -1
- package/lib/typeorm/error/MissingJoinColumnError.js +12 -16
- package/lib/typeorm/error/MissingJoinColumnError.js.map +1 -1
- package/lib/typeorm/error/MissingJoinTableError.js +12 -16
- package/lib/typeorm/error/MissingJoinTableError.js.map +1 -1
- package/lib/typeorm/error/MissingPrimaryColumnError.js +6 -9
- package/lib/typeorm/error/MissingPrimaryColumnError.js.map +1 -1
- package/lib/typeorm/error/MustBeEntityError.js +5 -8
- package/lib/typeorm/error/MustBeEntityError.js.map +1 -1
- package/lib/typeorm/error/NamingStrategyNotFoundError.js +9 -13
- package/lib/typeorm/error/NamingStrategyNotFoundError.js.map +1 -1
- package/lib/typeorm/error/NestedSetMultipleRootError.js +5 -8
- package/lib/typeorm/error/NestedSetMultipleRootError.js.map +1 -1
- package/lib/typeorm/error/NoConnectionForRepositoryError.js +6 -9
- package/lib/typeorm/error/NoConnectionForRepositoryError.js.map +1 -1
- package/lib/typeorm/error/NoConnectionOptionError.js +6 -9
- package/lib/typeorm/error/NoConnectionOptionError.js.map +1 -1
- package/lib/typeorm/error/NoNeedToReleaseEntityManagerError.js +7 -10
- package/lib/typeorm/error/NoNeedToReleaseEntityManagerError.js.map +1 -1
- package/lib/typeorm/error/NoVersionOrUpdateDateColumnError.js +5 -8
- package/lib/typeorm/error/NoVersionOrUpdateDateColumnError.js.map +1 -1
- package/lib/typeorm/error/OffsetWithoutLimitNotSupportedError.js +7 -10
- package/lib/typeorm/error/OffsetWithoutLimitNotSupportedError.js.map +1 -1
- package/lib/typeorm/error/OptimisticLockCanNotBeUsedError.js +5 -8
- package/lib/typeorm/error/OptimisticLockCanNotBeUsedError.js.map +1 -1
- package/lib/typeorm/error/OptimisticLockVersionMismatchError.js +5 -8
- package/lib/typeorm/error/OptimisticLockVersionMismatchError.js.map +1 -1
- package/lib/typeorm/error/PersistedEntityNotFoundError.js +5 -8
- package/lib/typeorm/error/PersistedEntityNotFoundError.js.map +1 -1
- package/lib/typeorm/error/PessimisticLockTransactionRequiredError.js +5 -8
- package/lib/typeorm/error/PessimisticLockTransactionRequiredError.js.map +1 -1
- package/lib/typeorm/error/PrimaryColumnCannotBeNullableError.js +6 -9
- package/lib/typeorm/error/PrimaryColumnCannotBeNullableError.js.map +1 -1
- package/lib/typeorm/error/QueryFailedError.js +18 -17
- package/lib/typeorm/error/QueryFailedError.js.map +1 -1
- package/lib/typeorm/error/QueryRunnerAlreadyReleasedError.js +5 -8
- package/lib/typeorm/error/QueryRunnerAlreadyReleasedError.js.map +1 -1
- package/lib/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +6 -9
- package/lib/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js.map +1 -1
- package/lib/typeorm/error/RepositoryNotTreeError.js +9 -13
- package/lib/typeorm/error/RepositoryNotTreeError.js.map +1 -1
- package/lib/typeorm/error/ReturningStatementNotSupportedError.js +5 -8
- package/lib/typeorm/error/ReturningStatementNotSupportedError.js.map +1 -1
- package/lib/typeorm/error/SubjectRemovedAndUpdatedError.js +6 -9
- package/lib/typeorm/error/SubjectRemovedAndUpdatedError.js.map +1 -1
- package/lib/typeorm/error/SubjectWithoutIdentifierError.js +5 -8
- package/lib/typeorm/error/SubjectWithoutIdentifierError.js.map +1 -1
- package/lib/typeorm/error/TransactionAlreadyStartedError.js +5 -8
- package/lib/typeorm/error/TransactionAlreadyStartedError.js.map +1 -1
- package/lib/typeorm/error/TransactionNotStartedError.js +5 -8
- package/lib/typeorm/error/TransactionNotStartedError.js.map +1 -1
- package/lib/typeorm/error/TreeRepositoryNotSupportedError.js +5 -8
- package/lib/typeorm/error/TreeRepositoryNotSupportedError.js.map +1 -1
- package/lib/typeorm/error/TypeORMError.js +9 -18
- package/lib/typeorm/error/TypeORMError.js.map +1 -1
- package/lib/typeorm/error/UpdateValuesMissingError.js +5 -8
- package/lib/typeorm/error/UpdateValuesMissingError.js.map +1 -1
- package/lib/typeorm/error/UsingJoinColumnIsNotAllowedError.js +6 -9
- package/lib/typeorm/error/UsingJoinColumnIsNotAllowedError.js.map +1 -1
- package/lib/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +7 -10
- package/lib/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js.map +1 -1
- package/lib/typeorm/error/UsingJoinTableIsNotAllowedError.js +7 -10
- package/lib/typeorm/error/UsingJoinTableIsNotAllowedError.js.map +1 -1
- package/lib/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +7 -10
- package/lib/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js.map +1 -1
- package/lib/typeorm/error/index.js +75 -62
- package/lib/typeorm/error/index.js.map +1 -1
- package/lib/typeorm/find-options/EqualOperator.js +6 -10
- package/lib/typeorm/find-options/EqualOperator.js.map +1 -1
- package/lib/typeorm/find-options/FindManyOptions.js.map +1 -1
- package/lib/typeorm/find-options/FindOneOptions.js.map +1 -1
- package/lib/typeorm/find-options/FindOperator.js +90 -94
- package/lib/typeorm/find-options/FindOperator.js.map +1 -1
- package/lib/typeorm/find-options/FindOperatorType.js.map +1 -1
- package/lib/typeorm/find-options/FindOptionsOrder.js.map +1 -1
- package/lib/typeorm/find-options/FindOptionsRelations.js.map +1 -1
- package/lib/typeorm/find-options/FindOptionsSelect.js.map +1 -1
- package/lib/typeorm/find-options/FindOptionsUtils.js +56 -87
- package/lib/typeorm/find-options/FindOptionsUtils.js.map +1 -1
- package/lib/typeorm/find-options/FindOptionsWhere.js.map +1 -1
- package/lib/typeorm/find-options/FindTreeOptions.js.map +1 -1
- package/lib/typeorm/find-options/JoinOptions.js.map +1 -1
- package/lib/typeorm/find-options/OrderByCondition.js.map +1 -1
- package/lib/typeorm/find-options/mongodb/MongoFindManyOptions.js.map +1 -1
- package/lib/typeorm/find-options/mongodb/MongoFindOneOptions.js.map +1 -1
- package/lib/typeorm/find-options/operator/And.js +2 -6
- package/lib/typeorm/find-options/operator/And.js.map +1 -1
- package/lib/typeorm/find-options/operator/Any.js +1 -1
- package/lib/typeorm/find-options/operator/Any.js.map +1 -1
- package/lib/typeorm/find-options/operator/ArrayContainedBy.js +1 -1
- package/lib/typeorm/find-options/operator/ArrayContainedBy.js.map +1 -1
- package/lib/typeorm/find-options/operator/ArrayContains.js +1 -1
- package/lib/typeorm/find-options/operator/ArrayContains.js.map +1 -1
- package/lib/typeorm/find-options/operator/ArrayOverlap.js +1 -1
- package/lib/typeorm/find-options/operator/ArrayOverlap.js.map +1 -1
- package/lib/typeorm/find-options/operator/Between.js +1 -1
- package/lib/typeorm/find-options/operator/Between.js.map +1 -1
- package/lib/typeorm/find-options/operator/Equal.js +1 -1
- package/lib/typeorm/find-options/operator/Equal.js.map +1 -1
- package/lib/typeorm/find-options/operator/ILike.js +1 -1
- package/lib/typeorm/find-options/operator/ILike.js.map +1 -1
- package/lib/typeorm/find-options/operator/In.js +1 -1
- package/lib/typeorm/find-options/operator/In.js.map +1 -1
- package/lib/typeorm/find-options/operator/IsNull.js +1 -1
- package/lib/typeorm/find-options/operator/IsNull.js.map +1 -1
- package/lib/typeorm/find-options/operator/LessThan.js +1 -1
- package/lib/typeorm/find-options/operator/LessThan.js.map +1 -1
- package/lib/typeorm/find-options/operator/LessThanOrEqual.js +1 -1
- package/lib/typeorm/find-options/operator/LessThanOrEqual.js.map +1 -1
- package/lib/typeorm/find-options/operator/Like.js +1 -1
- package/lib/typeorm/find-options/operator/Like.js.map +1 -1
- package/lib/typeorm/find-options/operator/MoreThan.js +1 -1
- package/lib/typeorm/find-options/operator/MoreThan.js.map +1 -1
- package/lib/typeorm/find-options/operator/MoreThanOrEqual.js +1 -1
- package/lib/typeorm/find-options/operator/MoreThanOrEqual.js.map +1 -1
- package/lib/typeorm/find-options/operator/Not.js +1 -1
- package/lib/typeorm/find-options/operator/Not.js.map +1 -1
- package/lib/typeorm/find-options/operator/Raw.js +1 -1
- package/lib/typeorm/find-options/operator/Raw.js.map +1 -1
- package/lib/typeorm/globals.js +33 -99
- package/lib/typeorm/globals.js.map +1 -1
- package/lib/typeorm/index.d.ts +0 -1
- package/lib/typeorm/index.js +136 -126
- package/lib/typeorm/index.js.map +1 -1
- package/lib/typeorm/logger/AdvancedConsoleLogger.js +26 -26
- package/lib/typeorm/logger/AdvancedConsoleLogger.js.map +1 -1
- package/lib/typeorm/logger/DebugLogger.js +24 -27
- package/lib/typeorm/logger/DebugLogger.js.map +1 -1
- package/lib/typeorm/logger/FileLogger.js +31 -30
- package/lib/typeorm/logger/FileLogger.js.map +1 -1
- package/lib/typeorm/logger/Logger.js.map +1 -1
- package/lib/typeorm/logger/LoggerFactory.js +9 -12
- package/lib/typeorm/logger/LoggerFactory.js.map +1 -1
- package/lib/typeorm/logger/LoggerOptions.js.map +1 -1
- package/lib/typeorm/logger/SimpleConsoleLogger.js +25 -25
- package/lib/typeorm/logger/SimpleConsoleLogger.js.map +1 -1
- package/lib/typeorm/metadata/CheckMetadata.js +30 -6
- package/lib/typeorm/metadata/CheckMetadata.js.map +1 -1
- package/lib/typeorm/metadata/ColumnMetadata.js +343 -199
- package/lib/typeorm/metadata/ColumnMetadata.js.map +1 -1
- package/lib/typeorm/metadata/EmbeddedMetadata.js +174 -153
- package/lib/typeorm/metadata/EmbeddedMetadata.js.map +1 -1
- package/lib/typeorm/metadata/EntityListenerMetadata.js +35 -15
- package/lib/typeorm/metadata/EntityListenerMetadata.js.map +1 -1
- package/lib/typeorm/metadata/EntityMetadata.js +516 -372
- package/lib/typeorm/metadata/EntityMetadata.js.map +1 -1
- package/lib/typeorm/metadata/ExclusionMetadata.js +30 -6
- package/lib/typeorm/metadata/ExclusionMetadata.js.map +1 -1
- package/lib/typeorm/metadata/ForeignKeyMetadata.js +60 -24
- package/lib/typeorm/metadata/ForeignKeyMetadata.js.map +1 -1
- package/lib/typeorm/metadata/IndexMetadata.js +119 -73
- package/lib/typeorm/metadata/IndexMetadata.js.map +1 -1
- package/lib/typeorm/metadata/RelationCountMetadata.js +40 -10
- package/lib/typeorm/metadata/RelationCountMetadata.js.map +1 -1
- package/lib/typeorm/metadata/RelationIdMetadata.js +47 -18
- package/lib/typeorm/metadata/RelationIdMetadata.js.map +1 -1
- package/lib/typeorm/metadata/RelationMetadata.js +270 -187
- package/lib/typeorm/metadata/RelationMetadata.js.map +1 -1
- package/lib/typeorm/metadata/UniqueMetadata.js +72 -47
- package/lib/typeorm/metadata/UniqueMetadata.js.map +1 -1
- package/lib/typeorm/metadata/types/ClosureTreeOptions.js.map +1 -1
- package/lib/typeorm/metadata/types/DeferrableType.js.map +1 -1
- package/lib/typeorm/metadata/types/EventListenerTypes.js +13 -16
- package/lib/typeorm/metadata/types/EventListenerTypes.js.map +1 -1
- package/lib/typeorm/metadata/types/OnDeleteType.js.map +1 -1
- package/lib/typeorm/metadata/types/OnUpdateType.js.map +1 -1
- package/lib/typeorm/metadata/types/PropertyTypeInFunction.js.map +1 -1
- package/lib/typeorm/metadata/types/RelationTypeInFunction.js.map +1 -1
- package/lib/typeorm/metadata/types/RelationTypes.js.map +1 -1
- package/lib/typeorm/metadata/types/TableTypes.js.map +1 -1
- package/lib/typeorm/metadata/types/TreeTypes.js.map +1 -1
- package/lib/typeorm/metadata-args/CheckMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/ColumnMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/DiscriminatorValueMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/EmbeddedMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/EntityListenerMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/EntityRepositoryMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/EntitySubscriberMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/ExclusionMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/GeneratedMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/IndexMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/InheritanceMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/JoinColumnMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/JoinTableMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/MetadataArgsStorage.js +108 -113
- package/lib/typeorm/metadata-args/MetadataArgsStorage.js.map +1 -1
- package/lib/typeorm/metadata-args/NamingStrategyMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/RelationCountMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/RelationIdMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/RelationMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/TableMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/TransactionEntityMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/TransactionRepositoryMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/TreeMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/UniqueMetadataArgs.js.map +1 -1
- package/lib/typeorm/metadata-args/types/ColumnMode.js.map +1 -1
- package/lib/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +14 -15
- package/lib/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js.map +1 -1
- package/lib/typeorm/metadata-builder/EntityMetadataBuilder.js +291 -347
- package/lib/typeorm/metadata-builder/EntityMetadataBuilder.js.map +1 -1
- package/lib/typeorm/metadata-builder/EntityMetadataValidator.js +63 -77
- package/lib/typeorm/metadata-builder/EntityMetadataValidator.js.map +1 -1
- package/lib/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +64 -69
- package/lib/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js.map +1 -1
- package/lib/typeorm/metadata-builder/MetadataUtils.js +12 -15
- package/lib/typeorm/metadata-builder/MetadataUtils.js.map +1 -1
- package/lib/typeorm/metadata-builder/RelationJoinColumnBuilder.js +43 -49
- package/lib/typeorm/metadata-builder/RelationJoinColumnBuilder.js.map +1 -1
- package/lib/typeorm/migration/Migration.js +23 -4
- package/lib/typeorm/migration/Migration.js.map +1 -1
- package/lib/typeorm/migration/MigrationExecutor.js +432 -691
- package/lib/typeorm/migration/MigrationExecutor.js.map +1 -1
- package/lib/typeorm/migration/MigrationInterface.js.map +1 -1
- package/lib/typeorm/naming-strategy/DefaultNamingStrategy.js +80 -84
- package/lib/typeorm/naming-strategy/DefaultNamingStrategy.js.map +1 -1
- package/lib/typeorm/naming-strategy/NamingStrategyInterface.js.map +1 -1
- package/lib/typeorm/persistence/EntityPersistExecutor.js +154 -212
- package/lib/typeorm/persistence/EntityPersistExecutor.js.map +1 -1
- package/lib/typeorm/persistence/Subject.js +162 -149
- package/lib/typeorm/persistence/Subject.js.map +1 -1
- package/lib/typeorm/persistence/SubjectChangeMap.js.map +1 -1
- package/lib/typeorm/persistence/SubjectChangedColumnsComputer.js +29 -35
- package/lib/typeorm/persistence/SubjectChangedColumnsComputer.js.map +1 -1
- package/lib/typeorm/persistence/SubjectDatabaseEntityLoader.js +99 -130
- package/lib/typeorm/persistence/SubjectDatabaseEntityLoader.js.map +1 -1
- package/lib/typeorm/persistence/SubjectExecutor.js +635 -879
- package/lib/typeorm/persistence/SubjectExecutor.js.map +1 -1
- package/lib/typeorm/persistence/SubjectTopoligicalSorter.js +62 -58
- package/lib/typeorm/persistence/SubjectTopoligicalSorter.js.map +1 -1
- package/lib/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +16 -19
- package/lib/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js.map +1 -1
- package/lib/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +50 -53
- package/lib/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js.map +1 -1
- package/lib/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +28 -33
- package/lib/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js.map +1 -1
- package/lib/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +19 -20
- package/lib/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js.map +1 -1
- package/lib/typeorm/persistence/tree/ClosureSubjectExecutor.js +202 -271
- package/lib/typeorm/persistence/tree/ClosureSubjectExecutor.js.map +1 -1
- package/lib/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +79 -121
- package/lib/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js.map +1 -1
- package/lib/typeorm/persistence/tree/NestedSetSubjectExecutor.js +220 -353
- package/lib/typeorm/persistence/tree/NestedSetSubjectExecutor.js.map +1 -1
- package/lib/typeorm/platform/PlatformTools.js +66 -78
- package/lib/typeorm/platform/PlatformTools.js.map +1 -1
- package/lib/typeorm/query-builder/Alias.js +31 -32
- package/lib/typeorm/query-builder/Alias.js.map +1 -1
- package/lib/typeorm/query-builder/Brackets.js +8 -5
- package/lib/typeorm/query-builder/Brackets.js.map +1 -1
- package/lib/typeorm/query-builder/DeleteQueryBuilder.js +96 -120
- package/lib/typeorm/query-builder/DeleteQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/InsertOrUpdateOptions.js.map +1 -1
- package/lib/typeorm/query-builder/InsertQueryBuilder.js +321 -367
- package/lib/typeorm/query-builder/InsertQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/JoinAttribute.js +175 -206
- package/lib/typeorm/query-builder/JoinAttribute.js.map +1 -1
- package/lib/typeorm/query-builder/JoinOptions.js.map +1 -1
- package/lib/typeorm/query-builder/NotBrackets.js +4 -11
- package/lib/typeorm/query-builder/NotBrackets.js.map +1 -1
- package/lib/typeorm/query-builder/QueryBuilder.js +400 -646
- package/lib/typeorm/query-builder/QueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/QueryBuilderCte.js.map +1 -1
- package/lib/typeorm/query-builder/QueryBuilderUtils.js +5 -9
- package/lib/typeorm/query-builder/QueryBuilderUtils.js.map +1 -1
- package/lib/typeorm/query-builder/QueryExpressionMap.js +304 -233
- package/lib/typeorm/query-builder/QueryExpressionMap.js.map +1 -1
- package/lib/typeorm/query-builder/QueryPartialEntity.js.map +1 -1
- package/lib/typeorm/query-builder/RelationIdLoader.js +166 -189
- package/lib/typeorm/query-builder/RelationIdLoader.js.map +1 -1
- package/lib/typeorm/query-builder/RelationLoader.js +81 -94
- package/lib/typeorm/query-builder/RelationLoader.js.map +1 -1
- package/lib/typeorm/query-builder/RelationQueryBuilder.js +91 -127
- package/lib/typeorm/query-builder/RelationQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/RelationRemover.js +121 -124
- package/lib/typeorm/query-builder/RelationRemover.js.map +1 -1
- package/lib/typeorm/query-builder/RelationUpdater.js +130 -148
- package/lib/typeorm/query-builder/RelationUpdater.js.map +1 -1
- package/lib/typeorm/query-builder/ReturningResultsEntityUpdator.js +131 -159
- package/lib/typeorm/query-builder/ReturningResultsEntityUpdator.js.map +1 -1
- package/lib/typeorm/query-builder/SelectQuery.js.map +1 -1
- package/lib/typeorm/query-builder/SelectQueryBuilder.js +955 -1211
- package/lib/typeorm/query-builder/SelectQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/SelectQueryBuilderOption.js.map +1 -1
- package/lib/typeorm/query-builder/SoftDeleteQueryBuilder.js +155 -194
- package/lib/typeorm/query-builder/SoftDeleteQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/UpdateQueryBuilder.js +204 -246
- package/lib/typeorm/query-builder/UpdateQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/WhereClause.js.map +1 -1
- package/lib/typeorm/query-builder/WhereExpressionBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/relation-count/RelationCountAttribute.js +85 -98
- package/lib/typeorm/query-builder/relation-count/RelationCountAttribute.js.map +1 -1
- package/lib/typeorm/query-builder/relation-count/RelationCountLoadResult.js.map +1 -1
- package/lib/typeorm/query-builder/relation-count/RelationCountLoader.js +153 -172
- package/lib/typeorm/query-builder/relation-count/RelationCountLoader.js.map +1 -1
- package/lib/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +16 -17
- package/lib/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js.map +1 -1
- package/lib/typeorm/query-builder/relation-id/RelationIdAttribute.js +93 -107
- package/lib/typeorm/query-builder/relation-id/RelationIdAttribute.js.map +1 -1
- package/lib/typeorm/query-builder/relation-id/RelationIdLoadResult.js.map +1 -1
- package/lib/typeorm/query-builder/relation-id/RelationIdLoader.js +259 -267
- package/lib/typeorm/query-builder/relation-id/RelationIdLoader.js.map +1 -1
- package/lib/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +16 -17
- package/lib/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js.map +1 -1
- package/lib/typeorm/query-builder/result/DeleteResult.js +14 -8
- package/lib/typeorm/query-builder/result/DeleteResult.js.map +1 -1
- package/lib/typeorm/query-builder/result/InsertResult.js +19 -18
- package/lib/typeorm/query-builder/result/InsertResult.js.map +1 -1
- package/lib/typeorm/query-builder/result/UpdateResult.js +24 -18
- package/lib/typeorm/query-builder/result/UpdateResult.js.map +1 -1
- package/lib/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +24 -26
- package/lib/typeorm/query-builder/transformer/DocumentToEntityTransformer.js.map +1 -1
- package/lib/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +77 -112
- package/lib/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js.map +1 -1
- package/lib/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +16 -22
- package/lib/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js.map +1 -1
- package/lib/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +117 -132
- package/lib/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -1
- package/lib/typeorm/query-runner/BaseQueryRunner.js +227 -393
- package/lib/typeorm/query-runner/BaseQueryRunner.js.map +1 -1
- package/lib/typeorm/query-runner/QueryLock.js +19 -32
- package/lib/typeorm/query-runner/QueryLock.js.map +1 -1
- package/lib/typeorm/query-runner/QueryResult.js +14 -9
- package/lib/typeorm/query-runner/QueryResult.js.map +1 -1
- package/lib/typeorm/query-runner/QueryRunner.js.map +1 -1
- package/lib/typeorm/repository/AbstractRepository.js +46 -50
- package/lib/typeorm/repository/AbstractRepository.js.map +1 -1
- package/lib/typeorm/repository/BaseEntity.js +106 -123
- package/lib/typeorm/repository/BaseEntity.js.map +1 -1
- package/lib/typeorm/repository/EntityId.js.map +1 -1
- package/lib/typeorm/repository/FindTreesOptions.js.map +1 -1
- package/lib/typeorm/repository/MongoRepository.js +109 -135
- package/lib/typeorm/repository/MongoRepository.js.map +1 -1
- package/lib/typeorm/repository/RemoveOptions.js.map +1 -1
- package/lib/typeorm/repository/Repository.js +108 -140
- package/lib/typeorm/repository/Repository.js.map +1 -1
- package/lib/typeorm/repository/SaveOptions.js.map +1 -1
- package/lib/typeorm/repository/TreeRepository.js +107 -154
- package/lib/typeorm/repository/TreeRepository.js.map +1 -1
- package/lib/typeorm/repository/UpsertOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/MongoSchemaBuilder.js +30 -42
- package/lib/typeorm/schema-builder/MongoSchemaBuilder.js.map +1 -1
- package/lib/typeorm/schema-builder/RdbmsSchemaBuilder.js +727 -1938
- package/lib/typeorm/schema-builder/RdbmsSchemaBuilder.js.map +1 -1
- package/lib/typeorm/schema-builder/SchemaBuilder.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableCheckOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableColumnOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableExclusionOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableForeignKeyOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableIndexOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/TableUniqueOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/options/ViewOptions.js.map +1 -1
- package/lib/typeorm/schema-builder/table/Table.js +160 -157
- package/lib/typeorm/schema-builder/table/Table.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableCheck.js +24 -15
- package/lib/typeorm/schema-builder/table/TableCheck.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableColumn.js +123 -41
- package/lib/typeorm/schema-builder/table/TableColumn.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableExclusion.js +19 -9
- package/lib/typeorm/schema-builder/table/TableExclusion.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableForeignKey.js +52 -20
- package/lib/typeorm/schema-builder/table/TableForeignKey.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableIndex.js +52 -16
- package/lib/typeorm/schema-builder/table/TableIndex.js.map +1 -1
- package/lib/typeorm/schema-builder/table/TableUnique.js +26 -16
- package/lib/typeorm/schema-builder/table/TableUnique.js.map +1 -1
- package/lib/typeorm/schema-builder/util/TableUtils.js +5 -8
- package/lib/typeorm/schema-builder/util/TableUtils.js.map +1 -1
- package/lib/typeorm/schema-builder/util/ViewUtils.js +4 -7
- package/lib/typeorm/schema-builder/util/ViewUtils.js.map +1 -1
- package/lib/typeorm/schema-builder/view/View.js +32 -10
- package/lib/typeorm/schema-builder/view/View.js.map +1 -1
- package/lib/typeorm/subscriber/Broadcaster.js +180 -216
- package/lib/typeorm/subscriber/Broadcaster.js.map +1 -1
- package/lib/typeorm/subscriber/BroadcasterResult.js +16 -29
- package/lib/typeorm/subscriber/BroadcasterResult.js.map +1 -1
- package/lib/typeorm/subscriber/EntitySubscriberInterface.js.map +1 -1
- package/lib/typeorm/subscriber/event/InsertEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/LoadEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/RecoverEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/RemoveEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/SoftRemoveEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/TransactionCommitEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/TransactionRollbackEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/TransactionStartEvent.js.map +1 -1
- package/lib/typeorm/subscriber/event/UpdateEvent.js.map +1 -1
- package/lib/typeorm/util/ApplyValueTransformers.js +9 -12
- package/lib/typeorm/util/ApplyValueTransformers.js.map +1 -1
- package/lib/typeorm/util/DateUtils.js +44 -53
- package/lib/typeorm/util/DateUtils.js.map +1 -1
- package/lib/typeorm/util/DepGraph.js +50 -53
- package/lib/typeorm/util/DepGraph.js.map +1 -1
- package/lib/typeorm/util/DirectoryExportedClassesLoader.js +48 -70
- package/lib/typeorm/util/DirectoryExportedClassesLoader.js.map +1 -1
- package/lib/typeorm/util/ImportUtils.js +43 -65
- package/lib/typeorm/util/ImportUtils.js.map +1 -1
- package/lib/typeorm/util/InstanceChecker.js +64 -67
- package/lib/typeorm/util/InstanceChecker.js.map +1 -1
- package/lib/typeorm/util/ObjectUtils.js +13 -42
- package/lib/typeorm/util/ObjectUtils.js.map +1 -1
- package/lib/typeorm/util/OrmUtils.js +91 -158
- package/lib/typeorm/util/OrmUtils.js.map +1 -1
- package/lib/typeorm/util/PathUtils.js +8 -8
- package/lib/typeorm/util/PathUtils.js.map +1 -1
- package/lib/typeorm/util/RandomGenerator.js +22 -25
- package/lib/typeorm/util/RandomGenerator.js.map +1 -1
- package/lib/typeorm/util/StringUtils.js +17 -21
- package/lib/typeorm/util/StringUtils.js.map +1 -1
- package/lib/typeorm/util/TreeRepositoryUtils.js +27 -30
- package/lib/typeorm/util/TreeRepositoryUtils.js.map +1 -1
- package/lib/typeorm/util/VersionUtils.js +9 -13
- package/lib/typeorm/util/VersionUtils.js.map +1 -1
- package/lib/typeorm/util/escapeRegExp.js +2 -2
- package/lib/typeorm/util/escapeRegExp.js.map +1 -1
- package/migrations/index.js +15 -2
- package/migrations/index.js.map +1 -1
- package/migrations/migrations_index._auto-generated_.d.ts +1 -0
- package/migrations/migrations_index._auto-generated_.js.map +1 -1
- package/package.json +8 -44
- package/src.d.ts +1 -1
- package/taon.jsonc +3 -30
- package/tmp-environment.json +8 -370
- package/websql/esm2022/lib/typeorm/driver/cordova/CordovaDriver.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/cordova/CordovaQueryRunner.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/nativescript/NativescriptDriver.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/nativescript/NativescriptQueryRunner.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/react-native/ReactNativeDriver.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/react-native/ReactNativeQueryRunner.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/sqljs/SqljsDriver.mjs +1 -1
- package/websql/esm2022/lib/typeorm/driver/sqljs/SqljsQueryRunner.mjs +1 -1
- package/websql/esm2022/lib/typeorm/index.mjs +1 -3
- package/websql/fesm2022/taon-typeorm.mjs.map +1 -1
- package/browser/package.json +0 -25
- package/websql/package.json +0 -25
|
@@ -1,33 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MongoQueryRunner = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var error_1 = require("../../error");
|
|
4
|
+
const Broadcaster_1 = require("../../subscriber/Broadcaster");
|
|
5
|
+
const error_1 = require("../../error");
|
|
7
6
|
/**
|
|
8
7
|
* Runs queries on a single MongoDB connection.
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
class MongoQueryRunner {
|
|
10
|
+
// -------------------------------------------------------------------------
|
|
11
|
+
// Public Implemented Properties
|
|
12
|
+
// -------------------------------------------------------------------------
|
|
13
|
+
/**
|
|
14
|
+
* Connection used by this query runner.
|
|
15
|
+
*/
|
|
16
|
+
connection;
|
|
17
|
+
/**
|
|
18
|
+
* Broadcaster used on this query runner to broadcast entity events.
|
|
19
|
+
*/
|
|
20
|
+
broadcaster;
|
|
21
|
+
/**
|
|
22
|
+
* Entity manager working only with current query runner.
|
|
23
|
+
*/
|
|
24
|
+
manager;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if connection for this query runner is released.
|
|
27
|
+
* Once its released, query runner cannot run queries anymore.
|
|
28
|
+
* Always false for mongodb since mongodb has a single query executor instance.
|
|
29
|
+
*/
|
|
30
|
+
isReleased = false;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates if transaction is active in this query executor.
|
|
33
|
+
* Always false for mongodb since mongodb does not support transactions.
|
|
34
|
+
*/
|
|
35
|
+
isTransactionActive = false;
|
|
36
|
+
/**
|
|
37
|
+
* Stores temporarily user data.
|
|
38
|
+
* Useful for sharing data with subscribers.
|
|
39
|
+
*/
|
|
40
|
+
data = {};
|
|
41
|
+
/**
|
|
42
|
+
* All synchronized tables in the database.
|
|
43
|
+
*/
|
|
44
|
+
loadedTables;
|
|
45
|
+
/**
|
|
46
|
+
* All synchronized views in the database.
|
|
47
|
+
*/
|
|
48
|
+
loadedViews;
|
|
49
|
+
/**
|
|
50
|
+
* Real database connection from a connection pool used to perform queries.
|
|
51
|
+
*/
|
|
52
|
+
databaseConnection;
|
|
11
53
|
// -------------------------------------------------------------------------
|
|
12
54
|
// Constructor
|
|
13
55
|
// -------------------------------------------------------------------------
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Indicates if connection for this query runner is released.
|
|
17
|
-
* Once its released, query runner cannot run queries anymore.
|
|
18
|
-
* Always false for mongodb since mongodb has a single query executor instance.
|
|
19
|
-
*/
|
|
20
|
-
this.isReleased = false;
|
|
21
|
-
/**
|
|
22
|
-
* Indicates if transaction is active in this query executor.
|
|
23
|
-
* Always false for mongodb since mongodb does not support transactions.
|
|
24
|
-
*/
|
|
25
|
-
this.isTransactionActive = false;
|
|
26
|
-
/**
|
|
27
|
-
* Stores temporarily user data.
|
|
28
|
-
* Useful for sharing data with subscribers.
|
|
29
|
-
*/
|
|
30
|
-
this.data = {};
|
|
56
|
+
constructor(connection, databaseConnection) {
|
|
31
57
|
this.connection = connection;
|
|
32
58
|
this.databaseConnection = databaseConnection;
|
|
33
59
|
this.broadcaster = new Broadcaster_1.Broadcaster(this);
|
|
@@ -38,438 +64,227 @@ var MongoQueryRunner = /** @class */ (function () {
|
|
|
38
64
|
/**
|
|
39
65
|
* Called before migrations are run.
|
|
40
66
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return [2 /*return*/];
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
};
|
|
67
|
+
async beforeMigration() {
|
|
68
|
+
// Do nothing
|
|
69
|
+
}
|
|
48
70
|
/**
|
|
49
71
|
* Called after migrations are run.
|
|
50
72
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return [2 /*return*/];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
73
|
+
async afterMigration() {
|
|
74
|
+
// Do nothing
|
|
75
|
+
}
|
|
58
76
|
/**
|
|
59
77
|
* Creates a cursor for a query that can be used to iterate over results from MongoDB.
|
|
60
78
|
*/
|
|
61
|
-
|
|
79
|
+
cursor(collectionName, query) {
|
|
62
80
|
return this.getCollection(collectionName).find(query || {});
|
|
63
|
-
}
|
|
81
|
+
}
|
|
64
82
|
/**
|
|
65
83
|
* Execute an aggregation framework pipeline against the collection.
|
|
66
84
|
*/
|
|
67
|
-
|
|
85
|
+
aggregate(collectionName, pipeline, options) {
|
|
68
86
|
return this.getCollection(collectionName).aggregate(pipeline, options);
|
|
69
|
-
}
|
|
87
|
+
}
|
|
70
88
|
/**
|
|
71
89
|
* Perform a bulkWrite operation without a fluent API.
|
|
72
90
|
*/
|
|
73
|
-
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).bulkWrite(operations, options)];
|
|
78
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
};
|
|
91
|
+
async bulkWrite(collectionName, operations, options) {
|
|
92
|
+
return await this.getCollection(collectionName).bulkWrite(operations, options);
|
|
93
|
+
}
|
|
83
94
|
/**
|
|
84
95
|
* Count number of matching documents in the db to a query.
|
|
85
96
|
*/
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).countDocuments(query || {}, options)];
|
|
91
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
97
|
+
async count(collectionName, query, options) {
|
|
98
|
+
return await this.getCollection(collectionName).countDocuments(query || {}, options);
|
|
99
|
+
}
|
|
96
100
|
/**
|
|
97
101
|
* Creates an index on the db and collection.
|
|
98
102
|
*/
|
|
99
|
-
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).createIndex(fieldOrSpec, options)];
|
|
104
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
103
|
+
async createCollectionIndex(collectionName, fieldOrSpec, options) {
|
|
104
|
+
return await this.getCollection(collectionName).createIndex(fieldOrSpec, options);
|
|
105
|
+
}
|
|
109
106
|
/**
|
|
110
107
|
* Creates multiple indexes in the collection, this method is only supported for MongoDB 2.6 or higher.
|
|
111
108
|
* Earlier version of MongoDB will throw a command not supported error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.
|
|
112
109
|
*/
|
|
113
|
-
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
switch (_a.label) {
|
|
117
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).createIndexes(indexSpecs)];
|
|
118
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
};
|
|
110
|
+
async createCollectionIndexes(collectionName, indexSpecs) {
|
|
111
|
+
return await this.getCollection(collectionName).createIndexes(indexSpecs);
|
|
112
|
+
}
|
|
123
113
|
/**
|
|
124
114
|
* Delete multiple documents on MongoDB.
|
|
125
115
|
*/
|
|
126
|
-
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
switch (_a.label) {
|
|
130
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).deleteMany(query, options)];
|
|
131
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
};
|
|
116
|
+
async deleteMany(collectionName, query, options) {
|
|
117
|
+
return await this.getCollection(collectionName).deleteMany(query, options);
|
|
118
|
+
}
|
|
136
119
|
/**
|
|
137
120
|
* Delete a document on MongoDB.
|
|
138
121
|
*/
|
|
139
|
-
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
switch (_a.label) {
|
|
143
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).deleteOne(query, options)];
|
|
144
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
};
|
|
122
|
+
async deleteOne(collectionName, query, options) {
|
|
123
|
+
return await this.getCollection(collectionName).deleteOne(query, options);
|
|
124
|
+
}
|
|
149
125
|
/**
|
|
150
126
|
* The distinct command returns returns a list of distinct values for the given key across a collection.
|
|
151
127
|
*/
|
|
152
|
-
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
switch (_a.label) {
|
|
156
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).distinct(key, query, options)];
|
|
157
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
};
|
|
128
|
+
async distinct(collectionName, key, query, options) {
|
|
129
|
+
return await this.getCollection(collectionName).distinct(key, query, options);
|
|
130
|
+
}
|
|
162
131
|
/**
|
|
163
132
|
* Drops an index from this collection.
|
|
164
133
|
*/
|
|
165
|
-
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
switch (_a.label) {
|
|
169
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).dropIndex(indexName, options)];
|
|
170
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
};
|
|
134
|
+
async dropCollectionIndex(collectionName, indexName, options) {
|
|
135
|
+
return await this.getCollection(collectionName).dropIndex(indexName, options);
|
|
136
|
+
}
|
|
175
137
|
/**
|
|
176
138
|
* Drops all indexes from the collection.
|
|
177
139
|
*/
|
|
178
|
-
|
|
179
|
-
return
|
|
180
|
-
|
|
181
|
-
switch (_a.label) {
|
|
182
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).dropIndexes()];
|
|
183
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
};
|
|
140
|
+
async dropCollectionIndexes(collectionName) {
|
|
141
|
+
return await this.getCollection(collectionName).dropIndexes();
|
|
142
|
+
}
|
|
188
143
|
/**
|
|
189
144
|
* Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation.
|
|
190
145
|
*/
|
|
191
|
-
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
switch (_a.label) {
|
|
195
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).findOneAndDelete(query, options)];
|
|
196
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
};
|
|
146
|
+
async findOneAndDelete(collectionName, query, options) {
|
|
147
|
+
return await this.getCollection(collectionName).findOneAndDelete(query, options);
|
|
148
|
+
}
|
|
201
149
|
/**
|
|
202
150
|
* Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.
|
|
203
151
|
*/
|
|
204
|
-
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
switch (_a.label) {
|
|
208
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).findOneAndReplace(query, replacement, options)];
|
|
209
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
};
|
|
152
|
+
async findOneAndReplace(collectionName, query, replacement, options) {
|
|
153
|
+
return await this.getCollection(collectionName).findOneAndReplace(query, replacement, options);
|
|
154
|
+
}
|
|
214
155
|
/**
|
|
215
156
|
* Find a document and update it in one atomic operation, requires a write lock for the duration of the operation.
|
|
216
157
|
*/
|
|
217
|
-
|
|
218
|
-
return
|
|
219
|
-
|
|
220
|
-
switch (_a.label) {
|
|
221
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).findOneAndUpdate(query, update, options)];
|
|
222
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
};
|
|
158
|
+
async findOneAndUpdate(collectionName, query, update, options) {
|
|
159
|
+
return await this.getCollection(collectionName).findOneAndUpdate(query, update, options);
|
|
160
|
+
}
|
|
227
161
|
/**
|
|
228
162
|
* Execute a geo search using a geo haystack index on a collection.
|
|
229
163
|
*/
|
|
230
|
-
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
switch (_a.label) {
|
|
234
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).geoHaystackSearch(x, y, options)];
|
|
235
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
};
|
|
164
|
+
async geoHaystackSearch(collectionName, x, y, options) {
|
|
165
|
+
return await this.getCollection(collectionName).geoHaystackSearch(x, y, options);
|
|
166
|
+
}
|
|
240
167
|
/**
|
|
241
168
|
* Execute the geoNear command to search for items in the collection.
|
|
242
169
|
*/
|
|
243
|
-
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
switch (_a.label) {
|
|
247
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).geoNear(x, y, options)];
|
|
248
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
};
|
|
170
|
+
async geoNear(collectionName, x, y, options) {
|
|
171
|
+
return await this.getCollection(collectionName).geoNear(x, y, options);
|
|
172
|
+
}
|
|
253
173
|
/**
|
|
254
174
|
* Run a group command across a collection.
|
|
255
175
|
*/
|
|
256
|
-
|
|
257
|
-
return
|
|
258
|
-
|
|
259
|
-
switch (_a.label) {
|
|
260
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).group(keys, condition, initial, reduce, finalize, command, options)];
|
|
261
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
});
|
|
265
|
-
};
|
|
176
|
+
async group(collectionName, keys, condition, initial, reduce, finalize, command, options) {
|
|
177
|
+
return await this.getCollection(collectionName).group(keys, condition, initial, reduce, finalize, command, options);
|
|
178
|
+
}
|
|
266
179
|
/**
|
|
267
180
|
* Retrieve all the indexes on the collection.
|
|
268
181
|
*/
|
|
269
|
-
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
switch (_a.label) {
|
|
273
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).indexes()];
|
|
274
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
};
|
|
182
|
+
async collectionIndexes(collectionName) {
|
|
183
|
+
return await this.getCollection(collectionName).indexes();
|
|
184
|
+
}
|
|
279
185
|
/**
|
|
280
186
|
* Retrieve all the indexes on the collection.
|
|
281
187
|
*/
|
|
282
|
-
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
switch (_a.label) {
|
|
286
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).indexExists(indexes)];
|
|
287
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
};
|
|
188
|
+
async collectionIndexExists(collectionName, indexes) {
|
|
189
|
+
return await this.getCollection(collectionName).indexExists(indexes);
|
|
190
|
+
}
|
|
292
191
|
/**
|
|
293
192
|
* Retrieves this collections index info.
|
|
294
193
|
*/
|
|
295
|
-
|
|
296
|
-
return
|
|
297
|
-
|
|
298
|
-
switch (_a.label) {
|
|
299
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).indexInformation(options)];
|
|
300
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
};
|
|
194
|
+
async collectionIndexInformation(collectionName, options) {
|
|
195
|
+
return await this.getCollection(collectionName).indexInformation(options);
|
|
196
|
+
}
|
|
305
197
|
/**
|
|
306
198
|
* Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types.
|
|
307
199
|
*/
|
|
308
|
-
|
|
200
|
+
initializeOrderedBulkOp(collectionName, options) {
|
|
309
201
|
return this.getCollection(collectionName).initializeOrderedBulkOp(options);
|
|
310
|
-
}
|
|
202
|
+
}
|
|
311
203
|
/**
|
|
312
204
|
* Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
|
|
313
205
|
*/
|
|
314
|
-
|
|
206
|
+
initializeUnorderedBulkOp(collectionName, options) {
|
|
315
207
|
return this.getCollection(collectionName).initializeUnorderedBulkOp(options);
|
|
316
|
-
}
|
|
208
|
+
}
|
|
317
209
|
/**
|
|
318
210
|
* Inserts an array of documents into MongoDB.
|
|
319
211
|
*/
|
|
320
|
-
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
switch (_a.label) {
|
|
324
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).insertMany(docs, options)];
|
|
325
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
};
|
|
212
|
+
async insertMany(collectionName, docs, options) {
|
|
213
|
+
return await this.getCollection(collectionName).insertMany(docs, options);
|
|
214
|
+
}
|
|
330
215
|
/**
|
|
331
216
|
* Inserts a single document into MongoDB.
|
|
332
217
|
*/
|
|
333
|
-
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
switch (_a.label) {
|
|
337
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).insertOne(doc, options)];
|
|
338
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
};
|
|
218
|
+
async insertOne(collectionName, doc, options) {
|
|
219
|
+
return await this.getCollection(collectionName).insertOne(doc, options);
|
|
220
|
+
}
|
|
343
221
|
/**
|
|
344
222
|
* Returns if the collection is a capped collection.
|
|
345
223
|
*/
|
|
346
|
-
|
|
347
|
-
return
|
|
348
|
-
|
|
349
|
-
switch (_a.label) {
|
|
350
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).isCapped()];
|
|
351
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
});
|
|
355
|
-
};
|
|
224
|
+
async isCapped(collectionName) {
|
|
225
|
+
return await this.getCollection(collectionName).isCapped();
|
|
226
|
+
}
|
|
356
227
|
/**
|
|
357
228
|
* Get the list of all indexes information for the collection.
|
|
358
229
|
*/
|
|
359
|
-
|
|
230
|
+
listCollectionIndexes(collectionName, options) {
|
|
360
231
|
return this.getCollection(collectionName).listIndexes(options);
|
|
361
|
-
}
|
|
232
|
+
}
|
|
362
233
|
/**
|
|
363
234
|
* Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
|
|
364
235
|
*/
|
|
365
|
-
|
|
366
|
-
return
|
|
367
|
-
|
|
368
|
-
switch (_a.label) {
|
|
369
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).mapReduce(map, reduce, options)];
|
|
370
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
});
|
|
374
|
-
};
|
|
236
|
+
async mapReduce(collectionName, map, reduce, options) {
|
|
237
|
+
return await this.getCollection(collectionName).mapReduce(map, reduce, options);
|
|
238
|
+
}
|
|
375
239
|
/**
|
|
376
240
|
* Return N number of parallel cursors for a collection allowing parallel reading of entire collection.
|
|
377
241
|
* There are no ordering guarantees for returned results.
|
|
378
242
|
*/
|
|
379
|
-
|
|
380
|
-
return
|
|
381
|
-
|
|
382
|
-
switch (_a.label) {
|
|
383
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).parallelCollectionScan(options)];
|
|
384
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
};
|
|
243
|
+
async parallelCollectionScan(collectionName, options) {
|
|
244
|
+
return await this.getCollection(collectionName).parallelCollectionScan(options);
|
|
245
|
+
}
|
|
389
246
|
/**
|
|
390
247
|
* Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
|
|
391
248
|
*/
|
|
392
|
-
|
|
393
|
-
return
|
|
394
|
-
|
|
395
|
-
switch (_a.label) {
|
|
396
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).reIndex()];
|
|
397
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
};
|
|
249
|
+
async reIndex(collectionName) {
|
|
250
|
+
return await this.getCollection(collectionName).reIndex();
|
|
251
|
+
}
|
|
402
252
|
/**
|
|
403
253
|
* Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
|
|
404
254
|
*/
|
|
405
|
-
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
switch (_a.label) {
|
|
409
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).rename(newName, options)];
|
|
410
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
};
|
|
255
|
+
async rename(collectionName, newName, options) {
|
|
256
|
+
return await this.getCollection(collectionName).rename(newName, options);
|
|
257
|
+
}
|
|
415
258
|
/**
|
|
416
259
|
* Replace a document on MongoDB.
|
|
417
260
|
*/
|
|
418
|
-
|
|
419
|
-
return
|
|
420
|
-
|
|
421
|
-
switch (_a.label) {
|
|
422
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).replaceOne(query, doc, options)];
|
|
423
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
};
|
|
261
|
+
async replaceOne(collectionName, query, doc, options) {
|
|
262
|
+
return await this.getCollection(collectionName).replaceOne(query, doc, options);
|
|
263
|
+
}
|
|
428
264
|
/**
|
|
429
265
|
* Get all the collection statistics.
|
|
430
266
|
*/
|
|
431
|
-
|
|
432
|
-
return
|
|
433
|
-
|
|
434
|
-
switch (_a.label) {
|
|
435
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).stats(options)];
|
|
436
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
};
|
|
267
|
+
async stats(collectionName, options) {
|
|
268
|
+
return await this.getCollection(collectionName).stats(options);
|
|
269
|
+
}
|
|
441
270
|
/**
|
|
442
271
|
* Watching new changes as stream.
|
|
443
272
|
*/
|
|
444
|
-
|
|
273
|
+
watch(collectionName, pipeline, options) {
|
|
445
274
|
return this.getCollection(collectionName).watch(pipeline, options);
|
|
446
|
-
}
|
|
275
|
+
}
|
|
447
276
|
/**
|
|
448
277
|
* Update multiple documents on MongoDB.
|
|
449
278
|
*/
|
|
450
|
-
|
|
451
|
-
return
|
|
452
|
-
|
|
453
|
-
switch (_a.label) {
|
|
454
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).updateMany(query, update, options)];
|
|
455
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
});
|
|
459
|
-
};
|
|
279
|
+
async updateMany(collectionName, query, update, options) {
|
|
280
|
+
return await this.getCollection(collectionName).updateMany(query, update, options);
|
|
281
|
+
}
|
|
460
282
|
/**
|
|
461
283
|
* Update a single document on MongoDB.
|
|
462
284
|
*/
|
|
463
|
-
|
|
464
|
-
return
|
|
465
|
-
|
|
466
|
-
switch (_a.label) {
|
|
467
|
-
case 0: return [4 /*yield*/, this.getCollection(collectionName).updateOne(query, update, options)];
|
|
468
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
});
|
|
472
|
-
};
|
|
285
|
+
async updateOne(collectionName, query, update, options) {
|
|
286
|
+
return await this.getCollection(collectionName).updateOne(query, update, options);
|
|
287
|
+
}
|
|
473
288
|
// -------------------------------------------------------------------------
|
|
474
289
|
// Public Implemented Methods (from QueryRunner)
|
|
475
290
|
// -------------------------------------------------------------------------
|
|
@@ -478,80 +293,51 @@ var MongoQueryRunner = /** @class */ (function () {
|
|
|
478
293
|
* Be careful with using this method and avoid using it in production or migrations
|
|
479
294
|
* (because it can clear all your database).
|
|
480
295
|
*/
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
.db(this.connection.driver.database)
|
|
487
|
-
.dropDatabase()];
|
|
488
|
-
case 1:
|
|
489
|
-
_a.sent();
|
|
490
|
-
return [2 /*return*/];
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
});
|
|
494
|
-
};
|
|
296
|
+
async clearDatabase() {
|
|
297
|
+
await this.databaseConnection
|
|
298
|
+
.db(this.connection.driver.database)
|
|
299
|
+
.dropDatabase();
|
|
300
|
+
}
|
|
495
301
|
/**
|
|
496
302
|
* For MongoDB database we don't create connection, because its single connection already created by a driver.
|
|
497
303
|
*/
|
|
498
|
-
|
|
499
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
500
|
-
return [2 /*return*/];
|
|
501
|
-
}); });
|
|
502
|
-
};
|
|
304
|
+
async connect() { }
|
|
503
305
|
/**
|
|
504
306
|
* For MongoDB database we don't release connection, because its single connection.
|
|
505
307
|
*/
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
return [2 /*return*/];
|
|
510
|
-
});
|
|
511
|
-
});
|
|
512
|
-
};
|
|
308
|
+
async release() {
|
|
309
|
+
// releasing connection are not supported by mongodb driver, so simply don't do anything here
|
|
310
|
+
}
|
|
513
311
|
/**
|
|
514
312
|
* Starts transaction.
|
|
515
313
|
*/
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
return [2 /*return*/];
|
|
520
|
-
});
|
|
521
|
-
});
|
|
522
|
-
};
|
|
314
|
+
async startTransaction() {
|
|
315
|
+
// transactions are not supported by mongodb driver, so simply don't do anything here
|
|
316
|
+
}
|
|
523
317
|
/**
|
|
524
318
|
* Commits transaction.
|
|
525
319
|
*/
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
return [2 /*return*/];
|
|
530
|
-
});
|
|
531
|
-
});
|
|
532
|
-
};
|
|
320
|
+
async commitTransaction() {
|
|
321
|
+
// transactions are not supported by mongodb driver, so simply don't do anything here
|
|
322
|
+
}
|
|
533
323
|
/**
|
|
534
324
|
* Rollbacks transaction.
|
|
535
325
|
*/
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return [2 /*return*/];
|
|
540
|
-
});
|
|
541
|
-
});
|
|
542
|
-
};
|
|
326
|
+
async rollbackTransaction() {
|
|
327
|
+
// transactions are not supported by mongodb driver, so simply don't do anything here
|
|
328
|
+
}
|
|
543
329
|
/**
|
|
544
330
|
* Executes a given SQL query.
|
|
545
331
|
*/
|
|
546
|
-
|
|
547
|
-
throw new error_1.TypeORMError(
|
|
548
|
-
}
|
|
332
|
+
query(query, parameters) {
|
|
333
|
+
throw new error_1.TypeORMError(`Executing SQL query is not supported by MongoDB driver.`);
|
|
334
|
+
}
|
|
549
335
|
/**
|
|
550
336
|
* Returns raw data stream.
|
|
551
337
|
*/
|
|
552
|
-
|
|
553
|
-
throw new error_1.TypeORMError(
|
|
554
|
-
}
|
|
338
|
+
stream(query, parameters, onEnd, onError) {
|
|
339
|
+
throw new error_1.TypeORMError(`Stream is not supported by MongoDB driver. Use watch instead.`);
|
|
340
|
+
}
|
|
555
341
|
/**
|
|
556
342
|
* Insert a new row with given values into the given table.
|
|
557
343
|
* Returns value of inserted object id.
|
|
@@ -588,596 +374,374 @@ var MongoQueryRunner = /** @class */ (function () {
|
|
|
588
374
|
/**
|
|
589
375
|
* Returns all available database names including system databases.
|
|
590
376
|
*/
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
};
|
|
377
|
+
async getDatabases() {
|
|
378
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
379
|
+
}
|
|
598
380
|
/**
|
|
599
381
|
* Returns all available schema names including system schemas.
|
|
600
382
|
* If database parameter specified, returns schemas of that database.
|
|
601
383
|
*/
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
606
|
-
});
|
|
607
|
-
});
|
|
608
|
-
};
|
|
384
|
+
async getSchemas(database) {
|
|
385
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
386
|
+
}
|
|
609
387
|
/**
|
|
610
388
|
* Loads given table's data from the database.
|
|
611
389
|
*/
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
};
|
|
390
|
+
async getTable(collectionName) {
|
|
391
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
392
|
+
}
|
|
619
393
|
/**
|
|
620
394
|
* Loads all tables (with given names) from the database and creates a Table from them.
|
|
621
395
|
*/
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
626
|
-
});
|
|
627
|
-
});
|
|
628
|
-
};
|
|
396
|
+
async getTables(collectionNames) {
|
|
397
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
398
|
+
}
|
|
629
399
|
/**
|
|
630
400
|
* Loads given views's data from the database.
|
|
631
401
|
*/
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
636
|
-
});
|
|
637
|
-
});
|
|
638
|
-
};
|
|
402
|
+
async getView(collectionName) {
|
|
403
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
404
|
+
}
|
|
639
405
|
/**
|
|
640
406
|
* Loads all views (with given names) from the database and creates a Table from them.
|
|
641
407
|
*/
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
});
|
|
647
|
-
});
|
|
648
|
-
};
|
|
649
|
-
MongoQueryRunner.prototype.getReplicationMode = function () {
|
|
408
|
+
async getViews(collectionNames) {
|
|
409
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
410
|
+
}
|
|
411
|
+
getReplicationMode() {
|
|
650
412
|
return "master";
|
|
651
|
-
}
|
|
413
|
+
}
|
|
652
414
|
/**
|
|
653
415
|
* Checks if database with the given name exist.
|
|
654
416
|
*/
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
throw new error_1.TypeORMError("Check database queries are not supported by MongoDB driver.");
|
|
659
|
-
});
|
|
660
|
-
});
|
|
661
|
-
};
|
|
417
|
+
async hasDatabase(database) {
|
|
418
|
+
throw new error_1.TypeORMError(`Check database queries are not supported by MongoDB driver.`);
|
|
419
|
+
}
|
|
662
420
|
/**
|
|
663
421
|
* Loads currently using database
|
|
664
422
|
*/
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
throw new error_1.TypeORMError("Check database queries are not supported by MongoDB driver.");
|
|
669
|
-
});
|
|
670
|
-
});
|
|
671
|
-
};
|
|
423
|
+
async getCurrentDatabase() {
|
|
424
|
+
throw new error_1.TypeORMError(`Check database queries are not supported by MongoDB driver.`);
|
|
425
|
+
}
|
|
672
426
|
/**
|
|
673
427
|
* Checks if schema with the given name exist.
|
|
674
428
|
*/
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
throw new error_1.TypeORMError("Check schema queries are not supported by MongoDB driver.");
|
|
679
|
-
});
|
|
680
|
-
});
|
|
681
|
-
};
|
|
429
|
+
async hasSchema(schema) {
|
|
430
|
+
throw new error_1.TypeORMError(`Check schema queries are not supported by MongoDB driver.`);
|
|
431
|
+
}
|
|
682
432
|
/**
|
|
683
433
|
* Loads currently using database schema
|
|
684
434
|
*/
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
throw new error_1.TypeORMError("Check schema queries are not supported by MongoDB driver.");
|
|
689
|
-
});
|
|
690
|
-
});
|
|
691
|
-
};
|
|
435
|
+
async getCurrentSchema() {
|
|
436
|
+
throw new error_1.TypeORMError(`Check schema queries are not supported by MongoDB driver.`);
|
|
437
|
+
}
|
|
692
438
|
/**
|
|
693
439
|
* Checks if table with the given name exist in the database.
|
|
694
440
|
*/
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
throw new error_1.TypeORMError("Check schema queries are not supported by MongoDB driver.");
|
|
699
|
-
});
|
|
700
|
-
});
|
|
701
|
-
};
|
|
441
|
+
async hasTable(collectionName) {
|
|
442
|
+
throw new error_1.TypeORMError(`Check schema queries are not supported by MongoDB driver.`);
|
|
443
|
+
}
|
|
702
444
|
/**
|
|
703
445
|
* Checks if column with the given name exist in the given table.
|
|
704
446
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
709
|
-
});
|
|
710
|
-
});
|
|
711
|
-
};
|
|
447
|
+
async hasColumn(tableOrName, columnName) {
|
|
448
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
449
|
+
}
|
|
712
450
|
/**
|
|
713
451
|
* Creates a database if it's not created.
|
|
714
452
|
*/
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
throw new error_1.TypeORMError("Database create queries are not supported by MongoDB driver.");
|
|
719
|
-
});
|
|
720
|
-
});
|
|
721
|
-
};
|
|
453
|
+
async createDatabase(database) {
|
|
454
|
+
throw new error_1.TypeORMError(`Database create queries are not supported by MongoDB driver.`);
|
|
455
|
+
}
|
|
722
456
|
/**
|
|
723
457
|
* Drops database.
|
|
724
458
|
*/
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
throw new error_1.TypeORMError("Database drop queries are not supported by MongoDB driver.");
|
|
729
|
-
});
|
|
730
|
-
});
|
|
731
|
-
};
|
|
459
|
+
async dropDatabase(database, ifExist) {
|
|
460
|
+
throw new error_1.TypeORMError(`Database drop queries are not supported by MongoDB driver.`);
|
|
461
|
+
}
|
|
732
462
|
/**
|
|
733
463
|
* Creates a new table schema.
|
|
734
464
|
*/
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
throw new error_1.TypeORMError("Schema create queries are not supported by MongoDB driver.");
|
|
739
|
-
});
|
|
740
|
-
});
|
|
741
|
-
};
|
|
465
|
+
async createSchema(schemaPath, ifNotExist) {
|
|
466
|
+
throw new error_1.TypeORMError(`Schema create queries are not supported by MongoDB driver.`);
|
|
467
|
+
}
|
|
742
468
|
/**
|
|
743
469
|
* Drops table schema.
|
|
744
470
|
*/
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
throw new error_1.TypeORMError("Schema drop queries are not supported by MongoDB driver.");
|
|
749
|
-
});
|
|
750
|
-
});
|
|
751
|
-
};
|
|
471
|
+
async dropSchema(schemaPath, ifExist) {
|
|
472
|
+
throw new error_1.TypeORMError(`Schema drop queries are not supported by MongoDB driver.`);
|
|
473
|
+
}
|
|
752
474
|
/**
|
|
753
475
|
* Creates a new table from the given table and columns inside it.
|
|
754
476
|
*/
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
759
|
-
});
|
|
760
|
-
});
|
|
761
|
-
};
|
|
477
|
+
async createTable(table) {
|
|
478
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
479
|
+
}
|
|
762
480
|
/**
|
|
763
481
|
* Drops the table.
|
|
764
482
|
*/
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
};
|
|
483
|
+
async dropTable(tableName) {
|
|
484
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
485
|
+
}
|
|
772
486
|
/**
|
|
773
487
|
* Creates a new view.
|
|
774
488
|
*/
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
779
|
-
});
|
|
780
|
-
});
|
|
781
|
-
};
|
|
489
|
+
async createView(view) {
|
|
490
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
491
|
+
}
|
|
782
492
|
/**
|
|
783
493
|
* Drops the view.
|
|
784
494
|
*/
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
789
|
-
});
|
|
790
|
-
});
|
|
791
|
-
};
|
|
495
|
+
async dropView(target) {
|
|
496
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
497
|
+
}
|
|
792
498
|
/**
|
|
793
499
|
* Renames the given table.
|
|
794
500
|
*/
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
799
|
-
});
|
|
800
|
-
});
|
|
801
|
-
};
|
|
501
|
+
async renameTable(oldTableOrName, newTableOrName) {
|
|
502
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
503
|
+
}
|
|
802
504
|
/**
|
|
803
505
|
* Creates a new column from the column in the table.
|
|
804
506
|
*/
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
809
|
-
});
|
|
810
|
-
});
|
|
811
|
-
};
|
|
507
|
+
async addColumn(tableOrName, column) {
|
|
508
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
509
|
+
}
|
|
812
510
|
/**
|
|
813
511
|
* Creates a new columns from the column in the table.
|
|
814
512
|
*/
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
819
|
-
});
|
|
820
|
-
});
|
|
821
|
-
};
|
|
513
|
+
async addColumns(tableOrName, columns) {
|
|
514
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
515
|
+
}
|
|
822
516
|
/**
|
|
823
517
|
* Renames column in the given table.
|
|
824
518
|
*/
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
829
|
-
});
|
|
830
|
-
});
|
|
831
|
-
};
|
|
519
|
+
async renameColumn(tableOrName, oldTableColumnOrName, newTableColumnOrName) {
|
|
520
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
521
|
+
}
|
|
832
522
|
/**
|
|
833
523
|
* Changes a column in the table.
|
|
834
524
|
*/
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
839
|
-
});
|
|
840
|
-
});
|
|
841
|
-
};
|
|
525
|
+
async changeColumn(tableOrName, oldTableColumnOrName, newColumn) {
|
|
526
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
527
|
+
}
|
|
842
528
|
/**
|
|
843
529
|
* Changes a column in the table.
|
|
844
530
|
*/
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
849
|
-
});
|
|
850
|
-
});
|
|
851
|
-
};
|
|
531
|
+
async changeColumns(tableOrName, changedColumns) {
|
|
532
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
533
|
+
}
|
|
852
534
|
/**
|
|
853
535
|
* Drops column in the table.
|
|
854
536
|
*/
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
859
|
-
});
|
|
860
|
-
});
|
|
861
|
-
};
|
|
537
|
+
async dropColumn(tableOrName, columnOrName) {
|
|
538
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
539
|
+
}
|
|
862
540
|
/**
|
|
863
541
|
* Drops the columns in the table.
|
|
864
542
|
*/
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
869
|
-
});
|
|
870
|
-
});
|
|
871
|
-
};
|
|
543
|
+
async dropColumns(tableOrName, columns) {
|
|
544
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
545
|
+
}
|
|
872
546
|
/**
|
|
873
547
|
* Creates a new primary key.
|
|
874
548
|
*/
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
879
|
-
});
|
|
880
|
-
});
|
|
881
|
-
};
|
|
549
|
+
async createPrimaryKey(tableOrName, columnNames) {
|
|
550
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
551
|
+
}
|
|
882
552
|
/**
|
|
883
553
|
* Updates composite primary keys.
|
|
884
554
|
*/
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
889
|
-
});
|
|
890
|
-
});
|
|
891
|
-
};
|
|
555
|
+
async updatePrimaryKeys(tableOrName, columns) {
|
|
556
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
557
|
+
}
|
|
892
558
|
/**
|
|
893
559
|
* Drops a primary key.
|
|
894
560
|
*/
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
899
|
-
});
|
|
900
|
-
});
|
|
901
|
-
};
|
|
561
|
+
async dropPrimaryKey(tableOrName) {
|
|
562
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
563
|
+
}
|
|
902
564
|
/**
|
|
903
565
|
* Creates a new unique constraint.
|
|
904
566
|
*/
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
909
|
-
});
|
|
910
|
-
});
|
|
911
|
-
};
|
|
567
|
+
async createUniqueConstraint(tableOrName, uniqueConstraint) {
|
|
568
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
569
|
+
}
|
|
912
570
|
/**
|
|
913
571
|
* Creates a new unique constraints.
|
|
914
572
|
*/
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
919
|
-
});
|
|
920
|
-
});
|
|
921
|
-
};
|
|
573
|
+
async createUniqueConstraints(tableOrName, uniqueConstraints) {
|
|
574
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
575
|
+
}
|
|
922
576
|
/**
|
|
923
577
|
* Drops an unique constraint.
|
|
924
578
|
*/
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
929
|
-
});
|
|
930
|
-
});
|
|
931
|
-
};
|
|
579
|
+
async dropUniqueConstraint(tableOrName, uniqueOrName) {
|
|
580
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
581
|
+
}
|
|
932
582
|
/**
|
|
933
583
|
* Drops an unique constraints.
|
|
934
584
|
*/
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
939
|
-
});
|
|
940
|
-
});
|
|
941
|
-
};
|
|
585
|
+
async dropUniqueConstraints(tableOrName, uniqueConstraints) {
|
|
586
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
587
|
+
}
|
|
942
588
|
/**
|
|
943
589
|
* Creates a new check constraint.
|
|
944
590
|
*/
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
949
|
-
});
|
|
950
|
-
});
|
|
951
|
-
};
|
|
591
|
+
async createCheckConstraint(tableOrName, checkConstraint) {
|
|
592
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
593
|
+
}
|
|
952
594
|
/**
|
|
953
595
|
* Creates a new check constraints.
|
|
954
596
|
*/
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
959
|
-
});
|
|
960
|
-
});
|
|
961
|
-
};
|
|
597
|
+
async createCheckConstraints(tableOrName, checkConstraints) {
|
|
598
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
599
|
+
}
|
|
962
600
|
/**
|
|
963
601
|
* Drops check constraint.
|
|
964
602
|
*/
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
969
|
-
});
|
|
970
|
-
});
|
|
971
|
-
};
|
|
603
|
+
async dropCheckConstraint(tableOrName, checkOrName) {
|
|
604
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
605
|
+
}
|
|
972
606
|
/**
|
|
973
607
|
* Drops check constraints.
|
|
974
608
|
*/
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
979
|
-
});
|
|
980
|
-
});
|
|
981
|
-
};
|
|
609
|
+
async dropCheckConstraints(tableOrName, checkConstraints) {
|
|
610
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
611
|
+
}
|
|
982
612
|
/**
|
|
983
613
|
* Creates a new exclusion constraint.
|
|
984
614
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
989
|
-
});
|
|
990
|
-
});
|
|
991
|
-
};
|
|
615
|
+
async createExclusionConstraint(tableOrName, exclusionConstraint) {
|
|
616
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
617
|
+
}
|
|
992
618
|
/**
|
|
993
619
|
* Creates a new exclusion constraints.
|
|
994
620
|
*/
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
999
|
-
});
|
|
1000
|
-
});
|
|
1001
|
-
};
|
|
621
|
+
async createExclusionConstraints(tableOrName, exclusionConstraints) {
|
|
622
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
623
|
+
}
|
|
1002
624
|
/**
|
|
1003
625
|
* Drops exclusion constraint.
|
|
1004
626
|
*/
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1009
|
-
});
|
|
1010
|
-
});
|
|
1011
|
-
};
|
|
627
|
+
async dropExclusionConstraint(tableOrName, exclusionOrName) {
|
|
628
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
629
|
+
}
|
|
1012
630
|
/**
|
|
1013
631
|
* Drops exclusion constraints.
|
|
1014
632
|
*/
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1019
|
-
});
|
|
1020
|
-
});
|
|
1021
|
-
};
|
|
633
|
+
async dropExclusionConstraints(tableOrName, exclusionConstraints) {
|
|
634
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
635
|
+
}
|
|
1022
636
|
/**
|
|
1023
637
|
* Creates a new foreign key.
|
|
1024
638
|
*/
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1029
|
-
});
|
|
1030
|
-
});
|
|
1031
|
-
};
|
|
639
|
+
async createForeignKey(tableOrName, foreignKey) {
|
|
640
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
641
|
+
}
|
|
1032
642
|
/**
|
|
1033
643
|
* Creates a new foreign keys.
|
|
1034
644
|
*/
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1039
|
-
});
|
|
1040
|
-
});
|
|
1041
|
-
};
|
|
645
|
+
async createForeignKeys(tableOrName, foreignKeys) {
|
|
646
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
647
|
+
}
|
|
1042
648
|
/**
|
|
1043
649
|
* Drops a foreign key from the table.
|
|
1044
650
|
*/
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1049
|
-
});
|
|
1050
|
-
});
|
|
1051
|
-
};
|
|
651
|
+
async dropForeignKey(tableOrName, foreignKey) {
|
|
652
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
653
|
+
}
|
|
1052
654
|
/**
|
|
1053
655
|
* Drops a foreign keys from the table.
|
|
1054
656
|
*/
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1059
|
-
});
|
|
1060
|
-
});
|
|
1061
|
-
};
|
|
657
|
+
async dropForeignKeys(tableOrName, foreignKeys) {
|
|
658
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
659
|
+
}
|
|
1062
660
|
/**
|
|
1063
661
|
* Creates a new index.
|
|
1064
662
|
*/
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1069
|
-
});
|
|
1070
|
-
});
|
|
1071
|
-
};
|
|
663
|
+
async createIndex(tableOrName, index) {
|
|
664
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
665
|
+
}
|
|
1072
666
|
/**
|
|
1073
667
|
* Creates a new indices
|
|
1074
668
|
*/
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1079
|
-
});
|
|
1080
|
-
});
|
|
1081
|
-
};
|
|
669
|
+
async createIndices(tableOrName, indices) {
|
|
670
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
671
|
+
}
|
|
1082
672
|
/**
|
|
1083
673
|
* Drops an index from the table.
|
|
1084
674
|
*/
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1089
|
-
});
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
675
|
+
async dropIndex(collectionName, indexName) {
|
|
676
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
677
|
+
}
|
|
1092
678
|
/**
|
|
1093
679
|
* Drops an indices from the table.
|
|
1094
680
|
*/
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
throw new error_1.TypeORMError("Schema update queries are not supported by MongoDB driver.");
|
|
1099
|
-
});
|
|
1100
|
-
});
|
|
1101
|
-
};
|
|
681
|
+
async dropIndices(tableOrName, indices) {
|
|
682
|
+
throw new error_1.TypeORMError(`Schema update queries are not supported by MongoDB driver.`);
|
|
683
|
+
}
|
|
1102
684
|
/**
|
|
1103
685
|
* Drops collection.
|
|
1104
686
|
*/
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
.db(this.connection.driver.database)
|
|
1111
|
-
.dropCollection(collectionName)];
|
|
1112
|
-
case 1:
|
|
1113
|
-
_a.sent();
|
|
1114
|
-
return [2 /*return*/];
|
|
1115
|
-
}
|
|
1116
|
-
});
|
|
1117
|
-
});
|
|
1118
|
-
};
|
|
687
|
+
async clearTable(collectionName) {
|
|
688
|
+
await this.databaseConnection
|
|
689
|
+
.db(this.connection.driver.database)
|
|
690
|
+
.dropCollection(collectionName);
|
|
691
|
+
}
|
|
1119
692
|
/**
|
|
1120
693
|
* Enables special query runner mode in which sql queries won't be executed,
|
|
1121
694
|
* instead they will be memorized into a special variable inside query runner.
|
|
1122
695
|
* You can get memorized sql using getMemorySql() method.
|
|
1123
696
|
*/
|
|
1124
|
-
|
|
1125
|
-
throw new error_1.TypeORMError(
|
|
1126
|
-
}
|
|
697
|
+
enableSqlMemory() {
|
|
698
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
699
|
+
}
|
|
1127
700
|
/**
|
|
1128
701
|
* Disables special query runner mode in which sql queries won't be executed
|
|
1129
702
|
* started by calling enableSqlMemory() method.
|
|
1130
703
|
*
|
|
1131
704
|
* Previously memorized sql will be flushed.
|
|
1132
705
|
*/
|
|
1133
|
-
|
|
1134
|
-
throw new error_1.TypeORMError(
|
|
1135
|
-
}
|
|
706
|
+
disableSqlMemory() {
|
|
707
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
708
|
+
}
|
|
1136
709
|
/**
|
|
1137
710
|
* Flushes all memorized sqls.
|
|
1138
711
|
*/
|
|
1139
|
-
|
|
1140
|
-
throw new error_1.TypeORMError(
|
|
1141
|
-
}
|
|
712
|
+
clearSqlMemory() {
|
|
713
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
714
|
+
}
|
|
1142
715
|
/**
|
|
1143
716
|
* Gets sql stored in the memory. Parameters in the sql are already replaced.
|
|
1144
717
|
*/
|
|
1145
|
-
|
|
1146
|
-
throw new error_1.TypeORMError(
|
|
1147
|
-
}
|
|
718
|
+
getMemorySql() {
|
|
719
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
720
|
+
}
|
|
1148
721
|
/**
|
|
1149
722
|
* Executes up sql queries.
|
|
1150
723
|
*/
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
throw new error_1.TypeORMError("This operation is not supported by MongoDB driver.");
|
|
1155
|
-
});
|
|
1156
|
-
});
|
|
1157
|
-
};
|
|
724
|
+
async executeMemoryUpSql() {
|
|
725
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
726
|
+
}
|
|
1158
727
|
/**
|
|
1159
728
|
* Executes down sql queries.
|
|
1160
729
|
*/
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
throw new error_1.TypeORMError("This operation is not supported by MongoDB driver.");
|
|
1165
|
-
});
|
|
1166
|
-
});
|
|
1167
|
-
};
|
|
730
|
+
async executeMemoryDownSql() {
|
|
731
|
+
throw new error_1.TypeORMError(`This operation is not supported by MongoDB driver.`);
|
|
732
|
+
}
|
|
1168
733
|
// -------------------------------------------------------------------------
|
|
1169
734
|
// Protected Methods
|
|
1170
735
|
// -------------------------------------------------------------------------
|
|
1171
736
|
/**
|
|
1172
737
|
* Gets collection from the database with a given name.
|
|
1173
738
|
*/
|
|
1174
|
-
|
|
739
|
+
getCollection(collectionName) {
|
|
1175
740
|
return this.databaseConnection
|
|
1176
741
|
.db(this.connection.driver.database)
|
|
1177
742
|
.collection(collectionName);
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
}());
|
|
743
|
+
}
|
|
744
|
+
}
|
|
1181
745
|
exports.MongoQueryRunner = MongoQueryRunner;
|
|
1182
746
|
//#endregion
|
|
1183
747
|
//# sourceMappingURL=MongoQueryRunner.js.map
|