typeorm 0.3.21-dev.755191e → 0.3.21-dev.7bea198

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 (297) hide show
  1. package/README.md +3 -10
  2. package/browser/cache/QueryResultCache.d.ts +4 -2
  3. package/browser/cache/QueryResultCache.js.map +1 -1
  4. package/browser/connection/ConnectionOptionsReader.d.ts +4 -4
  5. package/browser/data-source/DataSource.d.ts +2 -0
  6. package/browser/data-source/DataSource.js +2 -0
  7. package/browser/data-source/DataSource.js.map +1 -1
  8. package/browser/decorator/relations/OneToOne.d.ts +4 -4
  9. package/browser/decorator/relations/OneToOne.js +2 -2
  10. package/browser/decorator/relations/OneToOne.js.map +1 -1
  11. package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
  12. package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
  13. package/browser/driver/aurora-mysql/AuroraMysqlQueryRunner.d.ts +0 -1
  14. package/browser/driver/better-sqlite3/BetterSqlite3Driver.js +2 -2
  15. package/browser/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
  16. package/browser/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
  17. package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -2
  18. package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
  19. package/browser/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
  20. package/browser/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
  21. package/browser/driver/cockroachdb/CockroachQueryRunner.d.ts +0 -1
  22. package/browser/driver/cockroachdb/CockroachQueryRunner.js +5 -3
  23. package/browser/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
  24. package/browser/driver/mongodb/MongoConnectionOptions.d.ts +1 -2
  25. package/browser/driver/mongodb/MongoConnectionOptions.js.map +1 -1
  26. package/browser/driver/mongodb/MongoQueryRunner.d.ts +0 -1
  27. package/browser/driver/mongodb/typings.d.ts +0 -8
  28. package/browser/driver/mongodb/typings.js +0 -1
  29. package/browser/driver/mongodb/typings.js.map +1 -1
  30. package/browser/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
  31. package/browser/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
  32. package/browser/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
  33. package/browser/driver/mysql/MysqlConnectionOptions.js.map +1 -1
  34. package/browser/driver/mysql/MysqlQueryRunner.d.ts +0 -1
  35. package/browser/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
  36. package/browser/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
  37. package/browser/driver/oracle/OracleConnectionOptions.d.ts +1 -1
  38. package/browser/driver/oracle/OracleConnectionOptions.js.map +1 -1
  39. package/browser/driver/oracle/OracleQueryRunner.d.ts +0 -1
  40. package/browser/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -2
  41. package/browser/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
  42. package/browser/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
  43. package/browser/driver/postgres/PostgresConnectionOptions.js.map +1 -1
  44. package/browser/driver/postgres/PostgresQueryRunner.d.ts +0 -1
  45. package/browser/driver/sap/SapQueryRunner.d.ts +0 -1
  46. package/browser/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
  47. package/browser/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
  48. package/browser/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
  49. package/browser/driver/spanner/SpannerConnectionOptions.js.map +1 -1
  50. package/browser/driver/spanner/SpannerQueryRunner.d.ts +0 -1
  51. package/browser/driver/sqlite/SqliteDriver.js +2 -2
  52. package/browser/driver/sqlite/SqliteDriver.js.map +1 -1
  53. package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.d.ts +0 -1
  54. package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
  55. package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
  56. package/browser/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
  57. package/browser/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
  58. package/browser/driver/sqlserver/SqlServerQueryRunner.d.ts +0 -1
  59. package/browser/entity-manager/EntityManager.d.ts +2 -0
  60. package/browser/entity-manager/EntityManager.js +4 -2
  61. package/browser/entity-manager/EntityManager.js.map +1 -1
  62. package/browser/find-options/FindOptionsOrder.d.ts +0 -1
  63. package/browser/find-options/FindOptionsRelations.d.ts +0 -1
  64. package/browser/find-options/FindOptionsSelect.d.ts +0 -1
  65. package/browser/find-options/FindOptionsWhere.d.ts +0 -1
  66. package/browser/platform/PlatformTools.d.ts +0 -4
  67. package/browser/platform/PlatformTools.js +3 -9
  68. package/browser/platform/PlatformTools.js.map +1 -1
  69. package/browser/query-builder/SelectQueryBuilder.d.ts +0 -1
  70. package/browser/query-builder/transformer/RawSqlResultsToEntityTransformer.d.ts +9 -0
  71. package/browser/query-builder/transformer/RawSqlResultsToEntityTransformer.js +95 -61
  72. package/browser/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -1
  73. package/browser/query-runner/QueryRunner.d.ts +0 -1
  74. package/browser/repository/Repository.d.ts +2 -0
  75. package/browser/repository/Repository.js +2 -0
  76. package/browser/repository/Repository.js.map +1 -1
  77. package/browser/util/ImportUtils.js +22 -34
  78. package/browser/util/ImportUtils.js.map +1 -1
  79. package/cache/QueryResultCache.d.ts +4 -2
  80. package/cache/QueryResultCache.js.map +1 -1
  81. package/commands/CommandUtils.d.ts +1 -1
  82. package/commands/CommandUtils.js +18 -16
  83. package/commands/CommandUtils.js.map +1 -1
  84. package/commands/InitCommand.js +1 -1
  85. package/commands/InitCommand.js.map +1 -1
  86. package/connection/ConnectionOptionsReader.d.ts +4 -4
  87. package/container.js +2 -3
  88. package/container.js.map +1 -1
  89. package/data-source/DataSource.d.ts +2 -0
  90. package/data-source/DataSource.js +2 -0
  91. package/data-source/DataSource.js.map +1 -1
  92. package/decorator/Check.js +1 -2
  93. package/decorator/Check.js.map +1 -1
  94. package/decorator/EntityRepository.js +1 -2
  95. package/decorator/EntityRepository.js.map +1 -1
  96. package/decorator/Exclusion.js +1 -2
  97. package/decorator/Exclusion.js.map +1 -1
  98. package/decorator/Generated.js +1 -2
  99. package/decorator/Generated.js.map +1 -1
  100. package/decorator/Index.js +1 -2
  101. package/decorator/Index.js.map +1 -1
  102. package/decorator/Unique.js +1 -2
  103. package/decorator/Unique.js.map +1 -1
  104. package/decorator/columns/Column.js +1 -2
  105. package/decorator/columns/Column.js.map +1 -1
  106. package/decorator/columns/CreateDateColumn.js +1 -2
  107. package/decorator/columns/CreateDateColumn.js.map +1 -1
  108. package/decorator/columns/DeleteDateColumn.js +1 -2
  109. package/decorator/columns/DeleteDateColumn.js.map +1 -1
  110. package/decorator/columns/ObjectIdColumn.js +1 -2
  111. package/decorator/columns/ObjectIdColumn.js.map +1 -1
  112. package/decorator/columns/PrimaryColumn.js +1 -2
  113. package/decorator/columns/PrimaryColumn.js.map +1 -1
  114. package/decorator/columns/PrimaryGeneratedColumn.js +1 -2
  115. package/decorator/columns/PrimaryGeneratedColumn.js.map +1 -1
  116. package/decorator/columns/UpdateDateColumn.js +1 -2
  117. package/decorator/columns/UpdateDateColumn.js.map +1 -1
  118. package/decorator/columns/VersionColumn.js +1 -2
  119. package/decorator/columns/VersionColumn.js.map +1 -1
  120. package/decorator/columns/ViewColumn.js +1 -2
  121. package/decorator/columns/ViewColumn.js.map +1 -1
  122. package/decorator/columns/VirtualColumn.js +1 -2
  123. package/decorator/columns/VirtualColumn.js.map +1 -1
  124. package/decorator/entity/ChildEntity.js +1 -2
  125. package/decorator/entity/ChildEntity.js.map +1 -1
  126. package/decorator/entity/Entity.js +1 -2
  127. package/decorator/entity/Entity.js.map +1 -1
  128. package/decorator/entity/TableInheritance.js +1 -2
  129. package/decorator/entity/TableInheritance.js.map +1 -1
  130. package/decorator/entity-view/ViewEntity.js +1 -2
  131. package/decorator/entity-view/ViewEntity.js.map +1 -1
  132. package/decorator/listeners/AfterInsert.js +1 -2
  133. package/decorator/listeners/AfterInsert.js.map +1 -1
  134. package/decorator/listeners/AfterLoad.js +1 -2
  135. package/decorator/listeners/AfterLoad.js.map +1 -1
  136. package/decorator/listeners/AfterRecover.js +1 -2
  137. package/decorator/listeners/AfterRecover.js.map +1 -1
  138. package/decorator/listeners/AfterRemove.js +1 -2
  139. package/decorator/listeners/AfterRemove.js.map +1 -1
  140. package/decorator/listeners/AfterSoftRemove.js +1 -2
  141. package/decorator/listeners/AfterSoftRemove.js.map +1 -1
  142. package/decorator/listeners/AfterUpdate.js +1 -2
  143. package/decorator/listeners/AfterUpdate.js.map +1 -1
  144. package/decorator/listeners/BeforeInsert.js +1 -2
  145. package/decorator/listeners/BeforeInsert.js.map +1 -1
  146. package/decorator/listeners/BeforeRecover.js +1 -2
  147. package/decorator/listeners/BeforeRecover.js.map +1 -1
  148. package/decorator/listeners/BeforeRemove.js +1 -2
  149. package/decorator/listeners/BeforeRemove.js.map +1 -1
  150. package/decorator/listeners/BeforeSoftRemove.js +1 -2
  151. package/decorator/listeners/BeforeSoftRemove.js.map +1 -1
  152. package/decorator/listeners/BeforeUpdate.js +1 -2
  153. package/decorator/listeners/BeforeUpdate.js.map +1 -1
  154. package/decorator/listeners/EventSubscriber.js +1 -2
  155. package/decorator/listeners/EventSubscriber.js.map +1 -1
  156. package/decorator/relations/JoinColumn.js +1 -2
  157. package/decorator/relations/JoinColumn.js.map +1 -1
  158. package/decorator/relations/JoinTable.js +1 -2
  159. package/decorator/relations/JoinTable.js.map +1 -1
  160. package/decorator/relations/ManyToMany.js +1 -2
  161. package/decorator/relations/ManyToMany.js.map +1 -1
  162. package/decorator/relations/ManyToOne.js +1 -2
  163. package/decorator/relations/ManyToOne.js.map +1 -1
  164. package/decorator/relations/OneToMany.js +1 -2
  165. package/decorator/relations/OneToMany.js.map +1 -1
  166. package/decorator/relations/OneToOne.d.ts +4 -4
  167. package/decorator/relations/OneToOne.js +3 -4
  168. package/decorator/relations/OneToOne.js.map +1 -1
  169. package/decorator/relations/RelationCount.js +1 -2
  170. package/decorator/relations/RelationCount.js.map +1 -1
  171. package/decorator/relations/RelationId.js +1 -2
  172. package/decorator/relations/RelationId.js.map +1 -1
  173. package/decorator/tree/Tree.js +1 -2
  174. package/decorator/tree/Tree.js.map +1 -1
  175. package/decorator/tree/TreeChildren.js +1 -2
  176. package/decorator/tree/TreeChildren.js.map +1 -1
  177. package/decorator/tree/TreeLevelColumn.js +1 -2
  178. package/decorator/tree/TreeLevelColumn.js.map +1 -1
  179. package/decorator/tree/TreeParent.js +1 -2
  180. package/decorator/tree/TreeParent.js.map +1 -1
  181. package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
  182. package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
  183. package/driver/aurora-mysql/AuroraMysqlQueryRunner.d.ts +0 -1
  184. package/driver/better-sqlite3/BetterSqlite3Driver.js +2 -2
  185. package/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
  186. package/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
  187. package/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -2
  188. package/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
  189. package/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
  190. package/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
  191. package/driver/cockroachdb/CockroachQueryRunner.d.ts +0 -1
  192. package/driver/cockroachdb/CockroachQueryRunner.js +5 -3
  193. package/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
  194. package/driver/mongodb/MongoConnectionOptions.d.ts +1 -2
  195. package/driver/mongodb/MongoConnectionOptions.js.map +1 -1
  196. package/driver/mongodb/MongoQueryRunner.d.ts +0 -1
  197. package/driver/mongodb/typings.d.ts +0 -8
  198. package/driver/mongodb/typings.js +0 -1
  199. package/driver/mongodb/typings.js.map +1 -1
  200. package/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
  201. package/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
  202. package/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
  203. package/driver/mysql/MysqlConnectionOptions.js.map +1 -1
  204. package/driver/mysql/MysqlQueryRunner.d.ts +0 -1
  205. package/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
  206. package/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
  207. package/driver/oracle/OracleConnectionOptions.d.ts +1 -1
  208. package/driver/oracle/OracleConnectionOptions.js.map +1 -1
  209. package/driver/oracle/OracleQueryRunner.d.ts +0 -1
  210. package/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -2
  211. package/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
  212. package/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
  213. package/driver/postgres/PostgresConnectionOptions.js.map +1 -1
  214. package/driver/postgres/PostgresQueryRunner.d.ts +0 -1
  215. package/driver/sap/SapQueryRunner.d.ts +0 -1
  216. package/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
  217. package/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
  218. package/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
  219. package/driver/spanner/SpannerConnectionOptions.js.map +1 -1
  220. package/driver/spanner/SpannerQueryRunner.d.ts +0 -1
  221. package/driver/sqlite/SqliteDriver.js +2 -2
  222. package/driver/sqlite/SqliteDriver.js.map +1 -1
  223. package/driver/sqlite-abstract/AbstractSqliteQueryRunner.d.ts +0 -1
  224. package/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
  225. package/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
  226. package/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
  227. package/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
  228. package/driver/sqlserver/SqlServerQueryRunner.d.ts +0 -1
  229. package/entity-manager/EntityManager.d.ts +2 -0
  230. package/entity-manager/EntityManager.js +4 -2
  231. package/entity-manager/EntityManager.js.map +1 -1
  232. package/find-options/FindOptionsOrder.d.ts +0 -1
  233. package/find-options/FindOptionsRelations.d.ts +0 -1
  234. package/find-options/FindOptionsSelect.d.ts +0 -1
  235. package/find-options/FindOptionsWhere.d.ts +0 -1
  236. package/find-options/operator/And.js +1 -2
  237. package/find-options/operator/And.js.map +1 -1
  238. package/find-options/operator/Any.js +1 -2
  239. package/find-options/operator/Any.js.map +1 -1
  240. package/find-options/operator/ArrayContainedBy.js +1 -2
  241. package/find-options/operator/ArrayContainedBy.js.map +1 -1
  242. package/find-options/operator/ArrayContains.js +1 -2
  243. package/find-options/operator/ArrayContains.js.map +1 -1
  244. package/find-options/operator/ArrayOverlap.js +1 -2
  245. package/find-options/operator/ArrayOverlap.js.map +1 -1
  246. package/find-options/operator/Between.js +1 -2
  247. package/find-options/operator/Between.js.map +1 -1
  248. package/find-options/operator/Equal.js +1 -2
  249. package/find-options/operator/Equal.js.map +1 -1
  250. package/find-options/operator/ILike.js +1 -2
  251. package/find-options/operator/ILike.js.map +1 -1
  252. package/find-options/operator/In.js +1 -2
  253. package/find-options/operator/In.js.map +1 -1
  254. package/find-options/operator/IsNull.js +1 -2
  255. package/find-options/operator/IsNull.js.map +1 -1
  256. package/find-options/operator/JsonContains.js +1 -2
  257. package/find-options/operator/JsonContains.js.map +1 -1
  258. package/find-options/operator/LessThan.js +1 -2
  259. package/find-options/operator/LessThan.js.map +1 -1
  260. package/find-options/operator/LessThanOrEqual.js +1 -2
  261. package/find-options/operator/LessThanOrEqual.js.map +1 -1
  262. package/find-options/operator/Like.js +1 -2
  263. package/find-options/operator/Like.js.map +1 -1
  264. package/find-options/operator/MoreThan.js +1 -2
  265. package/find-options/operator/MoreThan.js.map +1 -1
  266. package/find-options/operator/MoreThanOrEqual.js +1 -2
  267. package/find-options/operator/MoreThanOrEqual.js.map +1 -1
  268. package/find-options/operator/Not.js +1 -2
  269. package/find-options/operator/Not.js.map +1 -1
  270. package/find-options/operator/Or.js +1 -2
  271. package/find-options/operator/Or.js.map +1 -1
  272. package/find-options/operator/Raw.js +1 -2
  273. package/find-options/operator/Raw.js.map +1 -1
  274. package/globals.js +14 -15
  275. package/globals.js.map +1 -1
  276. package/package.json +1 -1
  277. package/platform/PlatformTools.d.ts +0 -4
  278. package/platform/PlatformTools.js +12 -18
  279. package/platform/PlatformTools.js.map +1 -1
  280. package/query-builder/SelectQueryBuilder.d.ts +0 -1
  281. package/query-builder/index.js +1 -2
  282. package/query-builder/index.js.map +1 -1
  283. package/query-builder/transformer/RawSqlResultsToEntityTransformer.d.ts +9 -0
  284. package/query-builder/transformer/RawSqlResultsToEntityTransformer.js +95 -61
  285. package/query-builder/transformer/RawSqlResultsToEntityTransformer.js.map +1 -1
  286. package/query-runner/QueryRunner.d.ts +0 -1
  287. package/repository/Repository.d.ts +2 -0
  288. package/repository/Repository.js +2 -0
  289. package/repository/Repository.js.map +1 -1
  290. package/util/DirectoryExportedClassesLoader.js +2 -3
  291. package/util/DirectoryExportedClassesLoader.js.map +1 -1
  292. package/util/ImportUtils.js +23 -36
  293. package/util/ImportUtils.js.map +1 -1
  294. package/util/PathUtils.js +3 -4
  295. package/util/PathUtils.js.map +1 -1
  296. package/util/StringUtils.js +6 -7
  297. package/util/StringUtils.js.map +1 -1
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export interface MysqlConnectionCredentialsOptions {
7
7
  /**
8
- * Connection url where perform connection to.
8
+ * Connection url where the connection is performed.
9
9
  */
10
10
  readonly url?: string;
11
11
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/mysql/MysqlConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"MysqlConnectionCredentialsOptions.js","sourcesContent":["/**\n * MySQL specific connection credential options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface MysqlConnectionCredentialsOptions {\n /**\n * Connection url where perform connection to.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Object with ssl parameters or a string containing name of ssl profile.\n */\n readonly ssl?: any\n\n /**\n * Database socket path\n */\n readonly socketPath?: string\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/mysql/MysqlConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"MysqlConnectionCredentialsOptions.js","sourcesContent":["/**\n * MySQL specific connection credential options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface MysqlConnectionCredentialsOptions {\n /**\n * Connection url where the connection is performed.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Object with ssl parameters or a string containing name of ssl profile.\n */\n readonly ssl?: any\n\n /**\n * Database socket path\n */\n readonly socketPath?: string\n}\n"],"sourceRoot":"../.."}
@@ -99,7 +99,7 @@ export interface MysqlConnectionOptions extends BaseDataSourceOptions, MysqlConn
99
99
  */
100
100
  readonly master: MysqlConnectionCredentialsOptions;
101
101
  /**
102
- * List of read-from severs (slaves).
102
+ * List of read-from servers (slaves).
103
103
  */
104
104
  readonly slaves: MysqlConnectionCredentialsOptions[];
105
105
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/mysql/MysqlConnectionOptions.ts"],"names":[],"mappings":"","file":"MysqlConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { MysqlConnectionCredentialsOptions } from \"./MysqlConnectionCredentialsOptions\"\n\n/**\n * MySQL specific connection options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface MysqlConnectionOptions\n extends BaseDataSourceOptions,\n MysqlConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"mysql\" | \"mariadb\"\n\n /**\n * The driver object\n * This defaults to require(\"mysql\").\n * Falls back to require(\"mysql2\")\n */\n readonly driver?: any\n\n /**\n * The charset for the connection. This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\n * If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.\n * Default: 'UTF8_GENERAL_CI'\n */\n readonly charset?: string\n\n /**\n * The timezone configured on the MySQL server.\n * This is used to type cast server date/time values to JavaScript Date object and vice versa.\n * This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')\n */\n readonly timezone?: string\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n */\n readonly connectTimeout?: number\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n * This difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs\n * https://github.com/mysqljs/mysql/tree/master#pool-options\n */\n readonly acquireTimeout?: number\n\n /**\n * Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)\n */\n readonly insecureAuth?: boolean\n\n /**\n * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)\n */\n readonly supportBigNumbers?: boolean\n\n /**\n * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always\n * returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings\n * disabled will return big numbers as String objects only when they cannot be accurately represented with\n * [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),\n * otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.\n */\n readonly bigNumberStrings?: boolean\n\n /**\n * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.\n * Can be true/false or an array of type names to keep as strings.\n */\n readonly dateStrings?: boolean | string[]\n\n /**\n * Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.\n * (Default: false)\n */\n readonly debug?: boolean | string[]\n\n /**\n * Generates stack traces on Error to include call site of library entrance (\"long stack traces\").\n * Slight performance penalty for most calls. (Default: true)\n */\n readonly trace?: boolean\n\n /**\n * Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.\n * (Default: false)\n */\n readonly multipleStatements?: boolean\n\n /**\n * Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n * (Default: true)\n */\n readonly legacySpatialSupport?: boolean\n\n /**\n * List of connection flags to use other than the default ones. It is also possible to blacklist default ones.\n * For more information, check https://github.com/mysqljs/mysql#connection-flags.\n */\n readonly flags?: string[]\n\n /**\n * TypeORM will automatically use package found in your node_modules, prioritizing mysql over mysql2,\n * but you can specify it manually\n */\n readonly connectorPackage?: \"mysql\" | \"mysql2\"\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: MysqlConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: MysqlConnectionCredentialsOptions[]\n\n /**\n * If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)\n */\n readonly canRetry?: boolean\n\n /**\n * If connection fails, node's errorCount increases.\n * When errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)\n */\n readonly removeNodeErrorCount?: number\n\n /**\n * If connection fails, specifies the number of milliseconds before another connection attempt will be made.\n * If set to 0, then node will be removed instead and never re-used. (Default: 0)\n */\n readonly restoreNodeTimeout?: number\n\n /**\n * Determines how slaves are selected:\n * RR: Select one alternately (Round-Robin).\n * RANDOM: Select the node by random function.\n * ORDER: Select the first node available unconditionally.\n */\n readonly selector?: \"RR\" | \"RANDOM\" | \"ORDER\"\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/mysql/MysqlConnectionOptions.ts"],"names":[],"mappings":"","file":"MysqlConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { MysqlConnectionCredentialsOptions } from \"./MysqlConnectionCredentialsOptions\"\n\n/**\n * MySQL specific connection options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface MysqlConnectionOptions\n extends BaseDataSourceOptions,\n MysqlConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"mysql\" | \"mariadb\"\n\n /**\n * The driver object\n * This defaults to require(\"mysql\").\n * Falls back to require(\"mysql2\")\n */\n readonly driver?: any\n\n /**\n * The charset for the connection. This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\n * If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.\n * Default: 'UTF8_GENERAL_CI'\n */\n readonly charset?: string\n\n /**\n * The timezone configured on the MySQL server.\n * This is used to type cast server date/time values to JavaScript Date object and vice versa.\n * This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')\n */\n readonly timezone?: string\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n */\n readonly connectTimeout?: number\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n * This difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs\n * https://github.com/mysqljs/mysql/tree/master#pool-options\n */\n readonly acquireTimeout?: number\n\n /**\n * Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)\n */\n readonly insecureAuth?: boolean\n\n /**\n * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)\n */\n readonly supportBigNumbers?: boolean\n\n /**\n * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always\n * returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings\n * disabled will return big numbers as String objects only when they cannot be accurately represented with\n * [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),\n * otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.\n */\n readonly bigNumberStrings?: boolean\n\n /**\n * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.\n * Can be true/false or an array of type names to keep as strings.\n */\n readonly dateStrings?: boolean | string[]\n\n /**\n * Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.\n * (Default: false)\n */\n readonly debug?: boolean | string[]\n\n /**\n * Generates stack traces on Error to include call site of library entrance (\"long stack traces\").\n * Slight performance penalty for most calls. (Default: true)\n */\n readonly trace?: boolean\n\n /**\n * Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.\n * (Default: false)\n */\n readonly multipleStatements?: boolean\n\n /**\n * Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n * (Default: true)\n */\n readonly legacySpatialSupport?: boolean\n\n /**\n * List of connection flags to use other than the default ones. It is also possible to blacklist default ones.\n * For more information, check https://github.com/mysqljs/mysql#connection-flags.\n */\n readonly flags?: string[]\n\n /**\n * TypeORM will automatically use package found in your node_modules, prioritizing mysql over mysql2,\n * but you can specify it manually\n */\n readonly connectorPackage?: \"mysql\" | \"mysql2\"\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: MysqlConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: MysqlConnectionCredentialsOptions[]\n\n /**\n * If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)\n */\n readonly canRetry?: boolean\n\n /**\n * If connection fails, node's errorCount increases.\n * When errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)\n */\n readonly removeNodeErrorCount?: number\n\n /**\n * If connection fails, specifies the number of milliseconds before another connection attempt will be made.\n * If set to 0, then node will be removed instead and never re-used. (Default: 0)\n */\n readonly restoreNodeTimeout?: number\n\n /**\n * Determines how slaves are selected:\n * RR: Select one alternately (Round-Robin).\n * RANDOM: Select the node by random function.\n * ORDER: Select the first node available unconditionally.\n */\n readonly selector?: \"RR\" | \"RANDOM\" | \"ORDER\"\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { QueryRunner } from "../../query-runner/QueryRunner";
3
2
  import { TableColumn } from "../../schema-builder/table/TableColumn";
