typeorm 0.2.38 → 0.2.39-dev.d8c5812

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.
Files changed (546) hide show
  1. package/browser/connection/ConnectionMetadataBuilder.js +4 -4
  2. package/browser/connection/ConnectionMetadataBuilder.js.map +1 -1
  3. package/browser/connection/options-reader/ConnectionOptionsYmlReader.js +1 -1
  4. package/browser/connection/options-reader/ConnectionOptionsYmlReader.js.map +1 -1
  5. package/browser/decorator/transaction/Transaction.js +3 -3
  6. package/browser/decorator/transaction/Transaction.js.map +1 -1
  7. package/browser/driver/DriverUtils.js +1 -1
  8. package/browser/driver/DriverUtils.js.map +1 -1
  9. package/browser/driver/aurora-data-api/AuroraDataApiQueryRunner.js +2 -2
  10. package/browser/driver/aurora-data-api/AuroraDataApiQueryRunner.js.map +1 -1
  11. package/browser/driver/cockroachdb/CockroachDriver.js +1 -1
  12. package/browser/driver/cockroachdb/CockroachDriver.js.map +1 -1
  13. package/browser/driver/cockroachdb/CockroachQueryRunner.js +2 -2
  14. package/browser/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
  15. package/browser/driver/mysql/MysqlQueryRunner.js +2 -2
  16. package/browser/driver/mysql/MysqlQueryRunner.js.map +1 -1
  17. package/browser/driver/oracle/OracleQueryRunner.js +2 -2
  18. package/browser/driver/oracle/OracleQueryRunner.js.map +1 -1
  19. package/browser/driver/postgres/PostgresDriver.js +1 -1
  20. package/browser/driver/postgres/PostgresDriver.js.map +1 -1
  21. package/browser/driver/postgres/PostgresQueryRunner.js +2 -2
  22. package/browser/driver/postgres/PostgresQueryRunner.js.map +1 -1
  23. package/browser/driver/sap/SapQueryRunner.js +2 -2
  24. package/browser/driver/sap/SapQueryRunner.js.map +1 -1
  25. package/browser/driver/sqlite/SqliteQueryRunner.js +16 -8
  26. package/browser/driver/sqlite/SqliteQueryRunner.js.map +1 -1
  27. package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +2 -2
  28. package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -1
  29. package/browser/driver/sqlserver/SqlServerQueryRunner.js +10 -10
  30. package/browser/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
  31. package/browser/find-options/FindOptionsUtils.js +1 -1
  32. package/browser/find-options/FindOptionsUtils.js.map +1 -1
  33. package/browser/metadata/ColumnMetadata.js +4 -4
  34. package/browser/metadata/ColumnMetadata.js.map +1 -1
  35. package/browser/metadata/EmbeddedMetadata.js +1 -1
  36. package/browser/metadata/EmbeddedMetadata.js.map +1 -1
  37. package/browser/metadata/EntityMetadata.js +1 -1
  38. package/browser/metadata/EntityMetadata.js.map +1 -1
  39. package/browser/metadata/RelationMetadata.js +4 -4
  40. package/browser/metadata/RelationMetadata.js.map +1 -1
  41. package/browser/metadata-builder/EntityMetadataBuilder.js +5 -5
  42. package/browser/metadata-builder/EntityMetadataBuilder.js.map +1 -1
  43. package/browser/metadata-builder/JunctionEntityMetadataBuilder.js +1 -1
  44. package/browser/metadata-builder/JunctionEntityMetadataBuilder.js.map +1 -1
  45. package/browser/naming-strategy/DefaultNamingStrategy.js +5 -5
  46. package/browser/naming-strategy/DefaultNamingStrategy.js.map +1 -1
  47. package/browser/persistence/Subject.js +1 -1
  48. package/browser/persistence/Subject.js.map +1 -1
  49. package/browser/persistence/SubjectDatabaseEntityLoader.js +1 -1
  50. package/browser/persistence/SubjectDatabaseEntityLoader.js.map +1 -1
  51. package/browser/persistence/SubjectExecutor.js +1 -1
  52. package/browser/persistence/SubjectExecutor.js.map +1 -1
  53. package/browser/persistence/SubjectTopoligicalSorter.js +5 -5
  54. package/browser/persistence/SubjectTopoligicalSorter.js.map +1 -1
  55. package/browser/persistence/tree/ClosureSubjectExecutor.js +4 -4
  56. package/browser/persistence/tree/ClosureSubjectExecutor.js.map +1 -1
  57. package/browser/query-builder/InsertQueryBuilder.js +2 -2
  58. package/browser/query-builder/InsertQueryBuilder.js.map +1 -1
  59. package/browser/query-builder/QueryBuilder.js +9 -9
  60. package/browser/query-builder/QueryBuilder.js.map +1 -1
  61. package/browser/query-builder/RelationLoader.js +2 -2
  62. package/browser/query-builder/RelationLoader.js.map +1 -1
  63. package/browser/query-builder/RelationRemover.js +6 -6
  64. package/browser/query-builder/RelationRemover.js.map +1 -1
  65. package/browser/query-builder/SelectQueryBuilder.js +7 -7
  66. package/browser/query-builder/SelectQueryBuilder.js.map +1 -1
  67. package/browser/query-builder/UpdateQueryBuilder.js +2 -2
  68. package/browser/query-builder/UpdateQueryBuilder.js.map +1 -1
  69. package/browser/query-builder/relation-id/RelationIdLoader.js +1 -1
  70. package/browser/query-builder/relation-id/RelationIdLoader.js.map +1 -1
  71. package/browser/query-builder/transformer/RawSqlResultsToEntityTransformer.js +2 -2
  72. package/browser/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -1
  73. package/browser/query-runner/BaseQueryRunner.js +2 -2
  74. package/browser/query-runner/BaseQueryRunner.js.map +1 -1
  75. package/browser/query-runner/QueryLock.js +1 -1
  76. package/browser/query-runner/QueryLock.js.map +1 -1
  77. package/browser/repository/BaseEntity.js +1 -1
  78. package/browser/repository/BaseEntity.js.map +1 -1
  79. package/browser/repository/Repository.js +1 -1
  80. package/browser/repository/Repository.js.map +1 -1
  81. package/browser/repository/TreeRepository.js +2 -2
  82. package/browser/repository/TreeRepository.js.map +1 -1
  83. package/browser/schema-builder/table/TableCheck.js +1 -1
  84. package/browser/schema-builder/table/TableCheck.js.map +1 -1
  85. package/browser/schema-builder/table/TableForeignKey.js +2 -2
  86. package/browser/schema-builder/table/TableForeignKey.js.map +1 -1
  87. package/browser/schema-builder/table/TableIndex.js +1 -1
  88. package/browser/schema-builder/table/TableIndex.js.map +1 -1
  89. package/browser/schema-builder/table/TableUnique.js +1 -1
  90. package/browser/schema-builder/table/TableUnique.js.map +1 -1
  91. package/cache/DbQueryResultCache.js +12 -12
  92. package/cache/RedisQueryResultCache.js +12 -12
  93. package/cli.js +1 -6
  94. package/cli.js.map +1 -1
  95. package/commands/CacheClearCommand.js +4 -4
  96. package/commands/CacheClearCommand.js.map +1 -1
  97. package/commands/CommandUtils.js +10 -10
  98. package/commands/CommandUtils.js.map +1 -1
  99. package/commands/EntityCreateCommand.js +3 -3
  100. package/commands/EntityCreateCommand.js.map +1 -1
  101. package/commands/InitCommand.js +5 -5
  102. package/commands/InitCommand.js.map +1 -1
  103. package/commands/MigrationCreateCommand.js +5 -5
  104. package/commands/MigrationCreateCommand.js.map +1 -1
  105. package/commands/MigrationGenerateCommand.js +7 -7
  106. package/commands/MigrationGenerateCommand.js.map +1 -1
  107. package/commands/MigrationRevertCommand.js +4 -4
  108. package/commands/MigrationRevertCommand.js.map +1 -1
  109. package/commands/MigrationRunCommand.js +5 -5
  110. package/commands/MigrationRunCommand.js.map +1 -1
  111. package/commands/MigrationShowCommand.js +5 -5
  112. package/commands/MigrationShowCommand.js.map +1 -1
  113. package/commands/QueryCommand.js +4 -4
  114. package/commands/QueryCommand.js.map +1 -1
  115. package/commands/SchemaDropCommand.js +4 -4
  116. package/commands/SchemaDropCommand.js.map +1 -1
  117. package/commands/SchemaLogCommand.js +5 -5
  118. package/commands/SchemaLogCommand.js.map +1 -1
  119. package/commands/SchemaSyncCommand.js +4 -4
  120. package/commands/SchemaSyncCommand.js.map +1 -1
  121. package/commands/SubscriberCreateCommand.js +3 -3
  122. package/commands/SubscriberCreateCommand.js.map +1 -1
  123. package/commands/VersionCommand.js +3 -3
  124. package/commands/VersionCommand.js.map +1 -1
  125. package/connection/Connection.js +19 -19
  126. package/connection/Connection.js.map +1 -1
  127. package/connection/ConnectionMetadataBuilder.js +11 -11
  128. package/connection/ConnectionMetadataBuilder.js.map +1 -1
  129. package/connection/ConnectionOptionsReader.js +9 -9
  130. package/connection/ConnectionOptionsReader.js.map +1 -1
  131. package/connection/options-reader/ConnectionOptionsEnvReader.js +2 -2
  132. package/connection/options-reader/ConnectionOptionsXmlReader.js +3 -3
  133. package/connection/options-reader/ConnectionOptionsXmlReader.js.map +1 -1
  134. package/connection/options-reader/ConnectionOptionsYmlReader.js +4 -4
  135. package/connection/options-reader/ConnectionOptionsYmlReader.js.map +1 -1
  136. package/decorator/Check.js +1 -1
  137. package/decorator/Check.js.map +1 -1
  138. package/decorator/EntityRepository.js +1 -1
  139. package/decorator/EntityRepository.js.map +1 -1
  140. package/decorator/Exclusion.js +1 -1
  141. package/decorator/Exclusion.js.map +1 -1
  142. package/decorator/Generated.js +1 -1
  143. package/decorator/Generated.js.map +1 -1
  144. package/decorator/Index.js +1 -1
  145. package/decorator/Index.js.map +1 -1
  146. package/decorator/Unique.js +1 -1
  147. package/decorator/Unique.js.map +1 -1
  148. package/decorator/columns/Column.js +4 -4
  149. package/decorator/columns/Column.js.map +1 -1
  150. package/decorator/columns/CreateDateColumn.js +1 -1
  151. package/decorator/columns/CreateDateColumn.js.map +1 -1
  152. package/decorator/columns/DeleteDateColumn.js +1 -1
  153. package/decorator/columns/DeleteDateColumn.js.map +1 -1
  154. package/decorator/columns/ObjectIdColumn.js +1 -1
  155. package/decorator/columns/ObjectIdColumn.js.map +1 -1
  156. package/decorator/columns/PrimaryColumn.js +2 -2
  157. package/decorator/columns/PrimaryColumn.js.map +1 -1
  158. package/decorator/columns/PrimaryGeneratedColumn.js +2 -2
  159. package/decorator/columns/PrimaryGeneratedColumn.js.map +1 -1
  160. package/decorator/columns/UpdateDateColumn.js +1 -1
  161. package/decorator/columns/UpdateDateColumn.js.map +1 -1
  162. package/decorator/columns/VersionColumn.js +1 -1
  163. package/decorator/columns/VersionColumn.js.map +1 -1
  164. package/decorator/columns/ViewColumn.js +1 -1
  165. package/decorator/columns/ViewColumn.js.map +1 -1
  166. package/decorator/entity/ChildEntity.js +2 -2
  167. package/decorator/entity/ChildEntity.js.map +1 -1
  168. package/decorator/entity/Entity.js +1 -1
  169. package/decorator/entity/Entity.js.map +1 -1
  170. package/decorator/entity/TableInheritance.js +1 -1
  171. package/decorator/entity/TableInheritance.js.map +1 -1
  172. package/decorator/entity-view/ViewEntity.js +1 -1
  173. package/decorator/entity-view/ViewEntity.js.map +1 -1
  174. package/decorator/listeners/AfterInsert.js +1 -1
  175. package/decorator/listeners/AfterInsert.js.map +1 -1
  176. package/decorator/listeners/AfterLoad.js +1 -1
  177. package/decorator/listeners/AfterLoad.js.map +1 -1
  178. package/decorator/listeners/AfterRemove.js +1 -1
  179. package/decorator/listeners/AfterRemove.js.map +1 -1
  180. package/decorator/listeners/AfterUpdate.js +1 -1
  181. package/decorator/listeners/AfterUpdate.js.map +1 -1
  182. package/decorator/listeners/BeforeInsert.js +1 -1
  183. package/decorator/listeners/BeforeInsert.js.map +1 -1
  184. package/decorator/listeners/BeforeRemove.js +1 -1
  185. package/decorator/listeners/BeforeRemove.js.map +1 -1
  186. package/decorator/listeners/BeforeUpdate.js +1 -1
  187. package/decorator/listeners/BeforeUpdate.js.map +1 -1
  188. package/decorator/listeners/EventSubscriber.js +1 -1
  189. package/decorator/listeners/EventSubscriber.js.map +1 -1
  190. package/decorator/relations/JoinColumn.js +1 -1
  191. package/decorator/relations/JoinColumn.js.map +1 -1
  192. package/decorator/relations/JoinTable.js +1 -1
  193. package/decorator/relations/JoinTable.js.map +1 -1
  194. package/decorator/relations/ManyToMany.js +1 -1
  195. package/decorator/relations/ManyToMany.js.map +1 -1
  196. package/decorator/relations/ManyToOne.js +1 -1
  197. package/decorator/relations/ManyToOne.js.map +1 -1
  198. package/decorator/relations/OneToMany.js +1 -1
  199. package/decorator/relations/OneToMany.js.map +1 -1
  200. package/decorator/relations/OneToOne.js +1 -1
  201. package/decorator/relations/OneToOne.js.map +1 -1
  202. package/decorator/relations/RelationCount.js +1 -1
  203. package/decorator/relations/RelationCount.js.map +1 -1
  204. package/decorator/relations/RelationId.js +1 -1
  205. package/decorator/relations/RelationId.js.map +1 -1
  206. package/decorator/transaction/Transaction.js +7 -7
  207. package/decorator/transaction/Transaction.js.map +1 -1
  208. package/decorator/transaction/TransactionManager.js +1 -1
  209. package/decorator/transaction/TransactionManager.js.map +1 -1
  210. package/decorator/transaction/TransactionRepository.js +1 -1
  211. package/decorator/transaction/TransactionRepository.js.map +1 -1
  212. package/decorator/tree/Tree.js +1 -1
  213. package/decorator/tree/Tree.js.map +1 -1
  214. package/decorator/tree/TreeChildren.js +1 -1
  215. package/decorator/tree/TreeChildren.js.map +1 -1
  216. package/decorator/tree/TreeLevelColumn.js +1 -1
  217. package/decorator/tree/TreeLevelColumn.js.map +1 -1
  218. package/decorator/tree/TreeParent.js +1 -1
  219. package/decorator/tree/TreeParent.js.map +1 -1
  220. package/driver/DriverUtils.js +9 -9
  221. package/driver/DriverUtils.js.map +1 -1
  222. package/driver/aurora-data-api/AuroraDataApiConnection.js +1 -1
  223. package/driver/aurora-data-api/AuroraDataApiConnection.js.map +1 -1
  224. package/driver/aurora-data-api/AuroraDataApiDriver.js +6 -6
  225. package/driver/aurora-data-api/AuroraDataApiQueryRunner.js +129 -129
  226. package/driver/aurora-data-api/AuroraDataApiQueryRunner.js.map +1 -1
  227. package/driver/aurora-data-api-pg/AuroraDataApiPostgresDriver.js +8 -8
  228. package/driver/aurora-data-api-pg/AuroraDataApiPostgresDriver.js.map +1 -1
  229. package/driver/aurora-data-api-pg/AuroraDataApiPostgresQueryRunner.js +12 -12
  230. package/driver/aurora-data-api-pg/AuroraDataApiPostgresQueryRunner.js.map +1 -1
  231. package/driver/better-sqlite3/BetterSqlite3Driver.js +10 -10
  232. package/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
  233. package/driver/better-sqlite3/BetterSqlite3QueryRunner.js +5 -5
  234. package/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
  235. package/driver/capacitor/CapacitorDriver.js +7 -7
  236. package/driver/capacitor/CapacitorDriver.js.map +1 -1
  237. package/driver/capacitor/CapacitorQueryRunner.js +5 -5
  238. package/driver/capacitor/CapacitorQueryRunner.js.map +1 -1
  239. package/driver/cockroachdb/CockroachDriver.js +11 -11
  240. package/driver/cockroachdb/CockroachDriver.js.map +1 -1
  241. package/driver/cockroachdb/CockroachQueryRunner.js +137 -137
  242. package/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
  243. package/driver/cordova/CordovaDriver.js +3 -3
  244. package/driver/cordova/CordovaDriver.js.map +1 -1
  245. package/driver/cordova/CordovaQueryRunner.js +13 -13
  246. package/driver/cordova/CordovaQueryRunner.js.map +1 -1
  247. package/driver/expo/ExpoDriver.js +3 -3
  248. package/driver/expo/ExpoDriver.js.map +1 -1
  249. package/driver/expo/ExpoQueryRunner.js +11 -11
  250. package/driver/expo/ExpoQueryRunner.js.map +1 -1
  251. package/driver/mongodb/MongoDriver.js +2 -2
  252. package/driver/mongodb/MongoQueryRunner.js +178 -178
  253. package/driver/mysql/MysqlDriver.js +5 -5
  254. package/driver/mysql/MysqlDriver.js.map +1 -1
  255. package/driver/mysql/MysqlQueryRunner.js +130 -130
  256. package/driver/mysql/MysqlQueryRunner.js.map +1 -1
  257. package/driver/nativescript/NativescriptDriver.js +3 -3
  258. package/driver/nativescript/NativescriptDriver.js.map +1 -1
  259. package/driver/nativescript/NativescriptQueryRunner.js +3 -3
  260. package/driver/nativescript/NativescriptQueryRunner.js.map +1 -1
  261. package/driver/oracle/OracleDriver.js +8 -8
  262. package/driver/oracle/OracleQueryRunner.js +125 -125
  263. package/driver/oracle/OracleQueryRunner.js.map +1 -1
  264. package/driver/postgres/PostgresDriver.js +19 -19
  265. package/driver/postgres/PostgresDriver.js.map +1 -1
  266. package/driver/postgres/PostgresQueryRunner.js +150 -150
  267. package/driver/postgres/PostgresQueryRunner.js.map +1 -1
  268. package/driver/react-native/ReactNativeDriver.js +3 -3
  269. package/driver/react-native/ReactNativeDriver.js.map +1 -1
  270. package/driver/react-native/ReactNativeQueryRunner.js +3 -3
  271. package/driver/react-native/ReactNativeQueryRunner.js.map +1 -1
  272. package/driver/sap/SapDriver.js +5 -5
  273. package/driver/sap/SapDriver.js.map +1 -1
  274. package/driver/sap/SapQueryRunner.js +135 -135
  275. package/driver/sap/SapQueryRunner.js.map +1 -1
  276. package/driver/sqlite/SqliteDriver.js +10 -10
  277. package/driver/sqlite/SqliteDriver.js.map +1 -1
  278. package/driver/sqlite/SqliteQueryRunner.js +21 -13
  279. package/driver/sqlite/SqliteQueryRunner.js.map +1 -1
  280. package/driver/sqlite-abstract/AbstractSqliteDriver.js +4 -4
  281. package/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +121 -121
  282. package/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -1
  283. package/driver/sqljs/SqljsDriver.js +13 -13
  284. package/driver/sqljs/SqljsDriver.js.map +1 -1
  285. package/driver/sqljs/SqljsQueryRunner.js +9 -9
  286. package/driver/sqljs/SqljsQueryRunner.js.map +1 -1
  287. package/driver/sqlserver/SqlServerDriver.js +6 -6
  288. package/driver/sqlserver/SqlServerQueryRunner.js +152 -152
  289. package/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
  290. package/entity-manager/EntityManager.js +30 -30
  291. package/entity-manager/EntityManager.js.map +1 -1
  292. package/entity-manager/MongoEntityManager.js +15 -15
  293. package/entity-manager/MongoEntityManager.js.map +1 -1
  294. package/entity-manager/SqljsEntityManager.js +5 -5
  295. package/entity-manager/SqljsEntityManager.js.map +1 -1
  296. package/entity-schema/EntitySchemaTransformer.js +1 -1
  297. package/entity-schema/EntitySchemaTransformer.js.map +1 -1
  298. package/error/AlreadyHasActiveConnectionError.js +1 -1
  299. package/error/AlreadyHasActiveConnectionError.js.map +1 -1
  300. package/error/CannotAttachTreeChildrenEntityError.js +1 -1
  301. package/error/CannotAttachTreeChildrenEntityError.js.map +1 -1
  302. package/error/CannotConnectAlreadyConnectedError.js +1 -1
  303. package/error/CannotConnectAlreadyConnectedError.js.map +1 -1
  304. package/error/CannotCreateEntityIdMapError.js +1 -1
  305. package/error/CannotCreateEntityIdMapError.js.map +1 -1
  306. package/error/CannotDetermineEntityError.js +1 -1
  307. package/error/CannotDetermineEntityError.js.map +1 -1
  308. package/error/CannotExecuteNotConnectedError.js +1 -1
  309. package/error/CannotExecuteNotConnectedError.js.map +1 -1
  310. package/error/CannotGetEntityManagerNotConnectedError.js +1 -1
  311. package/error/CannotGetEntityManagerNotConnectedError.js.map +1 -1
  312. package/error/CannotReflectMethodParameterTypeError.js +1 -1
  313. package/error/CannotReflectMethodParameterTypeError.js.map +1 -1
  314. package/error/CircularRelationsError.js +1 -1
  315. package/error/CircularRelationsError.js.map +1 -1
  316. package/error/ColumnTypeUndefinedError.js +1 -1
  317. package/error/ColumnTypeUndefinedError.js.map +1 -1
  318. package/error/ConnectionIsNotSetError.js +1 -1
  319. package/error/ConnectionIsNotSetError.js.map +1 -1
  320. package/error/ConnectionNotFoundError.js +1 -1
  321. package/error/ConnectionNotFoundError.js.map +1 -1
  322. package/error/CustomRepositoryCannotInheritRepositoryError.js +1 -1
  323. package/error/CustomRepositoryCannotInheritRepositoryError.js.map +1 -1
  324. package/error/CustomRepositoryDoesNotHaveEntityError.js +1 -1
  325. package/error/CustomRepositoryDoesNotHaveEntityError.js.map +1 -1
  326. package/error/CustomRepositoryNotFoundError.js +1 -1
  327. package/error/CustomRepositoryNotFoundError.js.map +1 -1
  328. package/error/DataTypeNotSupportedError.js +1 -1
  329. package/error/DataTypeNotSupportedError.js.map +1 -1
  330. package/error/DriverOptionNotSetError.js +1 -1
  331. package/error/DriverOptionNotSetError.js.map +1 -1
  332. package/error/DriverPackageNotInstalledError.js +1 -1
  333. package/error/DriverPackageNotInstalledError.js.map +1 -1
  334. package/error/EntityColumnNotFound.js +1 -1
  335. package/error/EntityColumnNotFound.js.map +1 -1
  336. package/error/EntityMetadataNotFoundError.js +1 -1
  337. package/error/EntityMetadataNotFoundError.js.map +1 -1
  338. package/error/EntityNotFoundError.js +1 -1
  339. package/error/EntityNotFoundError.js.map +1 -1
  340. package/error/FindRelationsNotFoundError.js +1 -1
  341. package/error/FindRelationsNotFoundError.js.map +1 -1
  342. package/error/InitializedRelationError.js +1 -1
  343. package/error/InitializedRelationError.js.map +1 -1
  344. package/error/InsertValuesMissingError.js +1 -1
  345. package/error/InsertValuesMissingError.js.map +1 -1
  346. package/error/LimitOnUpdateNotSupportedError.js +1 -1
  347. package/error/LimitOnUpdateNotSupportedError.js.map +1 -1
  348. package/error/LockNotSupportedOnGivenDriverError.js +1 -1
  349. package/error/LockNotSupportedOnGivenDriverError.js.map +1 -1
  350. package/error/MetadataAlreadyExistsError.js +1 -1
  351. package/error/MetadataAlreadyExistsError.js.map +1 -1
  352. package/error/MetadataWithSuchNameAlreadyExistsError.js +1 -1
  353. package/error/MetadataWithSuchNameAlreadyExistsError.js.map +1 -1
  354. package/error/MissingDeleteDateColumnError.js +1 -1
  355. package/error/MissingDeleteDateColumnError.js.map +1 -1
  356. package/error/MissingDriverError.js +1 -1
  357. package/error/MissingDriverError.js.map +1 -1
  358. package/error/MissingJoinColumnError.js +1 -1
  359. package/error/MissingJoinColumnError.js.map +1 -1
  360. package/error/MissingJoinTableError.js +1 -1
  361. package/error/MissingJoinTableError.js.map +1 -1
  362. package/error/MissingPrimaryColumnError.js +1 -1
  363. package/error/MissingPrimaryColumnError.js.map +1 -1
  364. package/error/MustBeEntityError.js +1 -1
  365. package/error/MustBeEntityError.js.map +1 -1
  366. package/error/NamingStrategyNotFoundError.js +1 -1
  367. package/error/NamingStrategyNotFoundError.js.map +1 -1
  368. package/error/NestedSetMultipleRootError.js +1 -1
  369. package/error/NestedSetMultipleRootError.js.map +1 -1
  370. package/error/NoConnectionForRepositoryError.js +1 -1
  371. package/error/NoConnectionForRepositoryError.js.map +1 -1
  372. package/error/NoConnectionOptionError.js +1 -1
  373. package/error/NoConnectionOptionError.js.map +1 -1
  374. package/error/NoNeedToReleaseEntityManagerError.js +1 -1
  375. package/error/NoNeedToReleaseEntityManagerError.js.map +1 -1
  376. package/error/NoVersionOrUpdateDateColumnError.js +1 -1
  377. package/error/NoVersionOrUpdateDateColumnError.js.map +1 -1
  378. package/error/OffsetWithoutLimitNotSupportedError.js +1 -1
  379. package/error/OffsetWithoutLimitNotSupportedError.js.map +1 -1
  380. package/error/OptimisticLockCanNotBeUsedError.js +1 -1
  381. package/error/OptimisticLockCanNotBeUsedError.js.map +1 -1
  382. package/error/OptimisticLockVersionMismatchError.js +1 -1
  383. package/error/OptimisticLockVersionMismatchError.js.map +1 -1
  384. package/error/PersistedEntityNotFoundError.js +1 -1
  385. package/error/PersistedEntityNotFoundError.js.map +1 -1
  386. package/error/PessimisticLockTransactionRequiredError.js +1 -1
  387. package/error/PessimisticLockTransactionRequiredError.js.map +1 -1
  388. package/error/PrimaryColumnCannotBeNullableError.js +1 -1
  389. package/error/PrimaryColumnCannotBeNullableError.js.map +1 -1
  390. package/error/QueryFailedError.js +3 -3
  391. package/error/QueryFailedError.js.map +1 -1
  392. package/error/QueryRunnerAlreadyReleasedError.js +1 -1
  393. package/error/QueryRunnerAlreadyReleasedError.js.map +1 -1
  394. package/error/QueryRunnerProviderAlreadyReleasedError.js +1 -1
  395. package/error/QueryRunnerProviderAlreadyReleasedError.js.map +1 -1
  396. package/error/RepositoryNotFoundError.js +1 -1
  397. package/error/RepositoryNotFoundError.js.map +1 -1
  398. package/error/RepositoryNotTreeError.js +1 -1
  399. package/error/RepositoryNotTreeError.js.map +1 -1
  400. package/error/ReturningStatementNotSupportedError.js +1 -1
  401. package/error/ReturningStatementNotSupportedError.js.map +1 -1
  402. package/error/SubjectRemovedAndUpdatedError.js +1 -1
  403. package/error/SubjectRemovedAndUpdatedError.js.map +1 -1
  404. package/error/SubjectWithoutIdentifierError.js +1 -1
  405. package/error/SubjectWithoutIdentifierError.js.map +1 -1
  406. package/error/TransactionAlreadyStartedError.js +1 -1
  407. package/error/TransactionAlreadyStartedError.js.map +1 -1
  408. package/error/TransactionNotStartedError.js +1 -1
  409. package/error/TransactionNotStartedError.js.map +1 -1
  410. package/error/TreeRepositoryNotSupportedError.js +1 -1
  411. package/error/TreeRepositoryNotSupportedError.js.map +1 -1
  412. package/error/TypeORMError.js +1 -1
  413. package/error/TypeORMError.js.map +1 -1
  414. package/error/UpdateValuesMissingError.js +1 -1
  415. package/error/UpdateValuesMissingError.js.map +1 -1
  416. package/error/UsingJoinColumnIsNotAllowedError.js +1 -1
  417. package/error/UsingJoinColumnIsNotAllowedError.js.map +1 -1
  418. package/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +1 -1
  419. package/error/UsingJoinColumnOnlyOnOneSideAllowedError.js.map +1 -1
  420. package/error/UsingJoinTableIsNotAllowedError.js +1 -1
  421. package/error/UsingJoinTableIsNotAllowedError.js.map +1 -1
  422. package/error/UsingJoinTableOnlyOnOneSideAllowedError.js +1 -1
  423. package/error/UsingJoinTableOnlyOnOneSideAllowedError.js.map +1 -1
  424. package/error/index.js +62 -62
  425. package/error/index.js.map +1 -1
  426. package/find-options/FindOptionsUtils.js +4 -4
  427. package/find-options/FindOptionsUtils.js.map +1 -1
  428. package/globals.js +7 -7
  429. package/globals.js.map +1 -1
  430. package/index.js +102 -102
  431. package/index.js.map +1 -1
  432. package/logger/DebugLogger.js +9 -9
  433. package/logger/DebugLogger.js.map +1 -1
  434. package/logger/FileLogger.js +1 -1
  435. package/logger/FileLogger.js.map +1 -1
  436. package/metadata/ColumnMetadata.js +4 -4
  437. package/metadata/ColumnMetadata.js.map +1 -1
  438. package/metadata/EmbeddedMetadata.js +1 -1
  439. package/metadata/EmbeddedMetadata.js.map +1 -1
  440. package/metadata/EntityMetadata.js +2 -2
  441. package/metadata/EntityMetadata.js.map +1 -1
  442. package/metadata/RelationMetadata.js +4 -4
  443. package/metadata/RelationMetadata.js.map +1 -1
  444. package/metadata-builder/EntityMetadataBuilder.js +5 -5
  445. package/metadata-builder/EntityMetadataBuilder.js.map +1 -1
  446. package/metadata-builder/JunctionEntityMetadataBuilder.js +1 -1
  447. package/metadata-builder/JunctionEntityMetadataBuilder.js.map +1 -1
  448. package/migration/MigrationExecutor.js +33 -33
  449. package/migration/MigrationExecutor.js.map +1 -1
  450. package/naming-strategy/DefaultNamingStrategy.js +10 -10
  451. package/naming-strategy/DefaultNamingStrategy.js.map +1 -1
  452. package/package.json +1 -239
  453. package/persistence/EntityPersistExecutor.js +5 -5
  454. package/persistence/EntityPersistExecutor.js.map +1 -1
  455. package/persistence/Subject.js +1 -1
  456. package/persistence/Subject.js.map +1 -1
  457. package/persistence/SubjectDatabaseEntityLoader.js +6 -6
  458. package/persistence/SubjectDatabaseEntityLoader.js.map +1 -1
  459. package/persistence/SubjectExecutor.js +31 -31
  460. package/persistence/SubjectExecutor.js.map +1 -1
  461. package/persistence/SubjectTopoligicalSorter.js +5 -5
  462. package/persistence/SubjectTopoligicalSorter.js.map +1 -1
  463. package/persistence/subject-builder/CascadesSubjectBuilder.js +1 -1
  464. package/persistence/subject-builder/CascadesSubjectBuilder.js.map +1 -1
  465. package/persistence/tree/ClosureSubjectExecutor.js +13 -13
  466. package/persistence/tree/ClosureSubjectExecutor.js.map +1 -1
  467. package/persistence/tree/MaterializedPathSubjectExecutor.js +5 -5
  468. package/persistence/tree/MaterializedPathSubjectExecutor.js.map +1 -1
  469. package/persistence/tree/NestedSetSubjectExecutor.js +14 -14
  470. package/persistence/tree/NestedSetSubjectExecutor.js.map +1 -1
  471. package/platform/PlatformTools.js +8 -8
  472. package/platform/PlatformTools.js.map +1 -1
  473. package/query-builder/DeleteQueryBuilder.js +4 -4
  474. package/query-builder/DeleteQueryBuilder.js.map +1 -1
  475. package/query-builder/InsertQueryBuilder.js +7 -7
  476. package/query-builder/InsertQueryBuilder.js.map +1 -1
  477. package/query-builder/JoinAttribute.js +1 -1
  478. package/query-builder/JoinAttribute.js.map +1 -1
  479. package/query-builder/QueryBuilder.js +37 -37
  480. package/query-builder/QueryBuilder.js.map +1 -1
  481. package/query-builder/QueryBuilderUtils.js +1 -1
  482. package/query-builder/QueryBuilderUtils.js.map +1 -1
  483. package/query-builder/QueryExpressionMap.js +3 -3
  484. package/query-builder/QueryExpressionMap.js.map +1 -1
  485. package/query-builder/RelationLoader.js +2 -2
  486. package/query-builder/RelationLoader.js.map +1 -1
  487. package/query-builder/RelationQueryBuilder.js +13 -13
  488. package/query-builder/RelationQueryBuilder.js.map +1 -1
  489. package/query-builder/RelationRemover.js +12 -12
  490. package/query-builder/RelationRemover.js.map +1 -1
  491. package/query-builder/RelationUpdater.js +2 -2
  492. package/query-builder/ReturningResultsEntityUpdator.js +6 -6
  493. package/query-builder/SelectQueryBuilder.js +36 -36
  494. package/query-builder/SelectQueryBuilder.js.map +1 -1
  495. package/query-builder/SoftDeleteQueryBuilder.js +4 -4
  496. package/query-builder/SoftDeleteQueryBuilder.js.map +1 -1
  497. package/query-builder/UpdateQueryBuilder.js +7 -7
  498. package/query-builder/UpdateQueryBuilder.js.map +1 -1
  499. package/query-builder/relation-count/RelationCountAttribute.js +2 -2
  500. package/query-builder/relation-count/RelationCountAttribute.js.map +1 -1
  501. package/query-builder/relation-count/RelationCountLoader.js +4 -4
  502. package/query-builder/relation-id/RelationIdAttribute.js +1 -1
  503. package/query-builder/relation-id/RelationIdAttribute.js.map +1 -1
  504. package/query-builder/relation-id/RelationIdLoader.js +5 -5
  505. package/query-builder/relation-id/RelationIdLoader.js.map +1 -1
  506. package/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +3 -3
  507. package/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js.map +1 -1
  508. package/query-builder/transformer/RawSqlResultsToEntityTransformer.js +2 -2
  509. package/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -1
  510. package/query-runner/BaseQueryRunner.js +25 -25
  511. package/query-runner/BaseQueryRunner.js.map +1 -1
  512. package/query-runner/QueryLock.js +3 -3
  513. package/query-runner/QueryLock.js.map +1 -1
  514. package/repository/AbstractRepository.js +1 -1
  515. package/repository/AbstractRepository.js.map +1 -1
  516. package/repository/BaseEntity.js +4 -4
  517. package/repository/BaseEntity.js.map +1 -1
  518. package/repository/MongoRepository.js +1 -1
  519. package/repository/MongoRepository.js.map +1 -1
  520. package/repository/Repository.js +1 -1
  521. package/repository/Repository.js.map +1 -1
  522. package/repository/TreeRepository.js +7 -7
  523. package/repository/TreeRepository.js.map +1 -1
  524. package/schema-builder/MongoSchemaBuilder.js +2 -2
  525. package/schema-builder/RdbmsSchemaBuilder.js +95 -95
  526. package/schema-builder/RdbmsSchemaBuilder.js.map +1 -1
  527. package/schema-builder/table/Table.js +1 -1
  528. package/schema-builder/table/Table.js.map +1 -1
  529. package/schema-builder/table/TableCheck.js +1 -1
  530. package/schema-builder/table/TableCheck.js.map +1 -1
  531. package/schema-builder/table/TableForeignKey.js +2 -2
  532. package/schema-builder/table/TableForeignKey.js.map +1 -1
  533. package/schema-builder/table/TableIndex.js +1 -1
  534. package/schema-builder/table/TableIndex.js.map +1 -1
  535. package/schema-builder/table/TableUnique.js +1 -1
  536. package/schema-builder/table/TableUnique.js.map +1 -1
  537. package/util/DateUtils.js +1 -1
  538. package/util/DateUtils.js.map +1 -1
  539. package/util/DirectoryExportedClassesLoader.js +1 -1
  540. package/util/DirectoryExportedClassesLoader.js.map +1 -1
  541. package/util/ObjectUtils.js +2 -2
  542. package/util/ObjectUtils.js.map +1 -1
  543. package/util/OrmUtils.js +2 -2
  544. package/util/OrmUtils.js.map +1 -1
  545. package/util/StringUtils.js +2 -2
  546. package/util/StringUtils.js.map +1 -1