4
3
  import { Table } from "../../schema-builder/table/Table";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface OracleConnectionCredentialsOptions {
5
5
  /**
6
- * Connection url where perform connection to.
6
+ * Connection url where the connection is performed.
7
7
  */
8
8
  readonly url?: string;
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/oracle/OracleConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"OracleConnectionCredentialsOptions.js","sourcesContent":["/**\n * Oracle specific connection credential options.\n */\nexport interface OracleConnectionCredentialsOptions {\n /**\n * Connection url where perform connection to.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Connection SID.\n */\n readonly sid?: string\n\n /**\n * Connection Service Name.\n */\n readonly serviceName?: string\n\n /**\n * Embedded TNS Connection String\n */\n readonly connectString?: string\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/oracle/OracleConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"OracleConnectionCredentialsOptions.js","sourcesContent":["/**\n * Oracle specific connection credential options.\n */\nexport interface OracleConnectionCredentialsOptions {\n /**\n * Connection url where the connection is performed.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Connection SID.\n */\n readonly sid?: string\n\n /**\n * Connection Service Name.\n */\n readonly serviceName?: string\n\n /**\n * Embedded TNS Connection String\n */\n readonly connectString?: string\n}\n"],"sourceRoot":"../.."}
@@ -44,7 +44,7 @@ export interface OracleConnectionOptions extends BaseDataSourceOptions, OracleCo
44
44
  */
45
45
  readonly master: OracleConnectionCredentialsOptions;
46
46
  /**
47
- * List of read-from severs (slaves).
47
+ * List of read-from servers (slaves).
48
48
  */
49
49
  readonly slaves: OracleConnectionCredentialsOptions[];
50
50
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/oracle/OracleConnectionOptions.ts"],"names":[],"mappings":"","file":"OracleConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { OracleConnectionCredentialsOptions } from \"./OracleConnectionCredentialsOptions\"\n\nexport interface OracleThickModeOptions {\n binaryDir?: string\n configDir?: string\n driverName?: string\n errorUrl?: string\n libDir?: string\n}\n\n/**\n * Oracle-specific connection options.\n */\nexport interface OracleConnectionOptions\n extends BaseDataSourceOptions,\n OracleConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"oracle\"\n\n /**\n * Schema name. By default is \"public\".\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to require(\"oracledb\")\n */\n readonly driver?: any\n\n /**\n * Utilize the thick driver. Starting from oracledb version 6, it's necessary to set this to true when opting for the thick client usage.\n * Alternatively, an 'OracleThickModeOptions' object can be configured, which is used for the thick mode configuration by passing it to the 'node-oracledb' driver.\n * For additional information, refer to the details provided in the following link:\n * (https://node-oracledb.readthedocs.io/en/latest/api_manual/oracledb.html#oracledb.initOracleClient)\n */\n readonly thickMode?: boolean | OracleThickModeOptions\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: OracleConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: OracleConnectionCredentialsOptions[]\n }\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/oracle/OracleConnectionOptions.ts"],"names":[],"mappings":"","file":"OracleConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { OracleConnectionCredentialsOptions } from \"./OracleConnectionCredentialsOptions\"\n\nexport interface OracleThickModeOptions {\n binaryDir?: string\n configDir?: string\n driverName?: string\n errorUrl?: string\n libDir?: string\n}\n\n/**\n * Oracle-specific connection options.\n */\nexport interface OracleConnectionOptions\n extends BaseDataSourceOptions,\n OracleConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"oracle\"\n\n /**\n * Schema name. By default is \"public\".\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to require(\"oracledb\")\n */\n readonly driver?: any\n\n /**\n * Utilize the thick driver. Starting from oracledb version 6, it's necessary to set this to true when opting for the thick client usage.\n * Alternatively, an 'OracleThickModeOptions' object can be configured, which is used for the thick mode configuration by passing it to the 'node-oracledb' driver.\n * For additional information, refer to the details provided in the following link:\n * (https://node-oracledb.readthedocs.io/en/latest/api_manual/oracledb.html#oracledb.initOracleClient)\n */\n readonly thickMode?: boolean | OracleThickModeOptions\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: OracleConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: OracleConnectionCredentialsOptions[]\n }\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { QueryRunner } from "../../query-runner/QueryRunner";
3
2
  import { TableColumn } from "../../schema-builder/table/TableColumn";
4
3
  import { Table } from "../../schema-builder/table/Table";
@@ -1,11 +1,10 @@
1
-
2
1
  import { TlsOptions } from "tls";
3
2
  /**
4
3
  * Postgres specific connection credential options.
5
4
  */
6
5
  export interface PostgresConnectionCredentialsOptions {
7
6
  /**
8
- * Connection url where perform connection to.
7
+ * Connection url where the connection is performed.
9
8
  */
10
9
  readonly url?: string;
11
10
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/postgres/PostgresConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"PostgresConnectionCredentialsOptions.js","sourcesContent":["import { TlsOptions } from \"tls\"\n\n/**\n * Postgres specific connection credential options.\n */\nexport interface PostgresConnectionCredentialsOptions {\n /**\n * Connection url where perform connection to.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string | (() => string) | (() => Promise<string>)\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Object with ssl parameters\n */\n readonly ssl?: boolean | TlsOptions\n\n /**\n * sets the application_name var to help db administrators identify\n * the service using this connection. Defaults to 'undefined'\n */\n readonly applicationName?: string\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/postgres/PostgresConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"PostgresConnectionCredentialsOptions.js","sourcesContent":["import { TlsOptions } from \"tls\"\n\n/**\n * Postgres specific connection credential options.\n */\nexport interface PostgresConnectionCredentialsOptions {\n /**\n * Connection url where the connection is performed.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string | (() => string) | (() => Promise<string>)\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Object with ssl parameters\n */\n readonly ssl?: boolean | TlsOptions\n\n /**\n * sets the application_name var to help db administrators identify\n * the service using this connection. Defaults to 'undefined'\n */\n readonly applicationName?: string\n}\n"],"sourceRoot":"../.."}
@@ -36,7 +36,7 @@ export interface PostgresConnectionOptions extends BaseDataSourceOptions, Postgr
36
36
  */
37
37
  readonly master: PostgresConnectionCredentialsOptions;
38
38
  /**
39
- * List of read-from severs (slaves).
39
+ * List of read-from servers (slaves).
40
40
  */
41
41
  readonly slaves: PostgresConnectionCredentialsOptions[];
42
42
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/postgres/PostgresConnectionOptions.ts"],"names":[],"mappings":"","file":"PostgresConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { PostgresConnectionCredentialsOptions } from \"./PostgresConnectionCredentialsOptions\"\n\n/**\n * Postgres-specific connection options.\n */\nexport interface PostgresConnectionOptions\n extends BaseDataSourceOptions,\n PostgresConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"postgres\"\n\n /**\n * Schema name.\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to `require(\"pg\")`.\n */\n readonly driver?: any\n\n /**\n * The driver object\n * This defaults to `require(\"pg-native\")`.\n */\n readonly nativeDriver?: any\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: PostgresConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: PostgresConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the postgres\n * server. If undefined, or set to 0, there is no timeout. Defaults to undefined.\n */\n readonly connectTimeoutMS?: number\n\n /**\n * The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.\n * If pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.\n * If uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.\n */\n readonly uuidExtension?: \"pgcrypto\" | \"uuid-ossp\"\n\n /*\n * Function handling errors thrown by drivers pool.\n * Defaults to logging error with `warn` level.\n */\n readonly poolErrorHandler?: (err: any) => any\n\n /**\n * Include notification messages from Postgres server in client logs\n */\n readonly logNotifications?: boolean\n\n /**\n * Automatically install postgres extensions\n */\n readonly installExtensions?: boolean\n\n /**\n * Return 64-bit integers (int8) as JavaScript integers.\n *\n * Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently\n * parse int8 data type results as numbers because if you have a huge number it will overflow\n * and the result you'd get back from node-postgres would not be the result in the database.\n * That would be a very bad thing so node-postgres just returns int8 results as strings and leaves the parsing up to you.\n *\n * Enabling parseInt8 will cause node-postgres to parse int8 results as numbers.\n * Note: the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`)\n *\n * @see [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5)\n * @see [node-postgres int8 explanation](https://github.com/brianc/node-pg-types#:~:text=on%20projects%3A%20return-,64%2Dbit%20integers,-(int8)%20as)\n * @see [node-postgres defaults.parseInt8 implementation](https://github.com/brianc/node-postgres/blob/pg%408.8.0/packages/pg/lib/defaults.js#L80)\n */\n readonly parseInt8?: boolean\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/postgres/PostgresConnectionOptions.ts"],"names":[],"mappings":"","file":"PostgresConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { PostgresConnectionCredentialsOptions } from \"./PostgresConnectionCredentialsOptions\"\n\n/**\n * Postgres-specific connection options.\n */\nexport interface PostgresConnectionOptions\n extends BaseDataSourceOptions,\n PostgresConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"postgres\"\n\n /**\n * Schema name.\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to `require(\"pg\")`.\n */\n readonly driver?: any\n\n /**\n * The driver object\n * This defaults to `require(\"pg-native\")`.\n */\n readonly nativeDriver?: any\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: PostgresConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: PostgresConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the postgres\n * server. If undefined, or set to 0, there is no timeout. Defaults to undefined.\n */\n readonly connectTimeoutMS?: number\n\n /**\n * The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.\n * If pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.\n * If uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.\n */\n readonly uuidExtension?: \"pgcrypto\" | \"uuid-ossp\"\n\n /*\n * Function handling errors thrown by drivers pool.\n * Defaults to logging error with `warn` level.\n */\n readonly poolErrorHandler?: (err: any) => any\n\n /**\n * Include notification messages from Postgres server in client logs\n */\n readonly logNotifications?: boolean\n\n /**\n * Automatically install postgres extensions\n */\n readonly installExtensions?: boolean\n\n /**\n * Return 64-bit integers (int8) as JavaScript integers.\n *\n * Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently\n * parse int8 data type results as numbers because if you have a huge number it will overflow\n * and the result you'd get back from node-postgres would not be the result in the database.\n * That would be a very bad thing so node-postgres just returns int8 results as strings and leaves the parsing up to you.\n *\n * Enabling parseInt8 will cause node-postgres to parse int8 results as numbers.\n * Note: the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`)\n *\n * @see [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5)\n * @see [node-postgres int8 explanation](https://github.com/brianc/node-pg-types#:~:text=on%20projects%3A%20return-,64%2Dbit%20integers,-(int8)%20as)\n * @see [node-postgres defaults.parseInt8 implementation](https://github.com/brianc/node-postgres/blob/pg%408.8.0/packages/pg/lib/defaults.js#L80)\n */\n readonly parseInt8?: boolean\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { ReadStream } from "../../platform/PlatformTools";
3
2
  import { BaseQueryRunner } from "../../query-runner/BaseQueryRunner";
4
3
  import { QueryRunner } from "../../query-runner/QueryRunner";
@@ -1,4 +1,3 @@
1
-
2
1
  import { ReadStream } from "../../platform/PlatformTools";
3
2
  import { BaseQueryRunner } from "../../query-runner/BaseQueryRunner";
4
3
  import { QueryRunner } from "../../query-runner/QueryRunner";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface SpannerConnectionCredentialsOptions {
5
5
  /**
6
- * Connection url where perform connection to.
6
+ * Connection url where the connection is performed.
7
7
  */
8
8
  readonly instanceId?: string;
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/spanner/SpannerConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"SpannerConnectionCredentialsOptions.js","sourcesContent":["/**\n * Spanner specific connection credential options.\n */\nexport interface SpannerConnectionCredentialsOptions {\n /**\n * Connection url where perform connection to.\n */\n readonly instanceId?: string\n\n /**\n * Database host.\n */\n readonly projectId?: string\n\n /**\n * Database host port.\n */\n readonly databaseId?: string\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/spanner/SpannerConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"SpannerConnectionCredentialsOptions.js","sourcesContent":["/**\n * Spanner specific connection credential options.\n */\nexport interface SpannerConnectionCredentialsOptions {\n /**\n * Connection url where the connection is performed.\n */\n readonly instanceId?: string\n\n /**\n * Database host.\n */\n readonly projectId?: string\n\n /**\n * Database host port.\n */\n readonly databaseId?: string\n}\n"],"sourceRoot":"../.."}
@@ -93,7 +93,7 @@ export interface SpannerConnectionOptions extends BaseConnectionOptions, Spanner
93
93
  */
94
94
  readonly master: SpannerConnectionCredentialsOptions;
95
95
  /**
96
- * List of read-from severs (slaves).
96
+ * List of read-from servers (slaves).
97
97
  */
98
98
  readonly slaves: SpannerConnectionCredentialsOptions[];
99
99
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/spanner/SpannerConnectionOptions.ts"],"names":[],"mappings":"","file":"SpannerConnectionOptions.js","sourcesContent":["import { BaseConnectionOptions } from \"../../connection/BaseConnectionOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { SpannerConnectionCredentialsOptions } from \"./SpannerConnectionCredentialsOptions\"\n\n/**\n * Spanner specific connection options.\n */\nexport interface SpannerConnectionOptions\n extends BaseConnectionOptions,\n SpannerConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"spanner\"\n\n /**\n * The driver object\n * This defaults to require(\"@google-cloud/spanner\").\n */\n readonly driver?: any\n\n // todo\n readonly database?: string\n\n // todo\n readonly schema?: string\n\n /**\n * The charset for the connection. This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\n * If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.\n * Default: 'UTF8_GENERAL_CI'\n */\n readonly charset?: string\n\n /**\n * The timezone configured on the MySQL server.\n * This is used to type cast server date/time values to JavaScript Date object and vice versa.\n * This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')\n */\n readonly timezone?: string\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n */\n readonly connectTimeout?: number\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n * This difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs\n * https://github.com/mysqljs/mysql/tree/master#pool-options\n */\n readonly acquireTimeout?: number\n\n /**\n * Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)\n */\n readonly insecureAuth?: boolean\n\n /**\n * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)\n */\n readonly supportBigNumbers?: boolean\n\n /**\n * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always\n * returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings\n * disabled will return big numbers as String objects only when they cannot be accurately represented with\n * [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),\n * otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.\n */\n readonly bigNumberStrings?: boolean\n\n /**\n * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.\n * Can be true/false or an array of type names to keep as strings.\n */\n readonly dateStrings?: boolean | string[]\n\n /**\n * Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.\n * (Default: false)\n */\n readonly debug?: boolean | string[]\n\n /**\n * Generates stack traces on Error to include call site of library entrance (\"long stack traces\").\n * Slight performance penalty for most calls. (Default: true)\n */\n readonly trace?: boolean\n\n /**\n * Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.\n * (Default: false)\n */\n readonly multipleStatements?: boolean\n\n /**\n * Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n * (Default: true)\n */\n readonly legacySpatialSupport?: boolean\n\n /**\n * List of connection flags to use other than the default ones. It is also possible to blacklist default ones.\n * For more information, check https://github.com/mysqljs/mysql#connection-flags.\n */\n readonly flags?: string[]\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: SpannerConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: SpannerConnectionCredentialsOptions[]\n\n /**\n * If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)\n */\n readonly canRetry?: boolean\n\n /**\n * If connection fails, node's errorCount increases.\n * When errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)\n */\n readonly removeNodeErrorCount?: number\n\n /**\n * If connection fails, specifies the number of milliseconds before another connection attempt will be made.\n * If set to 0, then node will be removed instead and never re-used. (Default: 0)\n */\n readonly restoreNodeTimeout?: number\n\n /**\n * Determines how slaves are selected:\n * RR: Select one alternately (Round-Robin).\n * RANDOM: Select the node by random function.\n * ORDER: Select the first node available unconditionally.\n */\n readonly selector?: \"RR\" | \"RANDOM\" | \"ORDER\"\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n readonly poolSize?: never\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/spanner/SpannerConnectionOptions.ts"],"names":[],"mappings":"","file":"SpannerConnectionOptions.js","sourcesContent":["import { BaseConnectionOptions } from \"../../connection/BaseConnectionOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { SpannerConnectionCredentialsOptions } from \"./SpannerConnectionCredentialsOptions\"\n\n/**\n * Spanner specific connection options.\n */\nexport interface SpannerConnectionOptions\n extends BaseConnectionOptions,\n SpannerConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"spanner\"\n\n /**\n * The driver object\n * This defaults to require(\"@google-cloud/spanner\").\n */\n readonly driver?: any\n\n // todo\n readonly database?: string\n\n // todo\n readonly schema?: string\n\n /**\n * The charset for the connection. This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\n * If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.\n * Default: 'UTF8_GENERAL_CI'\n */\n readonly charset?: string\n\n /**\n * The timezone configured on the MySQL server.\n * This is used to type cast server date/time values to JavaScript Date object and vice versa.\n * This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')\n */\n readonly timezone?: string\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n */\n readonly connectTimeout?: number\n\n /**\n * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)\n * This difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs\n * https://github.com/mysqljs/mysql/tree/master#pool-options\n */\n readonly acquireTimeout?: number\n\n /**\n * Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)\n */\n readonly insecureAuth?: boolean\n\n /**\n * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)\n */\n readonly supportBigNumbers?: boolean\n\n /**\n * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always\n * returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings\n * disabled will return big numbers as String objects only when they cannot be accurately represented with\n * [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),\n * otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.\n */\n readonly bigNumberStrings?: boolean\n\n /**\n * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.\n * Can be true/false or an array of type names to keep as strings.\n */\n readonly dateStrings?: boolean | string[]\n\n /**\n * Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.\n * (Default: false)\n */\n readonly debug?: boolean | string[]\n\n /**\n * Generates stack traces on Error to include call site of library entrance (\"long stack traces\").\n * Slight performance penalty for most calls. (Default: true)\n */\n readonly trace?: boolean\n\n /**\n * Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.\n * (Default: false)\n */\n readonly multipleStatements?: boolean\n\n /**\n * Use spatial functions like GeomFromText and AsText which are removed in MySQL 8.\n * (Default: true)\n */\n readonly legacySpatialSupport?: boolean\n\n /**\n * List of connection flags to use other than the default ones. It is also possible to blacklist default ones.\n * For more information, check https://github.com/mysqljs/mysql#connection-flags.\n */\n readonly flags?: string[]\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: SpannerConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: SpannerConnectionCredentialsOptions[]\n\n /**\n * If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)\n */\n readonly canRetry?: boolean\n\n /**\n * If connection fails, node's errorCount increases.\n * When errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)\n */\n readonly removeNodeErrorCount?: number\n\n /**\n * If connection fails, specifies the number of milliseconds before another connection attempt will be made.\n * If set to 0, then node will be removed instead and never re-used. (Default: 0)\n */\n readonly restoreNodeTimeout?: number\n\n /**\n * Determines how slaves are selected:\n * RR: Select one alternately (Round-Robin).\n * RANDOM: Select the node by random function.\n * ORDER: Select the first node available unconditionally.\n */\n readonly selector?: \"RR\" | \"RANDOM\" | \"ORDER\"\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n readonly poolSize?: never\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { ReadStream } from "../../platform/PlatformTools";
3
2
  import { BaseQueryRunner } from "../../query-runner/BaseQueryRunner";
4
3
  import { QueryRunner } from "../../query-runner/QueryRunner";
@@ -1,4 +1,4 @@
1
- import mkdirp from "mkdirp";
1
+ import fs from "fs/promises";
2
2
  import path from "path";
3
3
  import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError";
4
4
  import { SqliteQueryRunner } from "./SqliteQueryRunner";
@@ -143,7 +143,7 @@ export class SqliteDriver extends AbstractSqliteDriver {
143
143
  * Auto creates database directory if it does not exist.
144
144
  */
145
145
  async createDatabaseDirectory(fullPath) {
146
- await mkdirp(path.dirname(fullPath));
146
+ await fs.mkdir(path.dirname(fullPath), { recursive: true });
147
147
  }
148
148
  /**
149
149
  * Performs the attaching of the database files. The attachedDatabase should have been populated during calls to #buildTableName
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/sqlite/SqliteDriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAK5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAA;AAE9E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjE;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,oBAAoB;IAelD,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,YAAY,UAAsB;QAC9B,KAAK,CAAC,UAAU,CAAC,CAAA;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAkC,CAAA;QAC5D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAA;QAErC,sBAAsB;QACtB,IAAI,CAAC,gBAAgB,EAAE,CAAA;IAC3B,CAAC;IAED,4EAA4E;IAC5E,iBAAiB;IAC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G;IACO,gBAAgB;QACtB,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACnE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;QAClC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,IAAI,8BAA8B,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;QACjE,CAAC;IACL,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,uBAAuB,CAAC,QAAgB;QACpD,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;IACxC,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,eAAe;QAC3B,kIAAkI;QAClI,IAAI,KAAK,EAAE,MAAM,EACb,YAAY,EACZ,sBAAsB,GACzB,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,CAAA;YAC1D,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACvB,WAAW,sBAAsB,SAAS,YAAY,GAAG,CAC5D,CAAA;QACL,CAAC;IACL,CAAC;IAES,mBAAmB;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAA;QACvC,OAAO,IAAI,CAAC,OAAO,CACf,UAAU,CAAC,SAAS,CAAC;YACjB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAC5C,CAAA;IACL,CAAC;CACJ","file":"SqliteDriver.js","sourcesContent":["import mkdirp from \"mkdirp\"\nimport path from \"path\"\nimport { DriverPackageNotInstalledError } from \"../../error/DriverPackageNotInstalledError\"\nimport { SqliteQueryRunner } from \"./SqliteQueryRunner\"\nimport { PlatformTools } from \"../../platform/PlatformTools\"\nimport { DataSource } from \"../../data-source/DataSource\"\nimport { SqliteConnectionOptions } from \"./SqliteConnectionOptions\"\nimport { ColumnType } from \"../types/ColumnTypes\"\nimport { QueryRunner } from \"../../query-runner/QueryRunner\"\nimport { AbstractSqliteDriver } from \"../sqlite-abstract/AbstractSqliteDriver\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { filepathToName, isAbsolute } from \"../../util/PathUtils\"\n\n/**\n * Organizes communication with sqlite DBMS.\n */\nexport class SqliteDriver extends AbstractSqliteDriver {\n // -------------------------------------------------------------------------\n // Public Properties\n // -------------------------------------------------------------------------\n\n /**\n * Connection options.\n */\n options: SqliteConnectionOptions\n\n /**\n * SQLite underlying library.\n */\n sqlite: any\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(connection: DataSource) {\n super(connection)\n this.connection = connection\n this.options = connection.options as SqliteConnectionOptions\n this.database = this.options.database\n\n // load sqlite package\n this.loadDependencies()\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Closes connection with database.\n */\n async disconnect(): Promise<void> {\n return new Promise<void>((ok, fail) => {\n this.queryRunner = undefined\n this.databaseConnection.close((err: any) =>\n err ? fail(err) : ok(),\n )\n })\n }\n\n /**\n * Creates a query runner used to execute database queries.\n */\n createQueryRunner(mode: ReplicationMode): QueryRunner {\n if (!this.queryRunner) this.queryRunner = new SqliteQueryRunner(this)\n\n return this.queryRunner\n }\n\n normalizeType(column: {\n type?: ColumnType\n length?: number | string\n precision?: number | null\n scale?: number\n }): string {\n if ((column.type as any) === Buffer) {\n return \"blob\"\n }\n\n return super.normalizeType(column)\n }\n\n async afterConnect(): Promise<void> {\n return this.attachDatabases()\n }\n\n /**\n * For SQLite, the database may be added in the decorator metadata. It will be a filepath to a database file.\n */\n buildTableName(\n tableName: string,\n _schema?: string,\n database?: string,\n ): string {\n if (!database) return tableName\n if (this.getAttachedDatabaseHandleByRelativePath(database))\n return `${this.getAttachedDatabaseHandleByRelativePath(\n database,\n )}.${tableName}`\n\n if (database === this.options.database) return tableName\n\n // we use the decorated name as supplied when deriving attach handle (ideally without non-portable absolute path)\n const identifierHash = filepathToName(database)\n // decorated name will be assumed relative to main database file when non absolute. Paths supplied as absolute won't be portable\n const absFilepath = isAbsolute(database)\n ? database\n : path.join(this.getMainDatabasePath(), database)\n\n this.attachedDatabases[database] = {\n attachFilepathAbsolute: absFilepath,\n attachFilepathRelative: database,\n attachHandle: identifierHash,\n }\n\n return `${identifierHash}.${tableName}`\n }\n\n // -------------------------------------------------------------------------\n // Protected Methods\n // -------------------------------------------------------------------------\n\n /**\n * Creates connection with the database.\n */\n protected async createDatabaseConnection() {\n if (\n this.options.flags === undefined ||\n !(this.options.flags & this.sqlite.OPEN_URI)\n ) {\n await this.createDatabaseDirectory(this.options.database)\n }\n\n const databaseConnection: any = await new Promise((ok, fail) => {\n if (this.options.flags === undefined) {\n const connection = new this.sqlite.Database(\n this.options.database,\n (err: any) => {\n if (err) return fail(err)\n ok(connection)\n },\n )\n } else {\n const connection = new this.sqlite.Database(\n this.options.database,\n this.options.flags,\n (err: any) => {\n if (err) return fail(err)\n ok(connection)\n },\n )\n }\n })\n\n // Internal function to run a command on the connection and fail if an error occured.\n function run(line: string): Promise<void> {\n return new Promise((ok, fail) => {\n databaseConnection.run(line, (err: any) => {\n if (err) return fail(err)\n ok()\n })\n })\n }\n // in the options, if encryption key for SQLCipher is setted.\n // Must invoke key pragma before trying to do any other interaction with the database.\n if (this.options.key) {\n await run(`PRAGMA key = ${JSON.stringify(this.options.key)}`)\n }\n\n if (this.options.enableWAL) {\n await run(`PRAGMA journal_mode = WAL`)\n }\n\n if (\n this.options.busyTimeout &&\n typeof this.options.busyTimeout === \"number\" &&\n this.options.busyTimeout > 0\n ) {\n await run(`PRAGMA busy_timeout = ${this.options.busyTimeout}`)\n }\n\n // we need to enable foreign keys in sqlite to make sure all foreign key related features\n // working properly. this also makes onDelete to work with sqlite.\n await run(`PRAGMA foreign_keys = ON`)\n\n return databaseConnection\n }\n\n /**\n * If driver dependency is not given explicitly, then try to load it via \"require\".\n */\n protected loadDependencies(): void {\n try {\n const sqlite = this.options.driver || PlatformTools.load(\"sqlite3\")\n this.sqlite = sqlite.verbose()\n } catch (e) {\n throw new DriverPackageNotInstalledError(\"SQLite\", \"sqlite3\")\n }\n }\n\n /**\n * Auto creates database directory if it does not exist.\n */\n protected async createDatabaseDirectory(fullPath: string): Promise<void> {\n await mkdirp(path.dirname(fullPath))\n }\n\n /**\n * Performs the attaching of the database files. The attachedDatabase should have been populated during calls to #buildTableName\n * during EntityMetadata production (see EntityMetadata#buildTablePath)\n *\n * https://sqlite.org/lang_attach.html\n */\n protected async attachDatabases() {\n // @todo - possibly check number of databases (but unqueriable at runtime sadly) - https://www.sqlite.org/limits.html#max_attached\n for await (const {\n attachHandle,\n attachFilepathAbsolute,\n } of Object.values(this.attachedDatabases)) {\n await this.createDatabaseDirectory(attachFilepathAbsolute)\n await this.connection.query(\n `ATTACH \"${attachFilepathAbsolute}\" AS \"${attachHandle}\"`,\n )\n }\n }\n\n protected getMainDatabasePath(): string {\n const optionsDb = this.options.database\n return path.dirname(\n isAbsolute(optionsDb)\n ? optionsDb\n : path.join(process.cwd(), optionsDb),\n )\n }\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/sqlite/SqliteDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAA;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAK5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAA;AAE9E,OAAO,EAAE,cAAc,E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AAU,CAAC,KAAK,CACvB,WAAW,sBAAsB,SAAS,YAAY,GAAG,CAC5D,CAAA;QACL,CAAC;IACL,CAAC;IAES,mBAAmB;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAA;QACvC,OAAO,IAAI,CAAC,OAAO,CACf,UAAU,CAAC,SAAS,CAAC;YACjB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAC5C,CAAA;IACL,CAAC;CACJ","file":"SqliteDriver.js","sourcesContent":["import fs from \"fs/promises\"\nimport path from \"path\"\nimport { DriverPackageNotInstalledError } from \"../../error/DriverPackageNotInstalledError\"\nimport { SqliteQueryRunner } from \"./SqliteQueryRunner\"\nimport { PlatformTools } from \"../../platform/PlatformTools\"\nimport { DataSource } from \"../../data-source/DataSource\"\nimport { SqliteConnectionOptions } from \"./SqliteConnectionOptions\"\nimport { ColumnType } from \"../types/ColumnTypes\"\nimport { QueryRunner } from \"../../query-runner/QueryRunner\"\nimport { AbstractSqliteDriver } from \"../sqlite-abstract/AbstractSqliteDriver\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { filepathToName, isAbsolute } from \"../../util/PathUtils\"\n\n/**\n * Organizes communication with sqlite DBMS.\n */\nexport class SqliteDriver extends AbstractSqliteDriver {\n // -------------------------------------------------------------------------\n // Public Properties\n // -------------------------------------------------------------------------\n\n /**\n * Connection options.\n */\n options: SqliteConnectionOptions\n\n /**\n * SQLite underlying library.\n */\n sqlite: any\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(connection: DataSource) {\n super(connection)\n this.connection = connection\n this.options = connection.options as SqliteConnectionOptions\n this.database = this.options.database\n\n // load sqlite package\n this.loadDependencies()\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Closes connection with database.\n */\n async disconnect(): Promise<void> {\n return new Promise<void>((ok, fail) => {\n this.queryRunner = undefined\n this.databaseConnection.close((err: any) =>\n err ? fail(err) : ok(),\n )\n })\n }\n\n /**\n * Creates a query runner used to execute database queries.\n */\n createQueryRunner(mode: ReplicationMode): QueryRunner {\n if (!this.queryRunner) this.queryRunner = new SqliteQueryRunner(this)\n\n return this.queryRunner\n }\n\n normalizeType(column: {\n type?: ColumnType\n length?: number | string\n precision?: number | null\n scale?: number\n }): string {\n if ((column.type as any) === Buffer) {\n return \"blob\"\n }\n\n return super.normalizeType(column)\n }\n\n async afterConnect(): Promise<void> {\n return this.attachDatabases()\n }\n\n /**\n * For SQLite, the database may be added in the decorator metadata. It will be a filepath to a database file.\n */\n buildTableName(\n tableName: string,\n _schema?: string,\n database?: string,\n ): string {\n if (!database) return tableName\n if (this.getAttachedDatabaseHandleByRelativePath(database))\n return `${this.getAttachedDatabaseHandleByRelativePath(\n database,\n )}.${tableName}`\n\n if (database === this.options.database) return tableName\n\n // we use the decorated name as supplied when deriving attach handle (ideally without non-portable absolute path)\n const identifierHash = filepathToName(database)\n // decorated name will be assumed relative to main database file when non absolute. Paths supplied as absolute won't be portable\n const absFilepath = isAbsolute(database)\n ? database\n : path.join(this.getMainDatabasePath(), database)\n\n this.attachedDatabases[database] = {\n attachFilepathAbsolute: absFilepath,\n attachFilepathRelative: database,\n attachHandle: identifierHash,\n }\n\n return `${identifierHash}.${tableName}`\n }\n\n // -------------------------------------------------------------------------\n // Protected Methods\n // -------------------------------------------------------------------------\n\n /**\n * Creates connection with the database.\n */\n protected async createDatabaseConnection() {\n if (\n this.options.flags === undefined ||\n !(this.options.flags & this.sqlite.OPEN_URI)\n ) {\n await this.createDatabaseDirectory(this.options.database)\n }\n\n const databaseConnection: any = await new Promise((ok, fail) => {\n if (this.options.flags === undefined) {\n const connection = new this.sqlite.Database(\n this.options.database,\n (err: any) => {\n if (err) return fail(err)\n ok(connection)\n },\n )\n } else {\n const connection = new this.sqlite.Database(\n this.options.database,\n this.options.flags,\n (err: any) => {\n if (err) return fail(err)\n ok(connection)\n },\n )\n }\n })\n\n // Internal function to run a command on the connection and fail if an error occured.\n function run(line: string): Promise<void> {\n return new Promise((ok, fail) => {\n databaseConnection.run(line, (err: any) => {\n if (err) return fail(err)\n ok()\n })\n })\n }\n // in the options, if encryption key for SQLCipher is setted.\n // Must invoke key pragma before trying to do any other interaction with the database.\n if (this.options.key) {\n await run(`PRAGMA key = ${JSON.stringify(this.options.key)}`)\n }\n\n if (this.options.enableWAL) {\n await run(`PRAGMA journal_mode = WAL`)\n }\n\n if (\n this.options.busyTimeout &&\n typeof this.options.busyTimeout === \"number\" &&\n this.options.busyTimeout > 0\n ) {\n await run(`PRAGMA busy_timeout = ${this.options.busyTimeout}`)\n }\n\n // we need to enable foreign keys in sqlite to make sure all foreign key related features\n // working properly. this also makes onDelete to work with sqlite.\n await run(`PRAGMA foreign_keys = ON`)\n\n return databaseConnection\n }\n\n /**\n * If driver dependency is not given explicitly, then try to load it via \"require\".\n */\n protected loadDependencies(): void {\n try {\n const sqlite = this.options.driver || PlatformTools.load(\"sqlite3\")\n this.sqlite = sqlite.verbose()\n } catch (e) {\n throw new DriverPackageNotInstalledError(\"SQLite\", \"sqlite3\")\n }\n }\n\n /**\n * Auto creates database directory if it does not exist.\n */\n protected async createDatabaseDirectory(fullPath: string): Promise<void> {\n await fs.mkdir(path.dirname(fullPath), { recursive: true })\n }\n\n /**\n * Performs the attaching of the database files. The attachedDatabase should have been populated during calls to #buildTableName\n * during EntityMetadata production (see EntityMetadata#buildTablePath)\n *\n * https://sqlite.org/lang_attach.html\n */\n protected async attachDatabases() {\n // @todo - possibly check number of databases (but unqueriable at runtime sadly) - https://www.sqlite.org/limits.html#max_attached\n for await (const {\n attachHandle,\n attachFilepathAbsolute,\n } of Object.values(this.attachedDatabases)) {\n await this.createDatabaseDirectory(attachFilepathAbsolute)\n await this.connection.query(\n `ATTACH \"${attachFilepathAbsolute}\" AS \"${attachHandle}\"`,\n )\n }\n }\n\n protected getMainDatabasePath(): string {\n const optionsDb = this.options.database\n return path.dirname(\n isAbsolute(optionsDb)\n ? optionsDb\n : path.join(process.cwd(), optionsDb),\n )\n }\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { QueryRunner } from "../../query-runner/QueryRunner";
3
2
  import { TableColumn } from "../../schema-builder/table/TableColumn";
4
3
  import { Table } from "../../schema-builder/table/Table";
@@ -12,7 +12,7 @@ export type SqlServerConnectionCredentialsAuthenticationOptions = DefaultAuthent
12
12
  */
13
13
  export interface SqlServerConnectionCredentialsOptions {
14
14
  /**
15
- * Connection url where perform connection to.
15
+ * Connection url where the connection is performed.
16
16
  */
17
17
  readonly url?: string;
18
18
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"SqlServerConnectionCredentialsOptions.js","sourcesContent":["import { DefaultAuthentication } from \"./authentication/DefaultAuthentication\"\nimport { AzureActiveDirectoryAccessTokenAuthentication } from \"./authentication/AzureActiveDirectoryAccessTokenAuthentication\"\nimport { AzureActiveDirectoryDefaultAuthentication } from \"./authentication/AzureActiveDirectoryDefaultAuthentication\"\nimport { AzureActiveDirectoryMsiAppServiceAuthentication } from \"./authentication/AzureActiveDirectoryMsiAppServiceAuthentication\"\nimport { AzureActiveDirectoryMsiVmAuthentication } from \"./authentication/AzureActiveDirectoryMsiVmAuthentication\"\nimport { AzureActiveDirectoryPasswordAuthentication } from \"./authentication/AzureActiveDirectoryPasswordAuthentication\"\nimport { AzureActiveDirectoryServicePrincipalSecret } from \"./authentication/AzureActiveDirectoryServicePrincipalSecret\"\nimport { NtlmAuthentication } from \"./authentication/NtlmAuthentication\"\n\nexport type SqlServerConnectionCredentialsAuthenticationOptions =\n | DefaultAuthentication\n | NtlmAuthentication\n | AzureActiveDirectoryAccessTokenAuthentication\n | AzureActiveDirectoryDefaultAuthentication\n | AzureActiveDirectoryMsiAppServiceAuthentication\n | AzureActiveDirectoryMsiVmAuthentication\n | AzureActiveDirectoryPasswordAuthentication\n | AzureActiveDirectoryServicePrincipalSecret\n\n/**\n * SqlServer specific connection credential options.\n */\nexport interface SqlServerConnectionCredentialsOptions {\n /**\n * Connection url where perform connection to.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Authentication settings\n * It overrides username and password, when passed.\n */\n readonly authentication?: SqlServerConnectionCredentialsAuthenticationOptions\n\n /**\n * Once you set domain, driver will connect to SQL Server using domain login.\n * @see SqlServerConnectionCredentialsOptions.authentication\n * @see NtlmAuthentication\n * @deprecated\n */\n readonly domain?: string\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"SqlServerConnectionCredentialsOptions.js","sourcesContent":["import { DefaultAuthentication } from \"./authentication/DefaultAuthentication\"\nimport { AzureActiveDirectoryAccessTokenAuthentication } from \"./authentication/AzureActiveDirectoryAccessTokenAuthentication\"\nimport { AzureActiveDirectoryDefaultAuthentication } from \"./authentication/AzureActiveDirectoryDefaultAuthentication\"\nimport { AzureActiveDirectoryMsiAppServiceAuthentication } from \"./authentication/AzureActiveDirectoryMsiAppServiceAuthentication\"\nimport { AzureActiveDirectoryMsiVmAuthentication } from \"./authentication/AzureActiveDirectoryMsiVmAuthentication\"\nimport { AzureActiveDirectoryPasswordAuthentication } from \"./authentication/AzureActiveDirectoryPasswordAuthentication\"\nimport { AzureActiveDirectoryServicePrincipalSecret } from \"./authentication/AzureActiveDirectoryServicePrincipalSecret\"\nimport { NtlmAuthentication } from \"./authentication/NtlmAuthentication\"\n\nexport type SqlServerConnectionCredentialsAuthenticationOptions =\n | DefaultAuthentication\n | NtlmAuthentication\n | AzureActiveDirectoryAccessTokenAuthentication\n | AzureActiveDirectoryDefaultAuthentication\n | AzureActiveDirectoryMsiAppServiceAuthentication\n | AzureActiveDirectoryMsiVmAuthentication\n | AzureActiveDirectoryPasswordAuthentication\n | AzureActiveDirectoryServicePrincipalSecret\n\n/**\n * SqlServer specific connection credential options.\n */\nexport interface SqlServerConnectionCredentialsOptions {\n /**\n * Connection url where the connection is performed.\n */\n readonly url?: string\n\n /**\n * Database host.\n */\n readonly host?: string\n\n /**\n * Database host port.\n */\n readonly port?: number\n\n /**\n * Database name to connect to.\n */\n readonly database?: string\n\n /**\n * Database username.\n */\n readonly username?: string\n\n /**\n * Database password.\n */\n readonly password?: string\n\n /**\n * Authentication settings\n * It overrides username and password, when passed.\n */\n readonly authentication?: SqlServerConnectionCredentialsAuthenticationOptions\n\n /**\n * Once you set domain, driver will connect to SQL Server using domain login.\n * @see SqlServerConnectionCredentialsOptions.authentication\n * @see NtlmAuthentication\n * @deprecated\n */\n readonly domain?: string\n}\n"],"sourceRoot":"../.."}
@@ -239,7 +239,7 @@ export interface SqlServerConnectionOptions extends BaseDataSourceOptions, SqlSe
239
239
  */
240
240
  readonly master: SqlServerConnectionCredentialsOptions;
241
241
  /**
242
- * List of read-from severs (slaves).
242
+ * List of read-from servers (slaves).
243
243
  */
244
244
  readonly slaves: SqlServerConnectionCredentialsOptions[];
245
245
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/sqlserver/SqlServerConnectionOptions.ts"],"names":[],"mappings":"","file":"SqlServerConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { SqlServerConnectionCredentialsOptions } from \"./SqlServerConnectionCredentialsOptions\"\n\n/**\n * Microsoft Sql Server specific connection options.\n */\nexport interface SqlServerConnectionOptions\n extends BaseDataSourceOptions,\n SqlServerConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"mssql\"\n\n /**\n * Connection timeout in ms (default: 15000).\n */\n readonly connectionTimeout?: number\n\n /**\n * Request timeout in ms (default: 15000). NOTE: msnodesqlv8 driver doesn't support timeouts < 1 second.\n */\n readonly requestTimeout?: number\n\n /**\n * Stream recordsets/rows instead of returning them all at once as an argument of callback (default: false).\n * You can also enable streaming for each request independently (request.stream = true).\n * Always set to true if you plan to work with large amount of rows.\n */\n readonly stream?: boolean\n\n /**\n * Database schema.\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to `require(\"mssql\")`\n */\n readonly driver?: any\n\n /**\n * An optional object/dictionary with the any of the properties\n */\n readonly pool?: {\n /**\n * Maximum number of resources to create at any given time. (default=1)\n */\n readonly max?: number\n\n /**\n * Minimum number of resources to keep in pool at any given time. If this is set >= max, the pool will silently\n * set the min to equal max. (default=0)\n */\n readonly min?: number\n\n /**\n * Maximum number of queued requests allowed, additional acquire calls will be callback with an err in a future\n * cycle of the event loop.\n */\n readonly maxWaitingClients?: number\n\n /**\n * Max milliseconds an acquire call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer.\n */\n readonly acquireTimeoutMillis?: number\n\n /**\n * If true the oldest resources will be first to be allocated. If false the most recently released resources will\n * be the first to be allocated. This in effect turns the pool's behaviour from a queue into a stack. boolean,\n * (default true)\n */\n readonly fifo?: boolean\n\n /**\n * Int between 1 and x - if set, borrowers can specify their relative priority in the queue if no resources\n * are available. see example. (default 1)\n */\n readonly priorityRange?: number\n\n /**\n * How often to run eviction checks. Default: 0 (does not run).\n */\n readonly evictionRunIntervalMillis?: number\n\n /**\n * Number of resources to check each eviction run. Default: 3.\n */\n readonly numTestsPerRun?: number\n\n /**\n * Amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object\n * evictor (if any), with the extra condition that at least \"min idle\" object instances remain in the pool.\n * Default -1 (nothing can get evicted)\n */\n readonly softIdleTimeoutMillis?: number\n\n /**\n * The minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due\n * to idle time. Supercedes softIdleTimeoutMillis Default: 30000\n */\n readonly idleTimeoutMillis?: number\n\n /*\n * Function handling errors thrown by drivers pool.\n * Defaults to logging error with `warn` level.\n */\n readonly errorHandler?: (err: any) => any\n }\n\n /**\n * Extra options\n */\n readonly options?: {\n /**\n * The named instance to connect to\n */\n readonly instanceName?: string\n\n /**\n * By default, if the database requestion by options.database cannot be accessed, the connection will fail with\n * an error. However, if options.fallbackToDefaultDb is set to true, then the user's default database will\n * be used instead (Default: false).\n */\n readonly fallbackToDefaultDb?: boolean\n\n /**\n * If true, SET ANSI_NULL_DFLT_ON ON will be set in the initial sql. This means new columns will be nullable by\n * default. See the T-SQL documentation for more details. (Default: true).\n */\n readonly enableAnsiNullDefault?: boolean\n\n /**\n * The number of milliseconds before the attempt to connect is considered failed (default: 15000).\n */\n readonly connectTimeout?: number\n\n /**\n * The number of milliseconds before the cancel (abort) of a request is considered failed (default: 5000).\n */\n readonly cancelTimeout?: number\n\n /**\n * The size of TDS packets (subject to negotiation with the server). Should be a power of 2. (default: 4096).\n */\n readonly packetSize?: number\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * A boolean determining whether to rollback a transaction automatically if any error is encountered during\n * the given transaction's execution. This sets the value for SET XACT_ABORT during the initial SQL phase\n * of a connection (documentation).\n */\n readonly abortTransactionOnError?: boolean\n\n /**\n * A string indicating which network interface (ip address) to use when connecting to SQL Server.\n */\n readonly localAddress?: string\n\n /**\n * A boolean determining whether to return rows as arrays or key-value collections. (default: false).\n */\n readonly useColumnNames?: boolean\n\n /**\n * A boolean, controlling whether the column names returned will have the first letter converted to lower case\n * (true) or not. This value is ignored if you provide a columnNameReplacer. (default: false).\n */\n readonly camelCaseColumns?: boolean\n\n /**\n * A boolean, controlling whatever to disable RETURNING / OUTPUT statements.\n */\n readonly disableOutputReturning?: boolean\n\n /**\n * A boolean, controlling whether MssqlParameter types char, varchar, and text are converted to their unicode equivalents, nchar, nvarchar, and ntext.\n * (default: false, meaning that char/varchar/text parameters will be converted to nchar/nvarchar/ntext)\n */\n readonly disableAsciiToUnicodeParamConversion?: boolean\n\n /**\n * Debug options\n */\n readonly debug?: {\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet details\n * (default: false).\n */\n readonly packet?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet data details\n * (default: false).\n */\n readonly data?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet payload details\n * (default: false).\n */\n readonly payload?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing token stream tokens\n * (default: false).\n */\n readonly token?: boolean\n }\n\n /**\n * The default isolation level that transactions will be run with. The isolation levels are available\n * from require('tedious').ISOLATION_LEVEL. (default: READ_COMMITTED).\n */\n readonly isolation?:\n | \"READ_UNCOMMITTED\"\n | \"READ_COMMITTED\"\n | \"REPEATABLE_READ\"\n | \"SERIALIZABLE\"\n | \"SNAPSHOT\"\n\n /**\n * The default isolation level for new connections. All out-of-transaction queries are executed with this\n * setting. The isolation levels are available from require('tedious').ISOLATION_LEVEL .\n */\n readonly connectionIsolationLevel?:\n | \"READ_UNCOMMITTED\"\n | \"READ_COMMITTED\"\n | \"REPEATABLE_READ\"\n | \"SERIALIZABLE\"\n | \"SNAPSHOT\"\n\n /**\n * A boolean, determining whether the connection will request read only access from a SQL Server\n * Availability Group. For more information, see here. (default: false).\n */\n readonly readOnlyIntent?: boolean\n\n /**\n * A boolean determining whether or not the connection will be encrypted. Set to true if you're on\n * Windows Azure. (default: true).\n */\n readonly encrypt?: boolean\n\n /**\n * When encryption is used, an object may be supplied that will be used for the first argument when calling\n * tls.createSecurePair (default: {}).\n */\n readonly cryptoCredentialsDetails?: any\n\n /**\n * A boolean, that when true will expose received rows in Requests' done* events. See done, doneInProc and\n * doneProc. (default: false)\n * Caution: If many row are received, enabling this option could result in excessive memory usage.\n */\n readonly rowCollectionOnDone?: boolean\n\n /**\n * A boolean, that when true will expose received rows in Requests' completion callback. See new Request. (default: false)\n * Caution: If many row are received, enabling this option could result in excessive memory usage.\n */\n readonly rowCollectionOnRequestCompletion?: boolean\n\n /**\n * The version of TDS to use. If server doesn't support specified version, negotiated version is used instead.\n * The versions are available from require('tedious').TDS_VERSION. (default: 7_4).\n */\n readonly tdsVersion?: string\n\n /**\n * A boolean, that when true will abort a query when an overflow or divide-by-zero error occurs during query execution.\n */\n readonly enableArithAbort?: boolean\n\n /**\n * Application name used for identifying a specific application in profiling, logging or tracing tools of SQL Server.\n * (default: node-mssql)\n */\n readonly appName?: string\n\n /**\n * A boolean, controlling whether encryption occurs if there is no verifiable server certificate.\n * (default: false)\n */\n readonly trustServerCertificate?: boolean\n }\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: SqlServerConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: SqlServerConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n readonly poolSize?: never\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/sqlserver/SqlServerConnectionOptions.ts"],"names":[],"mappings":"","file":"SqlServerConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { SqlServerConnectionCredentialsOptions } from \"./SqlServerConnectionCredentialsOptions\"\n\n/**\n * Microsoft Sql Server specific connection options.\n */\nexport interface SqlServerConnectionOptions\n extends BaseDataSourceOptions,\n SqlServerConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"mssql\"\n\n /**\n * Connection timeout in ms (default: 15000).\n */\n readonly connectionTimeout?: number\n\n /**\n * Request timeout in ms (default: 15000). NOTE: msnodesqlv8 driver doesn't support timeouts < 1 second.\n */\n readonly requestTimeout?: number\n\n /**\n * Stream recordsets/rows instead of returning them all at once as an argument of callback (default: false).\n * You can also enable streaming for each request independently (request.stream = true).\n * Always set to true if you plan to work with large amount of rows.\n */\n readonly stream?: boolean\n\n /**\n * Database schema.\n */\n readonly schema?: string\n\n /**\n * The driver object\n * This defaults to `require(\"mssql\")`\n */\n readonly driver?: any\n\n /**\n * An optional object/dictionary with the any of the properties\n */\n readonly pool?: {\n /**\n * Maximum number of resources to create at any given time. (default=1)\n */\n readonly max?: number\n\n /**\n * Minimum number of resources to keep in pool at any given time. If this is set >= max, the pool will silently\n * set the min to equal max. (default=0)\n */\n readonly min?: number\n\n /**\n * Maximum number of queued requests allowed, additional acquire calls will be callback with an err in a future\n * cycle of the event loop.\n */\n readonly maxWaitingClients?: number\n\n /**\n * Max milliseconds an acquire call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer.\n */\n readonly acquireTimeoutMillis?: number\n\n /**\n * If true the oldest resources will be first to be allocated. If false the most recently released resources will\n * be the first to be allocated. This in effect turns the pool's behaviour from a queue into a stack. boolean,\n * (default true)\n */\n readonly fifo?: boolean\n\n /**\n * Int between 1 and x - if set, borrowers can specify their relative priority in the queue if no resources\n * are available. see example. (default 1)\n */\n readonly priorityRange?: number\n\n /**\n * How often to run eviction checks. Default: 0 (does not run).\n */\n readonly evictionRunIntervalMillis?: number\n\n /**\n * Number of resources to check each eviction run. Default: 3.\n */\n readonly numTestsPerRun?: number\n\n /**\n * Amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object\n * evictor (if any), with the extra condition that at least \"min idle\" object instances remain in the pool.\n * Default -1 (nothing can get evicted)\n */\n readonly softIdleTimeoutMillis?: number\n\n /**\n * The minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due\n * to idle time. Supercedes softIdleTimeoutMillis Default: 30000\n */\n readonly idleTimeoutMillis?: number\n\n /*\n * Function handling errors thrown by drivers pool.\n * Defaults to logging error with `warn` level.\n */\n readonly errorHandler?: (err: any) => any\n }\n\n /**\n * Extra options\n */\n readonly options?: {\n /**\n * The named instance to connect to\n */\n readonly instanceName?: string\n\n /**\n * By default, if the database requestion by options.database cannot be accessed, the connection will fail with\n * an error. However, if options.fallbackToDefaultDb is set to true, then the user's default database will\n * be used instead (Default: false).\n */\n readonly fallbackToDefaultDb?: boolean\n\n /**\n * If true, SET ANSI_NULL_DFLT_ON ON will be set in the initial sql. This means new columns will be nullable by\n * default. See the T-SQL documentation for more details. (Default: true).\n */\n readonly enableAnsiNullDefault?: boolean\n\n /**\n * The number of milliseconds before the attempt to connect is considered failed (default: 15000).\n */\n readonly connectTimeout?: number\n\n /**\n * The number of milliseconds before the cancel (abort) of a request is considered failed (default: 5000).\n */\n readonly cancelTimeout?: number\n\n /**\n * The size of TDS packets (subject to negotiation with the server). Should be a power of 2. (default: 4096).\n */\n readonly packetSize?: number\n\n /**\n * A boolean determining whether to pass time values in UTC or local time. (default: false).\n */\n readonly useUTC?: boolean\n\n /**\n * A boolean determining whether to rollback a transaction automatically if any error is encountered during\n * the given transaction's execution. This sets the value for SET XACT_ABORT during the initial SQL phase\n * of a connection (documentation).\n */\n readonly abortTransactionOnError?: boolean\n\n /**\n * A string indicating which network interface (ip address) to use when connecting to SQL Server.\n */\n readonly localAddress?: string\n\n /**\n * A boolean determining whether to return rows as arrays or key-value collections. (default: false).\n */\n readonly useColumnNames?: boolean\n\n /**\n * A boolean, controlling whether the column names returned will have the first letter converted to lower case\n * (true) or not. This value is ignored if you provide a columnNameReplacer. (default: false).\n */\n readonly camelCaseColumns?: boolean\n\n /**\n * A boolean, controlling whatever to disable RETURNING / OUTPUT statements.\n */\n readonly disableOutputReturning?: boolean\n\n /**\n * A boolean, controlling whether MssqlParameter types char, varchar, and text are converted to their unicode equivalents, nchar, nvarchar, and ntext.\n * (default: false, meaning that char/varchar/text parameters will be converted to nchar/nvarchar/ntext)\n */\n readonly disableAsciiToUnicodeParamConversion?: boolean\n\n /**\n * Debug options\n */\n readonly debug?: {\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet details\n * (default: false).\n */\n readonly packet?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet data details\n * (default: false).\n */\n readonly data?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing packet payload details\n * (default: false).\n */\n readonly payload?: boolean\n\n /**\n * A boolean, controlling whether debug events will be emitted with text describing token stream tokens\n * (default: false).\n */\n readonly token?: boolean\n }\n\n /**\n * The default isolation level that transactions will be run with. The isolation levels are available\n * from require('tedious').ISOLATION_LEVEL. (default: READ_COMMITTED).\n */\n readonly isolation?:\n | \"READ_UNCOMMITTED\"\n | \"READ_COMMITTED\"\n | \"REPEATABLE_READ\"\n | \"SERIALIZABLE\"\n | \"SNAPSHOT\"\n\n /**\n * The default isolation level for new connections. All out-of-transaction queries are executed with this\n * setting. The isolation levels are available from require('tedious').ISOLATION_LEVEL .\n */\n readonly connectionIsolationLevel?:\n | \"READ_UNCOMMITTED\"\n | \"READ_COMMITTED\"\n | \"REPEATABLE_READ\"\n | \"SERIALIZABLE\"\n | \"SNAPSHOT\"\n\n /**\n * A boolean, determining whether the connection will request read only access from a SQL Server\n * Availability Group. For more information, see here. (default: false).\n */\n readonly readOnlyIntent?: boolean\n\n /**\n * A boolean determining whether or not the connection will be encrypted. Set to true if you're on\n * Windows Azure. (default: true).\n */\n readonly encrypt?: boolean\n\n /**\n * When encryption is used, an object may be supplied that will be used for the first argument when calling\n * tls.createSecurePair (default: {}).\n */\n readonly cryptoCredentialsDetails?: any\n\n /**\n * A boolean, that when true will expose received rows in Requests' done* events. See done, doneInProc and\n * doneProc. (default: false)\n * Caution: If many row are received, enabling this option could result in excessive memory usage.\n */\n readonly rowCollectionOnDone?: boolean\n\n /**\n * A boolean, that when true will expose received rows in Requests' completion callback. See new Request. (default: false)\n * Caution: If many row are received, enabling this option could result in excessive memory usage.\n */\n readonly rowCollectionOnRequestCompletion?: boolean\n\n /**\n * The version of TDS to use. If server doesn't support specified version, negotiated version is used instead.\n * The versions are available from require('tedious').TDS_VERSION. (default: 7_4).\n */\n readonly tdsVersion?: string\n\n /**\n * A boolean, that when true will abort a query when an overflow or divide-by-zero error occurs during query execution.\n */\n readonly enableArithAbort?: boolean\n\n /**\n * Application name used for identifying a specific application in profiling, logging or tracing tools of SQL Server.\n * (default: node-mssql)\n */\n readonly appName?: string\n\n /**\n * A boolean, controlling whether encryption occurs if there is no verifiable server certificate.\n * (default: false)\n */\n readonly trustServerCertificate?: boolean\n }\n\n /**\n * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: SqlServerConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: SqlServerConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\n\n readonly poolSize?: never\n}\n"],"sourceRoot":"../.."}
@@ -1,4 +1,3 @@
1
-
2
1
  import { ReadStream } from "../../platform/PlatformTools";
3
2
  import { BaseQueryRunner } from "../../query-runner/BaseQueryRunner";
4
3
  import { QueryRunner } from "../../query-runner/QueryRunner";
@@ -63,6 +63,8 @@ export declare class EntityManager {
63
63
  transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (entityManager: EntityManager) => Promise<T>): Promise<T>;
64
64
  /**
65
65
  * Executes raw SQL query and returns raw database results.
66
+ *
67
+ * @see [Official docs](https://typeorm.io/entity-manager-api) for examples.
66
68
  */
67
69
  query<T = any>(query: string, parameters?: any[]): Promise<T>;
68
70
  /**
@@ -87,6 +87,8 @@ export class EntityManager {
87
87
  }
88
88
  /**
89
89
  * Executes raw SQL query and returns raw database results.
90
+ *
91
+ * @see [Official docs](https://typeorm.io/entity-manager-api) for examples.
90
92
  */
91
93
  async query(query, parameters) {
92
94
  return this.connection.query(query, parameters, this.queryRunner);
@@ -690,7 +692,7 @@ export class EntityManager {
690
692
  throw new TypeORMError(`Column ${propertyPath} was not found in ${metadata.targetName} entity.`);
691
693
  if (isNaN(Number(value)))
692
694
  throw new TypeORMError(`Value "${value}" is not a number.`);
693
- // convert possible embeded path "social.likes" into object { social: { like: () => value } }
695
+ // convert possible embedded path "social.likes" into object { social: { like: () => value } }
694
696
  const values = propertyPath
695
697
  .split(".")
696
698
  .reduceRight((value, key) => ({ [key]: value }), () => this.connection.driver.escape(column.databaseName) +
@@ -712,7 +714,7 @@ export class EntityManager {
712
714
  throw new TypeORMError(`Column ${propertyPath} was not found in ${metadata.targetName} entity.`);
713
715
  if (isNaN(Number(value)))
714
716
  throw new TypeORMError(`Value "${value}" is not a number.`);
715
- // convert possible embeded path "social.likes" into object { social: { like: () => value } }
717
+ // convert possible embedded path "social.likes" into object { social: { like: () => value } }
716
718
  const values = propertyPath
717
719
  .split(".")
718
720
  .reduceRight((value, key) => ({ [key]: value }), () => this.connection.driver.escape(column.databaseName) +