@@ -26,7 +26,7 @@ var QueryLock_1 = require("../../query-runner/QueryLock");
26
26
  * Runs queries on a single SQL Server database connection.
27
27
  */
28
28
  var SqlServerQueryRunner = /** @class */ (function (_super) {
29
- tslib_1.__extends(SqlServerQueryRunner, _super);
29
+ (0, tslib_1.__extends)(SqlServerQueryRunner, _super);
30
30
  // -------------------------------------------------------------------------
31
31
  // Constructor
32
32
  // -------------------------------------------------------------------------
@@ -64,10 +64,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
64
64
  * Starts transaction.
65
65
  */
66
66
  SqlServerQueryRunner.prototype.startTransaction = function (isolationLevel) {
67
- return tslib_1.__awaiter(this, void 0, void 0, function () {
67
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
68
68
  var beforeBroadcastResult;
69
69
  var _this = this;
70
- return tslib_1.__generator(this, function (_a) {
70
+ return (0, tslib_1.__generator)(this, function (_a) {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  if (this.isReleased)
@@ -81,10 +81,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
81
81
  case 1:
82
82
  _a.sent();
83
83
  _a.label = 2;
84
- case 2: return [2 /*return*/, new Promise(function (ok, fail) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
84
+ case 2: return [2 /*return*/, new Promise(function (ok, fail) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
85
85
  var pool, transactionCallback, afterBroadcastResult;
86
86
  var _this = this;
87
- return tslib_1.__generator(this, function (_a) {
87
+ return (0, tslib_1.__generator)(this, function (_a) {
88
88
  switch (_a.label) {
89
89
  case 0:
90
90
  this.isTransactionActive = true;
@@ -129,10 +129,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
129
129
  * Error will be thrown if transaction was not started.
130
130
  */
131
131
  SqlServerQueryRunner.prototype.commitTransaction = function () {
132
- return tslib_1.__awaiter(this, void 0, void 0, function () {
132
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
133
133
  var beforeBroadcastResult;
134
134
  var _this = this;
135
- return tslib_1.__generator(this, function (_a) {
135
+ return (0, tslib_1.__generator)(this, function (_a) {
136
136
  switch (_a.label) {
137
137
  case 0:
138
138
  if (this.isReleased)
@@ -147,9 +147,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
147
147
  _a.sent();
148
148
  _a.label = 2;
149
149
  case 2: return [2 /*return*/, new Promise(function (ok, fail) {
150
- _this.databaseConnection.commit(function (err) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
150
+ _this.databaseConnection.commit(function (err) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
151
151
  var afterBroadcastResult;
152
- return tslib_1.__generator(this, function (_a) {
152
+ return (0, tslib_1.__generator)(this, function (_a) {
153
153
  switch (_a.label) {
154
154
  case 0:
155
155
  if (err)
@@ -180,10 +180,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
180
180
  * Error will be thrown if transaction was not started.
181
181
  */
182
182
  SqlServerQueryRunner.prototype.rollbackTransaction = function () {
183
- return tslib_1.__awaiter(this, void 0, void 0, function () {
183
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
184
184
  var beforeBroadcastResult;
185
185
  var _this = this;
186
- return tslib_1.__generator(this, function (_a) {
186
+ return (0, tslib_1.__generator)(this, function (_a) {
187
187
  switch (_a.label) {
188
188
  case 0:
189
189
  if (this.isReleased)
@@ -198,9 +198,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
198
198
  _a.sent();
199
199
  _a.label = 2;
200
200
  case 2: return [2 /*return*/, new Promise(function (ok, fail) {
201
- _this.databaseConnection.rollback(function (err) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
201
+ _this.databaseConnection.rollback(function (err) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
202
202
  var afterBroadcastResult;
203
- return tslib_1.__generator(this, function (_a) {
203
+ return (0, tslib_1.__generator)(this, function (_a) {
204
204
  switch (_a.label) {
205
205
  case 0:
206
206
  if (err)
@@ -231,10 +231,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
231
231
  */
232
232
  SqlServerQueryRunner.prototype.query = function (query, parameters, useStructuredResult) {
233
233
  if (useStructuredResult === void 0) { useStructuredResult = false; }
234
- return tslib_1.__awaiter(this, void 0, void 0, function () {
234
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
235
235
  var release, pool, request_1, queryStartTime_1, raw, result, queryType, err_1;
236
236
  var _this = this;
237
- return tslib_1.__generator(this, function (_a) {
237
+ return (0, tslib_1.__generator)(this, function (_a) {
238
238
  switch (_a.label) {
239
239
  case 0:
240
240
  if (this.isReleased)
@@ -324,10 +324,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
324
324
  * Returns raw data stream.
325
325
  */
326
326
  SqlServerQueryRunner.prototype.stream = function (query, parameters, onEnd, onError) {
327
- return tslib_1.__awaiter(this, void 0, void 0, function () {
327
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
328
328
  var release, pool, request, PassThrough;
329
329
  var _this = this;
330
- return tslib_1.__generator(this, function (_a) {
330
+ return (0, tslib_1.__generator)(this, function (_a) {
331
331
  switch (_a.label) {
332
332
  case 0:
333
333
  if (this.isReleased)
@@ -377,9 +377,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
377
377
  * Returns all available database names including system databases.
378
378
  */
379
379
  SqlServerQueryRunner.prototype.getDatabases = function () {
380
- return tslib_1.__awaiter(this, void 0, void 0, function () {
380
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
381
381
  var results;
382
- return tslib_1.__generator(this, function (_a) {
382
+ return (0, tslib_1.__generator)(this, function (_a) {
383
383
  switch (_a.label) {
384
384
  case 0: return [4 /*yield*/, this.query("EXEC sp_databases")];
385
385
  case 1:
@@ -394,9 +394,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
394
394
  * If database parameter specified, returns schemas of that database.
395
395
  */
396
396
  SqlServerQueryRunner.prototype.getSchemas = function (database) {
397
- return tslib_1.__awaiter(this, void 0, void 0, function () {
397
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
398
398
  var query, results;
399
- return tslib_1.__generator(this, function (_a) {
399
+ return (0, tslib_1.__generator)(this, function (_a) {
400
400
  switch (_a.label) {
401
401
  case 0:
402
402
  query = database ? "SELECT * FROM \"" + database + "\".\"sys\".\"schema\"" : "SELECT * FROM \"sys\".\"schemas\"";
@@ -412,9 +412,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
412
412
  * Checks if database with the given name exist.
413
413
  */
414
414
  SqlServerQueryRunner.prototype.hasDatabase = function (database) {
415
- return tslib_1.__awaiter(this, void 0, void 0, function () {
415
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
416
416
  var result, dbId;
417
- return tslib_1.__generator(this, function (_a) {
417
+ return (0, tslib_1.__generator)(this, function (_a) {
418
418
  switch (_a.label) {
419
419
  case 0: return [4 /*yield*/, this.query("SELECT DB_ID('" + database + "') as \"db_id\"")];
420
420
  case 1:
@@ -429,9 +429,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
429
429
  * Loads currently using database
430
430
  */
431
431
  SqlServerQueryRunner.prototype.getCurrentDatabase = function () {
432
- return tslib_1.__awaiter(this, void 0, void 0, function () {
432
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
433
433
  var currentDBQuery;
434
- return tslib_1.__generator(this, function (_a) {
434
+ return (0, tslib_1.__generator)(this, function (_a) {
435
435
  switch (_a.label) {
436
436
  case 0: return [4 /*yield*/, this.query("SELECT DB_NAME() AS \"db_name\"")];
437
437
  case 1:
@@ -445,9 +445,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
445
445
  * Checks if schema with the given name exist.
446
446
  */
447
447
  SqlServerQueryRunner.prototype.hasSchema = function (schema) {
448
- return tslib_1.__awaiter(this, void 0, void 0, function () {
448
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
449
449
  var result, schemaId;
450
- return tslib_1.__generator(this, function (_a) {
450
+ return (0, tslib_1.__generator)(this, function (_a) {
451
451
  switch (_a.label) {
452
452
  case 0: return [4 /*yield*/, this.query("SELECT SCHEMA_ID('" + schema + "') as \"schema_id\"")];
453
453
  case 1:
@@ -462,9 +462,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
462
462
  * Loads currently using database schema
463
463
  */
464
464
  SqlServerQueryRunner.prototype.getCurrentSchema = function () {
465
- return tslib_1.__awaiter(this, void 0, void 0, function () {
465
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
466
466
  var currentSchemaQuery;
467
- return tslib_1.__generator(this, function (_a) {
467
+ return (0, tslib_1.__generator)(this, function (_a) {
468
468
  switch (_a.label) {
469
469
  case 0: return [4 /*yield*/, this.query("SELECT SCHEMA_NAME() AS \"schema_name\"")];
470
470
  case 1:
@@ -478,9 +478,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
478
478
  * Checks if table with the given name exist in the database.
479
479
  */
480
480
  SqlServerQueryRunner.prototype.hasTable = function (tableOrName) {
481
- return tslib_1.__awaiter(this, void 0, void 0, function () {
481
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
482
482
  var parsedTableName, _a, _b, sql, result;
483
- return tslib_1.__generator(this, function (_c) {
483
+ return (0, tslib_1.__generator)(this, function (_c) {
484
484
  switch (_c.label) {
485
485
  case 0:
486
486
  parsedTableName = this.driver.parseTableName(tableOrName);
@@ -511,9 +511,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
511
511
  * Checks if column exist in the table.
512
512
  */
513
513
  SqlServerQueryRunner.prototype.hasColumn = function (tableOrName, columnName) {
514
- return tslib_1.__awaiter(this, void 0, void 0, function () {
514
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
515
515
  var parsedTableName, _a, _b, sql, result;
516
- return tslib_1.__generator(this, function (_c) {
516
+ return (0, tslib_1.__generator)(this, function (_c) {
517
517
  switch (_c.label) {
518
518
  case 0:
519
519
  parsedTableName = this.driver.parseTableName(tableOrName);
@@ -544,9 +544,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
544
544
  * Creates a new database.
545
545
  */
546
546
  SqlServerQueryRunner.prototype.createDatabase = function (database, ifNotExist) {
547
- return tslib_1.__awaiter(this, void 0, void 0, function () {
547
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
548
548
  var up, down;
549
- return tslib_1.__generator(this, function (_a) {
549
+ return (0, tslib_1.__generator)(this, function (_a) {
550
550
  switch (_a.label) {
551
551
  case 0:
552
552
  up = ifNotExist ? "IF DB_ID('" + database + "') IS NULL CREATE DATABASE \"" + database + "\"" : "CREATE DATABASE \"" + database + "\"";
@@ -563,9 +563,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
563
563
  * Drops database.
564
564
  */
565
565
  SqlServerQueryRunner.prototype.dropDatabase = function (database, ifExist) {
566
- return tslib_1.__awaiter(this, void 0, void 0, function () {
566
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
567
567
  var up, down;
568
- return tslib_1.__generator(this, function (_a) {
568
+ return (0, tslib_1.__generator)(this, function (_a) {
569
569
  switch (_a.label) {
570
570
  case 0:
571
571
  up = ifExist ? "IF DB_ID('" + database + "') IS NOT NULL DROP DATABASE \"" + database + "\"" : "DROP DATABASE \"" + database + "\"";
@@ -583,9 +583,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
583
583
  * If database name also specified (e.g. 'dbName.schemaName') schema will be created in specified database.
584
584
  */
585
585
  SqlServerQueryRunner.prototype.createSchema = function (schemaPath, ifNotExist) {
586
- return tslib_1.__awaiter(this, void 0, void 0, function () {
586
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
587
587
  var upQueries, downQueries, upQuery, dbName, schema, currentDB, upQuery;
588
- return tslib_1.__generator(this, function (_a) {
588
+ return (0, tslib_1.__generator)(this, function (_a) {
589
589
  switch (_a.label) {
590
590
  case 0:
591
591
  upQueries = [];
@@ -622,9 +622,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
622
622
  * If database name also specified (e.g. 'dbName.schemaName') schema will be dropped in specified database.
623
623
  */
624
624
  SqlServerQueryRunner.prototype.dropSchema = function (schemaPath, ifExist) {
625
- return tslib_1.__awaiter(this, void 0, void 0, function () {
625
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
626
626
  var upQueries, downQueries, upQuery, dbName, schema, currentDB, upQuery;
627
- return tslib_1.__generator(this, function (_a) {
627
+ return (0, tslib_1.__generator)(this, function (_a) {
628
628
  switch (_a.label) {
629
629
  case 0:
630
630
  upQueries = [];
@@ -663,10 +663,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
663
663
  if (ifNotExist === void 0) { ifNotExist = false; }
664
664
  if (createForeignKeys === void 0) { createForeignKeys = true; }
665
665
  if (createIndices === void 0) { createIndices = true; }
666
- return tslib_1.__awaiter(this, void 0, void 0, function () {
666
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
667
667
  var isTableExist, upQueries, downQueries;
668
668
  var _this = this;
669
- return tslib_1.__generator(this, function (_a) {
669
+ return (0, tslib_1.__generator)(this, function (_a) {
670
670
  switch (_a.label) {
671
671
  case 0:
672
672
  if (!ifNotExist) return [3 /*break*/, 2];
@@ -708,10 +708,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
708
708
  SqlServerQueryRunner.prototype.dropTable = function (tableOrName, ifExist, dropForeignKeys, dropIndices) {
709
709
  if (dropForeignKeys === void 0) { dropForeignKeys = true; }
710
710
  if (dropIndices === void 0) { dropIndices = true; }
711
- return tslib_1.__awaiter(this, void 0, void 0, function () {
711
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
712
712
  var isTableExist, createForeignKeys, table, _a, upQueries, downQueries;
713
713
  var _this = this;
714
- return tslib_1.__generator(this, function (_b) {
714
+ return (0, tslib_1.__generator)(this, function (_b) {
715
715
  switch (_b.label) {
716
716
  case 0:
717
717
  if (!ifExist) return [3 /*break*/, 2];
@@ -760,9 +760,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
760
760
  * Creates a new view.
761
761
  */
762
762
  SqlServerQueryRunner.prototype.createView = function (view) {
763
- return tslib_1.__awaiter(this, void 0, void 0, function () {
763
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
764
764
  var upQueries, downQueries, _a, _b, _c, _d;
765
- return tslib_1.__generator(this, function (_e) {
765
+ return (0, tslib_1.__generator)(this, function (_e) {
766
766
  switch (_e.label) {
767
767
  case 0:
768
768
  upQueries = [];
@@ -789,9 +789,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
789
789
  * Drops the view.
790
790
  */
791
791
  SqlServerQueryRunner.prototype.dropView = function (target) {
792
- return tslib_1.__awaiter(this, void 0, void 0, function () {
792
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
793
793
  var viewName, view, upQueries, downQueries, _a, _b, _c, _d;
794
- return tslib_1.__generator(this, function (_e) {
794
+ return (0, tslib_1.__generator)(this, function (_e) {
795
795
  switch (_e.label) {
796
796
  case 0:
797
797
  viewName = target instanceof View_1.View ? target.name : target;
@@ -822,10 +822,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
822
822
  * Renames a table.
823
823
  */
824
824
  SqlServerQueryRunner.prototype.renameTable = function (oldTableOrName, newTableName) {
825
- return tslib_1.__awaiter(this, void 0, void 0, function () {
825
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
826
826
  var upQueries, downQueries, oldTable, _a, newTable, dbName, schemaName, oldTableName, splittedName, currentDB, columnNames, oldPkName, newPkName;
827
827
  var _this = this;
828
- return tslib_1.__generator(this, function (_b) {
828
+ return (0, tslib_1.__generator)(this, function (_b) {
829
829
  switch (_b.label) {
830
830
  case 0:
831
831
  upQueries = [];
@@ -924,9 +924,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
924
924
  * Creates a new column from the column in the table.
925
925
  */
926
926
  SqlServerQueryRunner.prototype.addColumn = function (tableOrName, column) {
927
- return tslib_1.__awaiter(this, void 0, void 0, function () {
927
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
928
928
  var table, _a, clonedTable, upQueries, downQueries, primaryColumns, pkName_1, columnNames_1, pkName, columnNames, columnIndex, uniqueConstraint, defaultName;
929
- return tslib_1.__generator(this, function (_b) {
929
+ return (0, tslib_1.__generator)(this, function (_b) {
930
930
  switch (_b.label) {
931
931
  case 0:
932
932
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -993,14 +993,14 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
993
993
  * Creates a new columns from the column in the table.
994
994
  */
995
995
  SqlServerQueryRunner.prototype.addColumns = function (tableOrName, columns) {
996
- return tslib_1.__awaiter(this, void 0, void 0, function () {
996
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
997
997
  var columns_1, columns_1_1, column, e_1_1;
998
998
  var e_1, _a;
999
- return tslib_1.__generator(this, function (_b) {
999
+ return (0, tslib_1.__generator)(this, function (_b) {
1000
1000
  switch (_b.label) {
1001
1001
  case 0:
1002
1002
  _b.trys.push([0, 5, 6, 7]);
1003
- columns_1 = tslib_1.__values(columns), columns_1_1 = columns_1.next();
1003
+ columns_1 = (0, tslib_1.__values)(columns), columns_1_1 = columns_1.next();
1004
1004
  _b.label = 1;
1005
1005
  case 1:
1006
1006
  if (!!columns_1_1.done) return [3 /*break*/, 4];
@@ -1032,9 +1032,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1032
1032
  * Renames column in the given table.
1033
1033
  */
1034
1034
  SqlServerQueryRunner.prototype.renameColumn = function (tableOrName, oldTableColumnOrName, newTableColumnOrName) {
1035
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1035
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1036
1036
  var table, _a, oldColumn, newColumn;
1037
- return tslib_1.__generator(this, function (_b) {
1037
+ return (0, tslib_1.__generator)(this, function (_b) {
1038
1038
  switch (_b.label) {
1039
1039
  case 0:
1040
1040
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1069,10 +1069,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1069
1069
  * Changes a column in the table.
1070
1070
  */
1071
1071
  SqlServerQueryRunner.prototype.changeColumn = function (tableOrName, oldTableColumnOrName, newColumn) {
1072
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1072
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1073
1073
  var table, _a, clonedTable, upQueries, downQueries, oldColumn, dbName_1, schemaName_1, splittedName, currentDB, primaryColumns, columnNames, oldPkName, newPkName, oldDefaultName, newDefaultName, oldTableColumn, primaryColumns, pkName, columnNames, column, pkName, columnNames, primaryColumn, column, pkName, columnNames, uniqueConstraint, uniqueConstraint, defaultName, defaultName;
1074
1074
  var _this = this;
1075
- return tslib_1.__generator(this, function (_b) {
1075
+ return (0, tslib_1.__generator)(this, function (_b) {
1076
1076
  switch (_b.label) {
1077
1077
  case 0:
1078
1078
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1290,14 +1290,14 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1290
1290
  * Changes a column in the table.
1291
1291
  */
1292
1292
  SqlServerQueryRunner.prototype.changeColumns = function (tableOrName, changedColumns) {
1293
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1293
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1294
1294
  var changedColumns_1, changedColumns_1_1, _a, oldColumn, newColumn, e_2_1;
1295
1295
  var e_2, _b;
1296
- return tslib_1.__generator(this, function (_c) {
1296
+ return (0, tslib_1.__generator)(this, function (_c) {
1297
1297
  switch (_c.label) {
1298
1298
  case 0:
1299
1299
  _c.trys.push([0, 5, 6, 7]);
1300
- changedColumns_1 = tslib_1.__values(changedColumns), changedColumns_1_1 = changedColumns_1.next();
1300
+ changedColumns_1 = (0, tslib_1.__values)(changedColumns), changedColumns_1_1 = changedColumns_1.next();
1301
1301
  _c.label = 1;
1302
1302
  case 1:
1303
1303
  if (!!changedColumns_1_1.done) return [3 /*break*/, 4];
@@ -1329,9 +1329,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1329
1329
  * Drops column in the table.
1330
1330
  */
1331
1331
  SqlServerQueryRunner.prototype.dropColumn = function (tableOrName, columnOrName) {
1332
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1332
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1333
1333
  var table, _a, column, clonedTable, upQueries, downQueries, pkName, columnNames, tableColumn, pkName_2, columnNames_2, columnIndex, columnCheck, columnUnique, defaultName;
1334
- return tslib_1.__generator(this, function (_b) {
1334
+ return (0, tslib_1.__generator)(this, function (_b) {
1335
1335
  switch (_b.label) {
1336
1336
  case 0:
1337
1337
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1405,14 +1405,14 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1405
1405
  * Drops the columns in the table.
1406
1406
  */
1407
1407
  SqlServerQueryRunner.prototype.dropColumns = function (tableOrName, columns) {
1408
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1408
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1409
1409
  var columns_2, columns_2_1, column, e_3_1;
1410
1410
  var e_3, _a;
1411
- return tslib_1.__generator(this, function (_b) {
1411
+ return (0, tslib_1.__generator)(this, function (_b) {
1412
1412
  switch (_b.label) {
1413
1413
  case 0:
1414
1414
  _b.trys.push([0, 5, 6, 7]);
1415
- columns_2 = tslib_1.__values(columns), columns_2_1 = columns_2.next();
1415
+ columns_2 = (0, tslib_1.__values)(columns), columns_2_1 = columns_2.next();
1416
1416
  _b.label = 1;
1417
1417
  case 1:
1418
1418
  if (!!columns_2_1.done) return [3 /*break*/, 4];
@@ -1444,9 +1444,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1444
1444
  * Creates a new primary key.
1445
1445
  */
1446
1446
  SqlServerQueryRunner.prototype.createPrimaryKey = function (tableOrName, columnNames) {
1447
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1447
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1448
1448
  var table, _a, clonedTable, up, down;
1449
- return tslib_1.__generator(this, function (_b) {
1449
+ return (0, tslib_1.__generator)(this, function (_b) {
1450
1450
  switch (_b.label) {
1451
1451
  case 0:
1452
1452
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1479,9 +1479,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1479
1479
  * Updates composite primary keys.
1480
1480
  */
1481
1481
  SqlServerQueryRunner.prototype.updatePrimaryKeys = function (tableOrName, columns) {
1482
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1482
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1483
1483
  var table, _a, clonedTable, columnNames, upQueries, downQueries, primaryColumns, pkName_3, columnNamesString_1, pkName, columnNamesString;
1484
- return tslib_1.__generator(this, function (_b) {
1484
+ return (0, tslib_1.__generator)(this, function (_b) {
1485
1485
  switch (_b.label) {
1486
1486
  case 0:
1487
1487
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1525,9 +1525,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1525
1525
  * Drops a primary key.
1526
1526
  */
1527
1527
  SqlServerQueryRunner.prototype.dropPrimaryKey = function (tableOrName) {
1528
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1528
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1529
1529
  var table, _a, up, down;
1530
- return tslib_1.__generator(this, function (_b) {
1530
+ return (0, tslib_1.__generator)(this, function (_b) {
1531
1531
  switch (_b.label) {
1532
1532
  case 0:
1533
1533
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1556,9 +1556,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1556
1556
  * Creates a new unique constraint.
1557
1557
  */
1558
1558
  SqlServerQueryRunner.prototype.createUniqueConstraint = function (tableOrName, uniqueConstraint) {
1559
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1559
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1560
1560
  var table, _a, up, down;
1561
- return tslib_1.__generator(this, function (_b) {
1561
+ return (0, tslib_1.__generator)(this, function (_b) {
1562
1562
  switch (_b.label) {
1563
1563
  case 0:
1564
1564
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1588,10 +1588,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1588
1588
  * Creates a new unique constraints.
1589
1589
  */
1590
1590
  SqlServerQueryRunner.prototype.createUniqueConstraints = function (tableOrName, uniqueConstraints) {
1591
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1591
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1592
1592
  var promises;
1593
1593
  var _this = this;
1594
- return tslib_1.__generator(this, function (_a) {
1594
+ return (0, tslib_1.__generator)(this, function (_a) {
1595
1595
  switch (_a.label) {
1596
1596
  case 0:
1597
1597
  promises = uniqueConstraints.map(function (uniqueConstraint) { return _this.createUniqueConstraint(tableOrName, uniqueConstraint); });
@@ -1607,9 +1607,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1607
1607
  * Drops unique constraint.
1608
1608
  */
1609
1609
  SqlServerQueryRunner.prototype.dropUniqueConstraint = function (tableOrName, uniqueOrName) {
1610
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1610
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1611
1611
  var table, _a, uniqueConstraint, up, down;
1612
- return tslib_1.__generator(this, function (_b) {
1612
+ return (0, tslib_1.__generator)(this, function (_b) {
1613
1613
  switch (_b.label) {
1614
1614
  case 0:
1615
1615
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1639,10 +1639,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1639
1639
  * Drops an unique constraints.
1640
1640
  */
1641
1641
  SqlServerQueryRunner.prototype.dropUniqueConstraints = function (tableOrName, uniqueConstraints) {
1642
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1642
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1643
1643
  var promises;
1644
1644
  var _this = this;
1645
- return tslib_1.__generator(this, function (_a) {
1645
+ return (0, tslib_1.__generator)(this, function (_a) {
1646
1646
  switch (_a.label) {
1647
1647
  case 0:
1648
1648
  promises = uniqueConstraints.map(function (uniqueConstraint) { return _this.dropUniqueConstraint(tableOrName, uniqueConstraint); });
@@ -1658,9 +1658,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1658
1658
  * Creates a new check constraint.
1659
1659
  */
1660
1660
  SqlServerQueryRunner.prototype.createCheckConstraint = function (tableOrName, checkConstraint) {
1661
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1661
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1662
1662
  var table, _a, up, down;
1663
- return tslib_1.__generator(this, function (_b) {
1663
+ return (0, tslib_1.__generator)(this, function (_b) {
1664
1664
  switch (_b.label) {
1665
1665
  case 0:
1666
1666
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1690,10 +1690,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1690
1690
  * Creates a new check constraints.
1691
1691
  */
1692
1692
  SqlServerQueryRunner.prototype.createCheckConstraints = function (tableOrName, checkConstraints) {
1693
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1693
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1694
1694
  var promises;
1695
1695
  var _this = this;
1696
- return tslib_1.__generator(this, function (_a) {
1696
+ return (0, tslib_1.__generator)(this, function (_a) {
1697
1697
  switch (_a.label) {
1698
1698
  case 0:
1699
1699
  promises = checkConstraints.map(function (checkConstraint) { return _this.createCheckConstraint(tableOrName, checkConstraint); });
@@ -1709,9 +1709,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1709
1709
  * Drops check constraint.
1710
1710
  */
1711
1711
  SqlServerQueryRunner.prototype.dropCheckConstraint = function (tableOrName, checkOrName) {
1712
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1712
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1713
1713
  var table, _a, checkConstraint, up, down;
1714
- return tslib_1.__generator(this, function (_b) {
1714
+ return (0, tslib_1.__generator)(this, function (_b) {
1715
1715
  switch (_b.label) {
1716
1716
  case 0:
1717
1717
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1741,10 +1741,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1741
1741
  * Drops check constraints.
1742
1742
  */
1743
1743
  SqlServerQueryRunner.prototype.dropCheckConstraints = function (tableOrName, checkConstraints) {
1744
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1744
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1745
1745
  var promises;
1746
1746
  var _this = this;
1747
- return tslib_1.__generator(this, function (_a) {
1747
+ return (0, tslib_1.__generator)(this, function (_a) {
1748
1748
  switch (_a.label) {
1749
1749
  case 0:
1750
1750
  promises = checkConstraints.map(function (checkConstraint) { return _this.dropCheckConstraint(tableOrName, checkConstraint); });
@@ -1760,8 +1760,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1760
1760
  * Creates a new exclusion constraint.
1761
1761
  */
1762
1762
  SqlServerQueryRunner.prototype.createExclusionConstraint = function (tableOrName, exclusionConstraint) {
1763
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1764
- return tslib_1.__generator(this, function (_a) {
1763
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1764
+ return (0, tslib_1.__generator)(this, function (_a) {
1765
1765
  throw new error_1.TypeORMError("SqlServer does not support exclusion constraints.");
1766
1766
  });
1767
1767
  });
@@ -1770,8 +1770,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1770
1770
  * Creates a new exclusion constraints.
1771
1771
  */
1772
1772
  SqlServerQueryRunner.prototype.createExclusionConstraints = function (tableOrName, exclusionConstraints) {
1773
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1774
- return tslib_1.__generator(this, function (_a) {
1773
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1774
+ return (0, tslib_1.__generator)(this, function (_a) {
1775
1775
  throw new error_1.TypeORMError("SqlServer does not support exclusion constraints.");
1776
1776
  });
1777
1777
  });
@@ -1780,8 +1780,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1780
1780
  * Drops exclusion constraint.
1781
1781
  */
1782
1782
  SqlServerQueryRunner.prototype.dropExclusionConstraint = function (tableOrName, exclusionOrName) {
1783
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1784
- return tslib_1.__generator(this, function (_a) {
1783
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1784
+ return (0, tslib_1.__generator)(this, function (_a) {
1785
1785
  throw new error_1.TypeORMError("SqlServer does not support exclusion constraints.");
1786
1786
  });
1787
1787
  });
@@ -1790,8 +1790,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1790
1790
  * Drops exclusion constraints.
1791
1791
  */
1792
1792
  SqlServerQueryRunner.prototype.dropExclusionConstraints = function (tableOrName, exclusionConstraints) {
1793
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1794
- return tslib_1.__generator(this, function (_a) {
1793
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1794
+ return (0, tslib_1.__generator)(this, function (_a) {
1795
1795
  throw new error_1.TypeORMError("SqlServer does not support exclusion constraints.");
1796
1796
  });
1797
1797
  });
@@ -1800,9 +1800,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1800
1800
  * Creates a new foreign key.
1801
1801
  */
1802
1802
  SqlServerQueryRunner.prototype.createForeignKey = function (tableOrName, foreignKey) {
1803
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1803
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1804
1804
  var table, _a, metadata, up, down;
1805
- return tslib_1.__generator(this, function (_b) {
1805
+ return (0, tslib_1.__generator)(this, function (_b) {
1806
1806
  switch (_b.label) {
1807
1807
  case 0:
1808
1808
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1835,10 +1835,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1835
1835
  * Creates a new foreign keys.
1836
1836
  */
1837
1837
  SqlServerQueryRunner.prototype.createForeignKeys = function (tableOrName, foreignKeys) {
1838
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1838
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1839
1839
  var promises;
1840
1840
  var _this = this;
1841
- return tslib_1.__generator(this, function (_a) {
1841
+ return (0, tslib_1.__generator)(this, function (_a) {
1842
1842
  switch (_a.label) {
1843
1843
  case 0:
1844
1844
  promises = foreignKeys.map(function (foreignKey) { return _this.createForeignKey(tableOrName, foreignKey); });
@@ -1854,9 +1854,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1854
1854
  * Drops a foreign key from the table.
1855
1855
  */
1856
1856
  SqlServerQueryRunner.prototype.dropForeignKey = function (tableOrName, foreignKeyOrName) {
1857
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1857
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1858
1858
  var table, _a, foreignKey, up, down;
1859
- return tslib_1.__generator(this, function (_b) {
1859
+ return (0, tslib_1.__generator)(this, function (_b) {
1860
1860
  switch (_b.label) {
1861
1861
  case 0:
1862
1862
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1886,10 +1886,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1886
1886
  * Drops a foreign keys from the table.
1887
1887
  */
1888
1888
  SqlServerQueryRunner.prototype.dropForeignKeys = function (tableOrName, foreignKeys) {
1889
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1889
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1890
1890
  var promises;
1891
1891
  var _this = this;
1892
- return tslib_1.__generator(this, function (_a) {
1892
+ return (0, tslib_1.__generator)(this, function (_a) {
1893
1893
  switch (_a.label) {
1894
1894
  case 0:
1895
1895
  promises = foreignKeys.map(function (foreignKey) { return _this.dropForeignKey(tableOrName, foreignKey); });
@@ -1905,9 +1905,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1905
1905
  * Creates a new index.
1906
1906
  */
1907
1907
  SqlServerQueryRunner.prototype.createIndex = function (tableOrName, index) {
1908
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1908
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1909
1909
  var table, _a, up, down;
1910
- return tslib_1.__generator(this, function (_b) {
1910
+ return (0, tslib_1.__generator)(this, function (_b) {
1911
1911
  switch (_b.label) {
1912
1912
  case 0:
1913
1913
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1937,10 +1937,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1937
1937
  * Creates a new indices
1938
1938
  */
1939
1939
  SqlServerQueryRunner.prototype.createIndices = function (tableOrName, indices) {
1940
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1940
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1941
1941
  var promises;
1942
1942
  var _this = this;
1943
- return tslib_1.__generator(this, function (_a) {
1943
+ return (0, tslib_1.__generator)(this, function (_a) {
1944
1944
  switch (_a.label) {
1945
1945
  case 0:
1946
1946
  promises = indices.map(function (index) { return _this.createIndex(tableOrName, index); });
@@ -1956,9 +1956,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1956
1956
  * Drops an index.
1957
1957
  */
1958
1958
  SqlServerQueryRunner.prototype.dropIndex = function (tableOrName, indexOrName) {
1959
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1959
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1960
1960
  var table, _a, index, up, down;
1961
- return tslib_1.__generator(this, function (_b) {
1961
+ return (0, tslib_1.__generator)(this, function (_b) {
1962
1962
  switch (_b.label) {
1963
1963
  case 0:
1964
1964
  if (!(tableOrName instanceof Table_1.Table)) return [3 /*break*/, 1];
@@ -1988,10 +1988,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
1988
1988
  * Drops an indices from the table.
1989
1989
  */
1990
1990
  SqlServerQueryRunner.prototype.dropIndices = function (tableOrName, indices) {
1991
- return tslib_1.__awaiter(this, void 0, void 0, function () {
1991
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
1992
1992
  var promises;
1993
1993
  var _this = this;
1994
- return tslib_1.__generator(this, function (_a) {
1994
+ return (0, tslib_1.__generator)(this, function (_a) {
1995
1995
  switch (_a.label) {
1996
1996
  case 0:
1997
1997
  promises = indices.map(function (index) { return _this.dropIndex(tableOrName, index); });
@@ -2008,8 +2008,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2008
2008
  * Note: this operation uses SQL's TRUNCATE query which cannot be reverted in transactions.
2009
2009
  */
2010
2010
  SqlServerQueryRunner.prototype.clearTable = function (tablePath) {
2011
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2012
- return tslib_1.__generator(this, function (_a) {
2011
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2012
+ return (0, tslib_1.__generator)(this, function (_a) {
2013
2013
  switch (_a.label) {
2014
2014
  case 0: return [4 /*yield*/, this.query("TRUNCATE TABLE " + this.escapePath(tablePath))];
2015
2015
  case 1:
@@ -2023,10 +2023,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2023
2023
  * Removes all tables from the currently connected database.
2024
2024
  */
2025
2025
  SqlServerQueryRunner.prototype.clearDatabase = function (database) {
2026
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2026
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2027
2027
  var isDatabaseExist, allViewsSql, allViewsResults, allTablesSql, allTablesResults, tablesByCatalog, foreignKeysSql, foreignKeys, error_2, rollbackError_1;
2028
2028
  var _this = this;
2029
- return tslib_1.__generator(this, function (_a) {
2029
+ return (0, tslib_1.__generator)(this, function (_a) {
2030
2030
  switch (_a.label) {
2031
2031
  case 0:
2032
2032
  if (!database) return [3 /*break*/, 2];
@@ -2069,7 +2069,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2069
2069
  return c;
2070
2070
  }, {});
2071
2071
  foreignKeysSql = Object.entries(tablesByCatalog).map(function (_a) {
2072
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2072
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2073
2073
  var conditions = tables.map(function (_a) {
2074
2074
  var TABLE_SCHEMA = _a.TABLE_SCHEMA, TABLE_NAME = _a.TABLE_NAME;
2075
2075
  return "(\"fk\".\"referenced_object_id\" = OBJECT_ID('\"" + TABLE_CATALOG + "\".\"" + TABLE_SCHEMA + "\".\"" + TABLE_NAME + "\"'))";
@@ -2081,8 +2081,8 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2081
2081
  foreignKeys = _a.sent();
2082
2082
  return [4 /*yield*/, Promise.all(foreignKeys.map(function (_a) {
2083
2083
  var TABLE_CATALOG = _a.TABLE_CATALOG, TABLE_SCHEMA = _a.TABLE_SCHEMA, TABLE_NAME = _a.TABLE_NAME, CONSTRAINT_NAME = _a.CONSTRAINT_NAME;
2084
- return tslib_1.__awaiter(_this, void 0, void 0, function () {
2085
- return tslib_1.__generator(this, function (_b) {
2084
+ return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
2085
+ return (0, tslib_1.__generator)(this, function (_b) {
2086
2086
  switch (_b.label) {
2087
2087
  case 0:
2088
2088
  // Disable the constraint first.
@@ -2139,10 +2139,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2139
2139
  // Protected Methods
2140
2140
  // -------------------------------------------------------------------------
2141
2141
  SqlServerQueryRunner.prototype.loadViews = function (viewPaths) {
2142
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2142
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2143
2143
  var hasTable, currentSchema, currentDatabase, dbNames, viewsCondition, query, dbViews;
2144
2144
  var _this = this;
2145
- return tslib_1.__generator(this, function (_a) {
2145
+ return (0, tslib_1.__generator)(this, function (_a) {
2146
2146
  switch (_a.label) {
2147
2147
  case 0: return [4 /*yield*/, this.hasTable(this.getTypeormMetadataTableName())];
2148
2148
  case 1:
@@ -2196,10 +2196,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2196
2196
  * Loads all tables (with given names) from the database and creates a Table from them.
2197
2197
  */
2198
2198
  SqlServerQueryRunner.prototype.loadTables = function (tableNames) {
2199
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2199
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2200
2200
  var currentSchema, currentDatabase, dbTables, databasesSql, dbDatabases, tablesSql, _a, _b, _c, _d, tableNamesByCatalog, tablesSql, _e, _f, _g, _h, dbTablesByCatalog, columnsSql, constraintsSql, foreignKeysSql, identityColumnsSql, dbCollationsSql, indicesSql, _j, dbColumns, dbConstraints, dbForeignKeys, dbIdentityColumns, dbCollations, dbIndices;
2201
2201
  var _this = this;
2202
- return tslib_1.__generator(this, function (_k) {
2202
+ return (0, tslib_1.__generator)(this, function (_k) {
2203
2203
  switch (_k.label) {
2204
2204
  case 0:
2205
2205
  // if no tables given then no need to proceed
@@ -2227,13 +2227,13 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2227
2227
  _d = [[]];
2228
2228
  return [4 /*yield*/, this.query(tablesSql)];
2229
2229
  case 4:
2230
- _b.apply(_a, _c.concat([tslib_1.__spreadArray.apply(void 0, _d.concat([tslib_1.__read.apply(void 0, [_k.sent()])]))]));
2230
+ _b.apply(_a, _c.concat([tslib_1.__spreadArray.apply(void 0, _d.concat([tslib_1.__read.apply(void 0, [_k.sent()]), false]))]));
2231
2231
  return [3 /*break*/, 7];
2232
2232
  case 5:
2233
2233
  tableNamesByCatalog = tableNames
2234
2234
  .map(function (tableName) { return _this.driver.parseTableName(tableName); })
2235
2235
  .reduce(function (c, _a) {
2236
- var database = _a.database, other = tslib_1.__rest(_a, ["database"]);
2236
+ var database = _a.database, other = (0, tslib_1.__rest)(_a, ["database"]);
2237
2237
  database = database || currentDatabase;
2238
2238
  c[database] = c[database] || [];
2239
2239
  c[database].push({
@@ -2243,7 +2243,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2243
2243
  return c;
2244
2244
  }, {});
2245
2245
  tablesSql = Object.entries(tableNamesByCatalog).map(function (_a) {
2246
- var _b = tslib_1.__read(_a, 2), database = _b[0], tables = _b[1];
2246
+ var _b = (0, tslib_1.__read)(_a, 2), database = _b[0], tables = _b[1];
2247
2247
  var tablesCondition = tables
2248
2248
  .map(function (_a) {
2249
2249
  var schema = _a.schema, tableName = _a.tableName;
@@ -2257,7 +2257,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2257
2257
  _h = [[]];
2258
2258
  return [4 /*yield*/, this.query(tablesSql)];
2259
2259
  case 6:
2260
- _f.apply(_e, _g.concat([tslib_1.__spreadArray.apply(void 0, _h.concat([tslib_1.__read.apply(void 0, [_k.sent()])]))]));
2260
+ _f.apply(_e, _g.concat([tslib_1.__spreadArray.apply(void 0, _h.concat([tslib_1.__read.apply(void 0, [_k.sent()]), false]))]));
2261
2261
  _k.label = 7;
2262
2262
  case 7:
2263
2263
  // if tables were not found in the db, no need to proceed
@@ -2265,13 +2265,13 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2265
2265
  return [2 /*return*/, []];
2266
2266
  }
2267
2267
  dbTablesByCatalog = dbTables.reduce(function (c, _a) {
2268
- var TABLE_CATALOG = _a.TABLE_CATALOG, other = tslib_1.__rest(_a, ["TABLE_CATALOG"]);
2268
+ var TABLE_CATALOG = _a.TABLE_CATALOG, other = (0, tslib_1.__rest)(_a, ["TABLE_CATALOG"]);
2269
2269
  c[TABLE_CATALOG] = c[TABLE_CATALOG] || [];
2270
2270
  c[TABLE_CATALOG].push(other);
2271
2271
  return c;
2272
2272
  }, {});
2273
2273
  columnsSql = Object.entries(dbTablesByCatalog).map(function (_a) {
2274
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2274
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2275
2275
  var condition = tables.map(function (_a) {
2276
2276
  var TABLE_SCHEMA = _a.TABLE_SCHEMA, TABLE_NAME = _a.TABLE_NAME;
2277
2277
  return "(\"TABLE_SCHEMA\" = '" + TABLE_SCHEMA + "' AND \"TABLE_NAME\" = '" + TABLE_NAME + "')";
@@ -2279,7 +2279,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2279
2279
  return "SELECT * FROM \"" + TABLE_CATALOG + "\".\"INFORMATION_SCHEMA\".\"COLUMNS\" WHERE (" + condition + ")";
2280
2280
  }).join(" UNION ALL ");
2281
2281
  constraintsSql = Object.entries(dbTablesByCatalog).map(function (_a) {
2282
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2282
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2283
2283
  var conditions = tables.map(function (_a) {
2284
2284
  var TABLE_NAME = _a.TABLE_NAME, TABLE_SCHEMA = _a.TABLE_SCHEMA;
2285
2285
  return "(\"columnUsages\".\"TABLE_SCHEMA\" = '" + TABLE_SCHEMA + "' AND \"columnUsages\".\"TABLE_NAME\" = '" + TABLE_NAME + "')";
@@ -2299,7 +2299,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2299
2299
  "\"tableConstraints\".\"CONSTRAINT_TYPE\" IN ('PRIMARY KEY', 'UNIQUE', 'CHECK')";
2300
2300
  }).join(" UNION ALL ");
2301
2301
  foreignKeysSql = Object.entries(dbTablesByCatalog).map(function (_a) {
2302
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2302
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2303
2303
  var conditions = tables.map(function (_a) {
2304
2304
  var TABLE_NAME = _a.TABLE_NAME, TABLE_SCHEMA = _a.TABLE_SCHEMA;
2305
2305
  return "(\"s1\".\"name\" = '" + TABLE_SCHEMA + "' AND \"t1\".\"name\" = '" + TABLE_NAME + "')";
@@ -2318,7 +2318,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2318
2318
  ("WHERE (" + conditions + ")");
2319
2319
  }).join(" UNION ALL ");
2320
2320
  identityColumnsSql = Object.entries(dbTablesByCatalog).map(function (_a) {
2321
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2321
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2322
2322
  var conditions = tables.map(function (_a) {
2323
2323
  var TABLE_NAME = _a.TABLE_NAME, TABLE_SCHEMA = _a.TABLE_SCHEMA;
2324
2324
  return "(\"TABLE_SCHEMA\" = '" + TABLE_SCHEMA + "' AND \"TABLE_NAME\" = '" + TABLE_NAME + "')";
@@ -2331,7 +2331,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2331
2331
  }).join(" UNION ALL ");
2332
2332
  dbCollationsSql = "SELECT \"NAME\", \"COLLATION_NAME\" FROM \"sys\".\"databases\"";
2333
2333
  indicesSql = Object.entries(dbTablesByCatalog).map(function (_a) {
2334
- var _b = tslib_1.__read(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2334
+ var _b = (0, tslib_1.__read)(_a, 2), TABLE_CATALOG = _b[0], tables = _b[1];
2335
2335
  var conditions = tables.map(function (_a) {
2336
2336
  var TABLE_NAME = _a.TABLE_NAME, TABLE_SCHEMA = _a.TABLE_SCHEMA;
2337
2337
  return "(\"s\".\"name\" = '" + TABLE_SCHEMA + "' AND \"t\".\"name\" = '" + TABLE_NAME + "')";
@@ -2357,10 +2357,10 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2357
2357
  ])];
2358
2358
  case 8:
2359
2359
  _j = tslib_1.__read.apply(void 0, [_k.sent(), 6]), dbColumns = _j[0], dbConstraints = _j[1], dbForeignKeys = _j[2], dbIdentityColumns = _j[3], dbCollations = _j[4], dbIndices = _j[5];
2360
- return [4 /*yield*/, Promise.all(dbTables.map(function (dbTable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
2360
+ return [4 /*yield*/, Promise.all(dbTables.map(function (dbTable) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
2361
2361
  var table, getSchemaFromKey, db, schema, defaultCollation, tableUniqueConstraints, tableCheckConstraints, tableForeignKeyConstraints, tableIndexConstraints;
2362
2362
  var _this = this;
2363
- return tslib_1.__generator(this, function (_a) {
2363
+ return (0, tslib_1.__generator)(this, function (_a) {
2364
2364
  table = new Table_1.Table();
2365
2365
  getSchemaFromKey = function (dbObject, key) {
2366
2366
  return dbObject[key] === currentSchema && (!_this.driver.options.schema || _this.driver.options.schema === currentSchema)
@@ -2422,7 +2422,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2422
2422
  if (columnCheckConstraints.length) {
2423
2423
  try {
2424
2424
  // const isEnumRegexp = new RegExp("^\\(\\[" + tableColumn.name + "\\]='[^']+'(?: OR \\[" + tableColumn.name + "\\]='[^']+')*\\)$");
2425
- for (var columnCheckConstraints_1 = tslib_1.__values(columnCheckConstraints), columnCheckConstraints_1_1 = columnCheckConstraints_1.next(); !columnCheckConstraints_1_1.done; columnCheckConstraints_1_1 = columnCheckConstraints_1.next()) {
2425
+ for (var columnCheckConstraints_1 = (0, tslib_1.__values)(columnCheckConstraints), columnCheckConstraints_1_1 = columnCheckConstraints_1.next(); !columnCheckConstraints_1_1.done; columnCheckConstraints_1_1 = columnCheckConstraints_1.next()) {
2426
2426
  var checkConstraint = columnCheckConstraints_1_1.value;
2427
2427
  if (_this.isEnumCheckConstraint(checkConstraint["CONSTRAINT_NAME"])) {
2428
2428
  // This is an enum constraint, make column into an enum
@@ -2617,9 +2617,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2617
2617
  }
2618
2618
  };
2619
2619
  SqlServerQueryRunner.prototype.insertViewDefinitionSql = function (view) {
2620
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2620
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2621
2621
  var parsedTableName, _a, expression, _b, query, parameters;
2622
- return tslib_1.__generator(this, function (_c) {
2622
+ return (0, tslib_1.__generator)(this, function (_c) {
2623
2623
  switch (_c.label) {
2624
2624
  case 0:
2625
2625
  parsedTableName = this.driver.parseTableName(view);
@@ -2631,7 +2631,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2631
2631
  _c.label = 2;
2632
2632
  case 2:
2633
2633
  expression = typeof view.expression === "string" ? view.expression.trim() : view.expression(this.connection).getQuery();
2634
- _b = tslib_1.__read(this.connection.createQueryBuilder()
2634
+ _b = (0, tslib_1.__read)(this.connection.createQueryBuilder()
2635
2635
  .insert()
2636
2636
  .into(this.getTypeormMetadataTableName())
2637
2637
  .values({ type: "VIEW", database: parsedTableName.database, schema: parsedTableName.schema, name: parsedTableName.tableName, value: expression })
@@ -2651,9 +2651,9 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2651
2651
  * Builds remove view sql.
2652
2652
  */
2653
2653
  SqlServerQueryRunner.prototype.deleteViewDefinitionSql = function (viewOrPath) {
2654
- return tslib_1.__awaiter(this, void 0, void 0, function () {
2654
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
2655
2655
  var parsedTableName, _a, qb, _b, query, parameters;
2656
- return tslib_1.__generator(this, function (_c) {
2656
+ return (0, tslib_1.__generator)(this, function (_c) {
2657
2657
  switch (_c.label) {
2658
2658
  case 0:
2659
2659
  parsedTableName = this.driver.parseTableName(viewOrPath);
@@ -2665,7 +2665,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2665
2665
  _c.label = 2;
2666
2666
  case 2:
2667
2667
  qb = this.connection.createQueryBuilder();
2668
- _b = tslib_1.__read(qb.delete()
2668
+ _b = (0, tslib_1.__read)(qb.delete()
2669
2669
  .from(this.getTypeormMetadataTableName())
2670
2670
  .where(qb.escape("type") + " = 'VIEW'")
2671
2671
  .andWhere(qb.escape("database") + " = :database", { database: parsedTableName.database })
@@ -2838,7 +2838,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2838
2838
  case "bigint":
2839
2839
  return this.driver.mssql.BigInt;
2840
2840
  case "decimal":
2841
- return (_a = this.driver.mssql).Decimal.apply(_a, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2841
+ return (_a = this.driver.mssql).Decimal.apply(_a, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2842
2842
  case "float":
2843
2843
  return this.driver.mssql.Float;
2844
2844
  case "int":
@@ -2846,7 +2846,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2846
2846
  case "money":
2847
2847
  return this.driver.mssql.Money;
2848
2848
  case "numeric":
2849
- return (_b = this.driver.mssql).Numeric.apply(_b, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2849
+ return (_b = this.driver.mssql).Numeric.apply(_b, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2850
2850
  case "smallint":
2851
2851
  return this.driver.mssql.SmallInt;
2852
2852
  case "smallmoney":
@@ -2857,25 +2857,25 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2857
2857
  return this.driver.mssql.TinyInt;
2858
2858
  case "char":
2859
2859
  case "nchar":
2860
- return (_c = this.driver.mssql).NChar.apply(_c, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2860
+ return (_c = this.driver.mssql).NChar.apply(_c, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2861
2861
  case "text":
2862
2862
  case "ntext":
2863
2863
  return this.driver.mssql.Ntext;
2864
2864
  case "varchar":
2865
2865
  case "nvarchar":
2866
- return (_d = this.driver.mssql).NVarChar.apply(_d, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2866
+ return (_d = this.driver.mssql).NVarChar.apply(_d, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2867
2867
  case "xml":
2868
2868
  return this.driver.mssql.Xml;
2869
2869
  case "time":
2870
- return (_e = this.driver.mssql).Time.apply(_e, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2870
+ return (_e = this.driver.mssql).Time.apply(_e, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2871
2871
  case "date":
2872
2872
  return this.driver.mssql.Date;
2873
2873
  case "datetime":
2874
2874
  return this.driver.mssql.DateTime;
2875
2875
  case "datetime2":
2876
- return (_f = this.driver.mssql).DateTime2.apply(_f, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2876
+ return (_f = this.driver.mssql).DateTime2.apply(_f, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2877
2877
  case "datetimeoffset":
2878
- return (_g = this.driver.mssql).DateTimeOffset.apply(_g, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2878
+ return (_g = this.driver.mssql).DateTimeOffset.apply(_g, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2879
2879
  case "smalldatetime":
2880
2880
  return this.driver.mssql.SmallDateTime;
2881
2881
  case "uniqueidentifier":
@@ -2885,7 +2885,7 @@ var SqlServerQueryRunner = /** @class */ (function (_super) {
2885
2885
  case "binary":
2886
2886
  return this.driver.mssql.Binary;
2887
2887
  case "varbinary":
2888
- return (_h = this.driver.mssql).VarBinary.apply(_h, tslib_1.__spreadArray([], tslib_1.__read(parameter.params)));
2888
+ return (_h = this.driver.mssql).VarBinary.apply(_h, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(parameter.params), false));
2889
2889
  case "image":
2890
2890
  return this.driver.mssql.Image;
2891
2891
  case "udt":