typeorm 0.3.21-dev.bdd7bc8 → 0.3.21-dev.c293bd2

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 (81) hide show
  1. package/browser/data-source/DataSource.d.ts +2 -0
  2. package/browser/data-source/DataSource.js +2 -0
  3. package/browser/data-source/DataSource.js.map +1 -1
  4. package/browser/decorator/relations/OneToOne.d.ts +4 -4
  5. package/browser/decorator/relations/OneToOne.js +2 -2
  6. package/browser/decorator/relations/OneToOne.js.map +1 -1
  7. package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
  8. package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
  9. package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -1
  10. package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
  11. package/browser/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
  12. package/browser/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
  13. package/browser/driver/mongodb/MongoConnectionOptions.d.ts +1 -1
  14. package/browser/driver/mongodb/MongoConnectionOptions.js.map +1 -1
  15. package/browser/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
  16. package/browser/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
  17. package/browser/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
  18. package/browser/driver/mysql/MysqlConnectionOptions.js.map +1 -1
  19. package/browser/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
  20. package/browser/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
  21. package/browser/driver/oracle/OracleConnectionOptions.d.ts +1 -1
  22. package/browser/driver/oracle/OracleConnectionOptions.js.map +1 -1
  23. package/browser/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -1
  24. package/browser/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
  25. package/browser/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
  26. package/browser/driver/postgres/PostgresConnectionOptions.js.map +1 -1
  27. package/browser/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
  28. package/browser/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
  29. package/browser/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
  30. package/browser/driver/spanner/SpannerConnectionOptions.js.map +1 -1
  31. package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
  32. package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
  33. package/browser/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
  34. package/browser/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
  35. package/browser/entity-manager/EntityManager.d.ts +2 -0
  36. package/browser/entity-manager/EntityManager.js +4 -2
  37. package/browser/entity-manager/EntityManager.js.map +1 -1
  38. package/browser/repository/Repository.d.ts +2 -0
  39. package/browser/repository/Repository.js +2 -0
  40. package/browser/repository/Repository.js.map +1 -1
  41. package/data-source/DataSource.d.ts +2 -0
  42. package/data-source/DataSource.js +2 -0
  43. package/data-source/DataSource.js.map +1 -1
  44. package/decorator/relations/OneToOne.d.ts +4 -4
  45. package/decorator/relations/OneToOne.js +2 -2
  46. package/decorator/relations/OneToOne.js.map +1 -1
  47. package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
  48. package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
  49. package/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -1
  50. package/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
  51. package/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
  52. package/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
  53. package/driver/mongodb/MongoConnectionOptions.d.ts +1 -1
  54. package/driver/mongodb/MongoConnectionOptions.js.map +1 -1
  55. package/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
  56. package/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
  57. package/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
  58. package/driver/mysql/MysqlConnectionOptions.js.map +1 -1
  59. package/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
  60. package/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
  61. package/driver/oracle/OracleConnectionOptions.d.ts +1 -1
  62. package/driver/oracle/OracleConnectionOptions.js.map +1 -1
  63. package/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -1
  64. package/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
  65. package/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
  66. package/driver/postgres/PostgresConnectionOptions.js.map +1 -1
  67. package/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
  68. package/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
  69. package/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
  70. package/driver/spanner/SpannerConnectionOptions.js.map +1 -1
  71. package/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
  72. package/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
  73. package/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
  74. package/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
  75. package/entity-manager/EntityManager.d.ts +2 -0
  76. package/entity-manager/EntityManager.js +4 -2
  77. package/entity-manager/EntityManager.js.map +1 -1
  78. package/package.json +1 -1
  79. package/repository/Repository.d.ts +2 -0
  80. package/repository/Repository.js +2 -0
  81. package/repository/Repository.js.map +1 -1
@@ -214,6 +214,8 @@ export declare class DataSource {
214
214
  transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (entityManager: EntityManager) => Promise<T>): Promise<T>;
215
215
  /**
216
216
  * Executes raw SQL query and returns raw database results.
217
+ *
218
+ * @see [Official docs](https://typeorm.io/data-source-api) for examples.
217
219
  */
218
220
  query<T = any>(query: string, parameters?: any[], queryRunner?: QueryRunner): Promise<T>;
219
221
  /**
@@ -336,6 +336,8 @@ export class DataSource {
336
336
  }
337
337
  /**
338
338
  * Executes raw SQL query and returns raw database results.
339
+ *
340
+ * @see [Official docs](https://typeorm.io/data-source-api) for examples.
339
341
  */
340
342
  async query(query, parameters, queryRunner) {
341
343
  if (InstanceChecker.isMongoEntityManager(this.manager))
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/data-source/DataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAMxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EACH,kCAAkC,EAClC,8BAA8B,EAC9B,2BAA2B,EAC3B,uCAAuC,EACvC,YAAY,GACf,MAAM,UAAU,CAAA;AAMjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIlE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAA;AAErF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAA;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAG1E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;A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QAC1B,IAAI,aAAa,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACvC,MAAM,KAAK,GACP,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAGvB,CAAC,WAAW,CAAA;YACb,IAAI,KAAK,EAAE,CAAC;gBACR,OAAO,KAAK,CAAA;YAChB,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAA;IAClB,CAAC;CACJ","file":"DataSource.js","sourcesContent":["import { Driver } from \"../driver/Driver\"\nimport { registerQueryBuilders } from \"../query-builder\"\nimport { Repository } from \"../repository/Repository\"\nimport { EntitySubscriberInterface } from \"../subscriber/EntitySubscriberInterface\"\nimport { EntityTarget } from \"../common/EntityTarget\"\nimport { ObjectType } from \"../common/ObjectType\"\nimport { EntityManager } from \"../entity-manager/EntityManager\"\nimport { DefaultNamingStrategy } from \"../naming-strategy/DefaultNamingStrategy\"\nimport {\n CannotConnectAlreadyConnectedError,\n CannotExecuteNotConnectedError,\n EntityMetadataNotFoundError,\n QueryRunnerProviderAlreadyReleasedError,\n TypeORMError,\n} from \"../error\"\nimport { TreeRepository } from \"../repository/TreeRepository\"\nimport { NamingStrategyInterface } from \"../naming-strategy/NamingStrategyInterface\"\nimport { EntityMetadata } from \"../metadata/EntityMetadata\"\nimport { Logger } from \"../logger/Logger\"\nimport { MigrationInterface } from \"../migration/MigrationInterface\"\nimport { MigrationExecutor } from \"../migration/MigrationExecutor\"\nimport { Migration } from \"../migration/Migration\"\nimport { MongoRepository } from \"../repository/MongoRepository\"\nimport { MongoEntityManager } from \"../entity-manager/MongoEntityManager\"\nimport { EntityMetadataValidator } from \"../metadata-builder/EntityMetadataValidator\"\nimport { DataSourceOptions } from \"./DataSourceOptions\"\nimport { EntityManagerFactory } from \"../entity-manager/EntityManagerFactory\"\nimport { DriverFactory } from \"../driver/DriverFactory\"\nimport { ConnectionMetadataBuilder } from \"../connection/ConnectionMetadataBuilder\"\nimport { QueryRunner } from \"../query-runner/QueryRunner\"\nimport { SelectQueryBuilder } from \"../query-builder/SelectQueryBuilder\"\nimport { LoggerFactory } from \"../logger/LoggerFactory\"\nimport { QueryResultCacheFactory } from \"../cache/QueryResultCacheFactory\"\nimport { QueryResultCache } from \"../cache/QueryResultCache\"\nimport { SqljsEntityManager } from \"../entity-manager/SqljsEntityManager\"\nimport { RelationLoader } from \"../query-builder/RelationLoader\"\nimport { ObjectUtils } from \"../util/ObjectUtils\"\nimport { IsolationLevel } from \"../driver/types/IsolationLevel\"\nimport { ReplicationMode } from \"../driver/types/ReplicationMode\"\nimport { RelationIdLoader } from \"../query-builder/RelationIdLoader\"\nimport { DriverUtils } from \"../driver/DriverUtils\"\nimport { InstanceChecker } from \"../util/InstanceChecker\"\nimport { ObjectLiteral } from \"../common/ObjectLiteral\"\n\nregisterQueryBuilders()\n\n/**\n * DataSource is a pre-defined connection configuration to a specific database.\n * You can have multiple data sources connected (with multiple connections in it),\n * connected to multiple databases in your application.\n *\n * Before, it was called `Connection`, but now `Connection` is deprecated\n * because `Connection` isn't the best name for what it's actually is.\n */\nexport class DataSource {\n readonly \"@instanceof\" = Symbol.for(\"DataSource\")\n\n // -------------------------------------------------------------------------\n // Public Readonly Properties\n // -------------------------------------------------------------------------\n\n /**\n * Connection name.\n *\n * @deprecated we don't need names anymore since we are going to drop all related methods relying on this property.\n */\n readonly name: string\n\n /**\n * Connection options.\n */\n readonly options: DataSourceOptions\n\n /**\n * Indicates if DataSource is initialized or not.\n */\n readonly isInitialized: boolean\n\n /**\n * Database driver used by this connection.\n */\n driver: Driver\n\n /**\n * EntityManager of this connection.\n */\n readonly manager: EntityManager\n\n /**\n * Naming strategy used in the connection.\n */\n namingStrategy: NamingStrategyInterface\n\n /**\n * Name for the metadata table\n */\n readonly metadataTableName: string\n\n /**\n * Logger used to log orm events.\n */\n logger: Logger\n\n /**\n * Migration instances that are registered for this connection.\n */\n readonly migrations: MigrationInterface[] = []\n\n /**\n * Entity subscriber instances that are registered for this connection.\n */\n readonly subscribers: EntitySubscriberInterface<any>[] = []\n\n /**\n * All entity metadatas that are registered for this connection.\n */\n readonly entityMetadatas: EntityMetadata[] = []\n\n /**\n * All entity metadatas that are registered for this connection.\n * This is a copy of #.entityMetadatas property -> used for more performant searches.\n */\n readonly entityMetadatasMap = new Map<EntityTarget<any>, EntityMetadata>()\n\n /**\n * Used to work with query result cache.\n */\n queryResultCache?: QueryResultCache\n\n /**\n * Used to load relations and work with lazy relations.\n */\n readonly relationLoader: RelationLoader\n\n readonly relationIdLoader: RelationIdLoader\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(options: DataSourceOptions) {\n registerQueryBuilders()\n this.name = options.name || \"default\"\n this.options = options\n this.logger = new LoggerFactory().create(\n this.options.logger,\n this.options.logging,\n )\n this.driver = new DriverFactory().create(this)\n this.manager = this.createEntityManager()\n this.namingStrategy =\n options.namingStrategy || new DefaultNamingStrategy()\n this.metadataTableName = options.metadataTableName || \"typeorm_metadata\"\n this.queryResultCache = options.cache\n ? new QueryResultCacheFactory(this).create()\n : undefined\n this.relationLoader = new RelationLoader(this)\n this.relationIdLoader = new RelationIdLoader(this)\n this.isInitialized = false\n }\n\n // -------------------------------------------------------------------------\n // Public Accessors\n // -------------------------------------------------------------------------\n\n /**\n Indicates if DataSource is initialized or not.\n *\n * @deprecated use .isInitialized instead\n */\n get isConnected() {\n return this.isInitialized\n }\n\n /**\n * Gets the mongodb entity manager that allows to perform mongodb-specific repository operations\n * with any entity in this connection.\n *\n * Available only in mongodb connections.\n */\n get mongoManager(): MongoEntityManager {\n if (!InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(\n `MongoEntityManager is only available for MongoDB databases.`,\n )\n\n return this.manager as MongoEntityManager\n }\n\n /**\n * Gets a sql.js specific Entity Manager that allows to perform special load and save operations\n *\n * Available only in connection with the sqljs driver.\n */\n get sqljsManager(): SqljsEntityManager {\n if (!InstanceChecker.isSqljsEntityManager(this.manager))\n throw new TypeORMError(\n `SqljsEntityManager is only available for Sqljs databases.`,\n )\n\n return this.manager\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n /**\n * Updates current connection options with provided options.\n */\n setOptions(options: Partial<DataSourceOptions>): this {\n Object.assign(this.options, options)\n\n if (options.logger || options.logging) {\n this.logger = new LoggerFactory().create(\n options.logger || this.options.logger,\n options.logging || this.options.logging,\n )\n }\n\n if (options.namingStrategy) {\n this.namingStrategy = options.namingStrategy\n }\n\n if (options.cache) {\n this.queryResultCache = new QueryResultCacheFactory(this).create()\n }\n\n // todo: we must update the database in the driver as well, if it was set by setOptions method\n // in the future we need to refactor the code and remove \"database\" from the driver, and instead\n // use database (and options) from a single place - data source.\n if (options.database) {\n this.driver.database = DriverUtils.buildDriverOptions(\n this.options,\n ).database\n }\n\n // todo: need to take a look if we need to update schema and other \"poor\" properties\n\n return this\n }\n\n /**\n * Performs connection to the database.\n * This method should be called once on application bootstrap.\n * This method not necessarily creates database connection (depend on database type),\n * but it also can setup a connection pool with database to use.\n */\n async initialize(): Promise<this> {\n if (this.isInitialized)\n throw new CannotConnectAlreadyConnectedError(this.name)\n\n // connect to the database via its driver\n await this.driver.connect()\n\n // connect to the cache-specific database if cache is enabled\n if (this.queryResultCache) await this.queryResultCache.connect()\n\n // set connected status for the current connection\n ObjectUtils.assign(this, { isInitialized: true })\n\n try {\n // build all metadatas registered in the current connection\n await this.buildMetadatas()\n\n await this.driver.afterConnect()\n\n // if option is set - drop schema once connection is done\n if (this.options.dropSchema) await this.dropDatabase()\n\n // if option is set - automatically synchronize a schema\n if (this.options.migrationsRun)\n await this.runMigrations({\n transaction: this.options.migrationsTransactionMode,\n })\n\n // if option is set - automatically synchronize a schema\n if (this.options.synchronize) await this.synchronize()\n } catch (error) {\n // if for some reason build metadata fail (for example validation error during entity metadata check)\n // connection needs to be closed\n await this.destroy()\n throw error\n }\n\n return this\n }\n\n /**\n * Performs connection to the database.\n * This method should be called once on application bootstrap.\n * This method not necessarily creates database connection (depend on database type),\n * but it also can setup a connection pool with database to use.\n *\n * @deprecated use .initialize method instead\n */\n async connect(): Promise<this> {\n return this.initialize()\n }\n\n /**\n * Closes connection with the database.\n * Once connection is closed, you cannot use repositories or perform any operations except opening connection again.\n */\n async destroy(): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n await this.driver.disconnect()\n\n // disconnect from the cache-specific database if cache was enabled\n if (this.queryResultCache) await this.queryResultCache.disconnect()\n\n ObjectUtils.assign(this, { isInitialized: false })\n }\n\n /**\n * Closes connection with the database.\n * Once connection is closed, you cannot use repositories or perform any operations except opening connection again.\n *\n * @deprecated use .destroy method instead\n */\n async close(): Promise<void> {\n return this.destroy()\n }\n\n /**\n * Creates database schema for all entities registered in this connection.\n * Can be used only after connection to the database is established.\n *\n * @param dropBeforeSync If set to true then it drops the database with all its tables and data\n */\n async synchronize(dropBeforeSync: boolean = false): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n if (dropBeforeSync) await this.dropDatabase()\n\n const schemaBuilder = this.driver.createSchemaBuilder()\n await schemaBuilder.build()\n }\n\n /**\n * Drops the database and all its data.\n * Be careful with this method on production since this method will erase all your database tables and their data.\n * Can be used only after connection to the database is established.\n */\n // TODO rename\n async dropDatabase(): Promise<void> {\n const queryRunner = this.createQueryRunner()\n try {\n if (\n this.driver.options.type === \"mssql\" ||\n DriverUtils.isMySQLFamily(this.driver) ||\n this.driver.options.type === \"aurora-mysql\" ||\n DriverUtils.isSQLiteFamily(this.driver)\n ) {\n const databases: string[] = []\n this.entityMetadatas.forEach((metadata) => {\n if (\n metadata.database &&\n databases.indexOf(metadata.database) === -1\n )\n databases.push(metadata.database)\n })\n if (databases.length === 0 && this.driver.database) {\n databases.push(this.driver.database)\n }\n\n if (databases.length === 0) {\n await queryRunner.clearDatabase()\n } else {\n for (const database of databases) {\n await queryRunner.clearDatabase(database)\n }\n }\n } else {\n await queryRunner.clearDatabase()\n }\n } finally {\n await queryRunner.release()\n }\n }\n\n /**\n * Runs all pending migrations.\n * Can be used only after connection to the database is established.\n */\n async runMigrations(options?: {\n transaction?: \"all\" | \"none\" | \"each\"\n fake?: boolean\n }): Promise<Migration[]> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n const migrationExecutor = new MigrationExecutor(this)\n migrationExecutor.transaction =\n options?.transaction ||\n this.options?.migrationsTransactionMode ||\n \"all\"\n migrationExecutor.fake = (options && options.fake) || false\n\n const successMigrations =\n await migrationExecutor.executePendingMigrations()\n return successMigrations\n }\n\n /**\n * Reverts last executed migration.\n * Can be used only after connection to the database is established.\n */\n async undoLastMigration(options?: {\n transaction?: \"all\" | \"none\" | \"each\"\n fake?: boolean\n }): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n const migrationExecutor = new MigrationExecutor(this)\n migrationExecutor.transaction =\n (options && options.transaction) || \"all\"\n migrationExecutor.fake = (options && options.fake) || false\n\n await migrationExecutor.undoLastMigration()\n }\n\n /**\n * Lists all migrations and whether they have been run.\n * Returns true if there are pending migrations\n */\n async showMigrations(): Promise<boolean> {\n if (!this.isInitialized) {\n throw new CannotExecuteNotConnectedError(this.name)\n }\n const migrationExecutor = new MigrationExecutor(this)\n return await migrationExecutor.showMigrations()\n }\n\n /**\n * Checks if entity metadata exist for the given entity class, target name or table name.\n */\n hasMetadata(target: EntityTarget<any>): boolean {\n return !!this.findMetadata(target)\n }\n\n /**\n * Gets entity metadata for the given entity class or schema name.\n */\n getMetadata(target: EntityTarget<any>): EntityMetadata {\n const metadata = this.findMetadata(target)\n if (!metadata) throw new EntityMetadataNotFoundError(target)\n\n return metadata\n }\n\n /**\n * Gets repository for the given entity.\n */\n getRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): Repository<Entity> {\n return this.manager.getRepository(target)\n }\n\n /**\n * Gets tree repository for the given entity class or name.\n * Only tree-type entities can have a TreeRepository, like ones decorated with @Tree decorator.\n */\n getTreeRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): TreeRepository<Entity> {\n return this.manager.getTreeRepository(target)\n }\n\n /**\n * Gets mongodb-specific repository for the given entity class or name.\n * Works only if connection is mongodb-specific.\n */\n getMongoRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): MongoRepository<Entity> {\n if (!(this.driver.options.type === \"mongodb\"))\n throw new TypeORMError(\n `You can use getMongoRepository only for MongoDB connections.`,\n )\n\n return this.manager.getRepository(target) as any\n }\n\n /**\n * Gets custom entity repository marked with @EntityRepository decorator.\n *\n * @deprecated use Repository.extend function to create a custom repository\n */\n getCustomRepository<T>(customRepository: ObjectType<T>): T {\n return this.manager.getCustomRepository(customRepository)\n }\n\n /**\n * Wraps given function execution (and all operations made there) into a transaction.\n * All database operations must be executed using provided entity manager.\n */\n async transaction<T>(\n runInTransaction: (entityManager: EntityManager) => Promise<T>,\n ): Promise<T>\n async transaction<T>(\n isolationLevel: IsolationLevel,\n runInTransaction: (entityManager: EntityManager) => Promise<T>,\n ): Promise<T>\n async transaction<T>(\n isolationOrRunInTransaction:\n | IsolationLevel\n | ((entityManager: EntityManager) => Promise<T>),\n runInTransactionParam?: (entityManager: EntityManager) => Promise<T>,\n ): Promise<any> {\n return this.manager.transaction(\n isolationOrRunInTransaction as any,\n runInTransactionParam as any,\n )\n }\n\n /**\n * Executes raw SQL query and returns raw database results.\n */\n async query<T = any>(\n query: string,\n parameters?: any[],\n queryRunner?: QueryRunner,\n ): Promise<T> {\n if (InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(`Queries aren't supported by MongoDB.`)\n\n if (queryRunner && queryRunner.isReleased)\n throw new QueryRunnerProviderAlreadyReleasedError()\n\n const usedQueryRunner = queryRunner || this.createQueryRunner()\n\n try {\n return await usedQueryRunner.query(query, parameters) // await is needed here because we are using finally\n } finally {\n if (!queryRunner) await usedQueryRunner.release()\n }\n }\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder<Entity extends ObjectLiteral>(\n entityClass: EntityTarget<Entity>,\n alias: string,\n queryRunner?: QueryRunner,\n ): SelectQueryBuilder<Entity>\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder(queryRunner?: QueryRunner): SelectQueryBuilder<any>\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder<Entity extends ObjectLiteral>(\n entityOrRunner?: EntityTarget<Entity> | QueryRunner,\n alias?: string,\n queryRunner?: QueryRunner,\n ): SelectQueryBuilder<Entity> {\n if (InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(`Query Builder is not supported by MongoDB.`)\n\n if (alias) {\n alias = DriverUtils.buildAlias(this.driver, undefined, alias)\n const metadata = this.getMetadata(\n entityOrRunner as EntityTarget<Entity>,\n )\n return new SelectQueryBuilder(this, queryRunner)\n .select(alias)\n .from(metadata.target, alias)\n } else {\n return new SelectQueryBuilder(\n this,\n entityOrRunner as QueryRunner | undefined,\n )\n }\n }\n\n /**\n * Creates a query runner used for perform queries on a single database connection.\n * Using query runners you can control your queries to execute using single database connection and\n * manually control your database transaction.\n *\n * Mode is used in replication mode and indicates whatever you want to connect\n * to master database or any of slave databases.\n * If you perform writes you must use master database,\n * if you perform reads you can use slave databases.\n */\n createQueryRunner(mode: ReplicationMode = \"master\"): QueryRunner {\n const queryRunner = this.driver.createQueryRunner(mode)\n const manager = this.createEntityManager(queryRunner)\n Object.assign(queryRunner, { manager: manager })\n return queryRunner\n }\n\n /**\n * Gets entity metadata of the junction table (many-to-many table).\n */\n getManyToManyMetadata(\n entityTarget: EntityTarget<any>,\n relationPropertyPath: string,\n ) {\n const relationMetadata =\n this.getMetadata(entityTarget).findRelationWithPropertyPath(\n relationPropertyPath,\n )\n if (!relationMetadata)\n throw new TypeORMError(\n `Relation \"${relationPropertyPath}\" was not found in ${entityTarget} entity.`,\n )\n if (!relationMetadata.isManyToMany)\n throw new TypeORMError(\n `Relation \"${entityTarget}#${relationPropertyPath}\" does not have a many-to-many relationship.` +\n `You can use this method only on many-to-many relations.`,\n )\n\n return relationMetadata.junctionEntityMetadata\n }\n\n /**\n * Creates an Entity Manager for the current connection with the help of the EntityManagerFactory.\n */\n createEntityManager(queryRunner?: QueryRunner): EntityManager {\n return new EntityManagerFactory().create(this, queryRunner)\n }\n\n // -------------------------------------------------------------------------\n // Protected Methods\n // -------------------------------------------------------------------------\n\n /**\n * Finds exist entity metadata by the given entity class, target name or table name.\n */\n protected findMetadata(\n target: EntityTarget<any>,\n ): EntityMetadata | undefined {\n const metadataFromMap = this.entityMetadatasMap.get(target)\n if (metadataFromMap) return metadataFromMap\n\n for (let [_, metadata] of this.entityMetadatasMap) {\n if (\n InstanceChecker.isEntitySchema(target) &&\n metadata.name === target.options.name\n ) {\n return metadata\n }\n if (typeof target === \"string\") {\n if (target.indexOf(\".\") !== -1) {\n if (metadata.tablePath === target) {\n return metadata\n }\n } else {\n if (\n metadata.name === target ||\n metadata.tableName === target\n ) {\n return metadata\n }\n }\n }\n if (\n ObjectUtils.isObjectWithName(target) &&\n typeof target.name === \"string\"\n ) {\n if (target.name.indexOf(\".\") !== -1) {\n if (metadata.tablePath === target.name) {\n return metadata\n }\n } else {\n if (\n metadata.name === target.name ||\n metadata.tableName === target.name\n ) {\n return metadata\n }\n }\n }\n }\n\n return undefined\n }\n\n /**\n * Builds metadatas for all registered classes inside this connection.\n */\n protected async buildMetadatas(): Promise<void> {\n const connectionMetadataBuilder = new ConnectionMetadataBuilder(this)\n const entityMetadataValidator = new EntityMetadataValidator()\n\n // create subscribers instances if they are not disallowed from high-level (for example they can disallowed from migrations run process)\n const flattenedSubscribers = ObjectUtils.mixedListToArray(\n this.options.subscribers || [],\n )\n const subscribers = await connectionMetadataBuilder.buildSubscribers(\n flattenedSubscribers,\n )\n ObjectUtils.assign(this, { subscribers: subscribers })\n\n // build entity metadatas\n const flattenedEntities = ObjectUtils.mixedListToArray(\n this.options.entities || [],\n )\n const entityMetadatas =\n await connectionMetadataBuilder.buildEntityMetadatas(\n flattenedEntities,\n )\n ObjectUtils.assign(this, {\n entityMetadatas: entityMetadatas,\n entityMetadatasMap: new Map(\n entityMetadatas.map((metadata) => [metadata.target, metadata]),\n ),\n })\n\n // create migration instances\n const flattenedMigrations = ObjectUtils.mixedListToArray(\n this.options.migrations || [],\n )\n const migrations = await connectionMetadataBuilder.buildMigrations(\n flattenedMigrations,\n )\n ObjectUtils.assign(this, { migrations: migrations })\n\n // validate all created entity metadatas to make sure user created entities are valid and correct\n entityMetadataValidator.validateMany(\n this.entityMetadatas.filter(\n (metadata) => metadata.tableType !== \"view\",\n ),\n this.driver,\n )\n\n // set current data source to the entities\n for (let entityMetadata of entityMetadatas) {\n if (\n InstanceChecker.isBaseEntityConstructor(entityMetadata.target)\n ) {\n entityMetadata.target.useDataSource(this)\n }\n }\n }\n\n /**\n * Get the replication mode SELECT queries should use for this datasource by default\n */\n defaultReplicationModeForReads(): ReplicationMode {\n if (\"replication\" in this.driver.options) {\n const value = (\n this.driver.options.replication as {\n defaultMode?: ReplicationMode\n }\n ).defaultMode\n if (value) {\n return value\n }\n }\n return \"slave\"\n }\n}\n"],"sourceRoot":".."}
1
+ {"version":3,"sources":["../browser/src/data-source/DataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAMxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EACH,kCAAkC,EAClC,8BAA8B,EAC9B,2BAA2B,EAC3B,uCAAuC,EACvC,YAAY,GACf,MAAM,UAAU,CAAA;AAMjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIlE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAA;AAErF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC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,UAAU,EAAE,CAAC,CAAA;QAEpD,iGAAiG;QACjG,uBAAuB,CAAC,YAAY,CAChC,IAAI,CAAC,eAAe,CAAC,MAAM,CACvB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,KAAK,MAAM,CAC9C,EACD,IAAI,CAAC,MAAM,CACd,CAAA;QAED,0CAA0C;QAC1C,KAAK,IAAI,cAAc,IAAI,eAAe,EAAE,CAAC;YACzC,IACI,eAAe,CAAC,uBAAuB,CAAC,cAAc,CAAC,MAAM,CAAC,EAChE,CAAC;gBACC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;IAED;;OAEG;IACH,8BAA8B;QAC1B,IAAI,aAAa,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACvC,MAAM,KAAK,GACP,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAGvB,CAAC,WAAW,CAAA;YACb,IAAI,KAAK,EAAE,CAAC;gBACR,OAAO,KAAK,CAAA;YAChB,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAA;IAClB,CAAC;CACJ","file":"DataSource.js","sourcesContent":["import { Driver } from \"../driver/Driver\"\nimport { registerQueryBuilders } from \"../query-builder\"\nimport { Repository } from \"../repository/Repository\"\nimport { EntitySubscriberInterface } from \"../subscriber/EntitySubscriberInterface\"\nimport { EntityTarget } from \"../common/EntityTarget\"\nimport { ObjectType } from \"../common/ObjectType\"\nimport { EntityManager } from \"../entity-manager/EntityManager\"\nimport { DefaultNamingStrategy } from \"../naming-strategy/DefaultNamingStrategy\"\nimport {\n CannotConnectAlreadyConnectedError,\n CannotExecuteNotConnectedError,\n EntityMetadataNotFoundError,\n QueryRunnerProviderAlreadyReleasedError,\n TypeORMError,\n} from \"../error\"\nimport { TreeRepository } from \"../repository/TreeRepository\"\nimport { NamingStrategyInterface } from \"../naming-strategy/NamingStrategyInterface\"\nimport { EntityMetadata } from \"../metadata/EntityMetadata\"\nimport { Logger } from \"../logger/Logger\"\nimport { MigrationInterface } from \"../migration/MigrationInterface\"\nimport { MigrationExecutor } from \"../migration/MigrationExecutor\"\nimport { Migration } from \"../migration/Migration\"\nimport { MongoRepository } from \"../repository/MongoRepository\"\nimport { MongoEntityManager } from \"../entity-manager/MongoEntityManager\"\nimport { EntityMetadataValidator } from \"../metadata-builder/EntityMetadataValidator\"\nimport { DataSourceOptions } from \"./DataSourceOptions\"\nimport { EntityManagerFactory } from \"../entity-manager/EntityManagerFactory\"\nimport { DriverFactory } from \"../driver/DriverFactory\"\nimport { ConnectionMetadataBuilder } from \"../connection/ConnectionMetadataBuilder\"\nimport { QueryRunner } from \"../query-runner/QueryRunner\"\nimport { SelectQueryBuilder } from \"../query-builder/SelectQueryBuilder\"\nimport { LoggerFactory } from \"../logger/LoggerFactory\"\nimport { QueryResultCacheFactory } from \"../cache/QueryResultCacheFactory\"\nimport { QueryResultCache } from \"../cache/QueryResultCache\"\nimport { SqljsEntityManager } from \"../entity-manager/SqljsEntityManager\"\nimport { RelationLoader } from \"../query-builder/RelationLoader\"\nimport { ObjectUtils } from \"../util/ObjectUtils\"\nimport { IsolationLevel } from \"../driver/types/IsolationLevel\"\nimport { ReplicationMode } from \"../driver/types/ReplicationMode\"\nimport { RelationIdLoader } from \"../query-builder/RelationIdLoader\"\nimport { DriverUtils } from \"../driver/DriverUtils\"\nimport { InstanceChecker } from \"../util/InstanceChecker\"\nimport { ObjectLiteral } from \"../common/ObjectLiteral\"\n\nregisterQueryBuilders()\n\n/**\n * DataSource is a pre-defined connection configuration to a specific database.\n * You can have multiple data sources connected (with multiple connections in it),\n * connected to multiple databases in your application.\n *\n * Before, it was called `Connection`, but now `Connection` is deprecated\n * because `Connection` isn't the best name for what it's actually is.\n */\nexport class DataSource {\n readonly \"@instanceof\" = Symbol.for(\"DataSource\")\n\n // -------------------------------------------------------------------------\n // Public Readonly Properties\n // -------------------------------------------------------------------------\n\n /**\n * Connection name.\n *\n * @deprecated we don't need names anymore since we are going to drop all related methods relying on this property.\n */\n readonly name: string\n\n /**\n * Connection options.\n */\n readonly options: DataSourceOptions\n\n /**\n * Indicates if DataSource is initialized or not.\n */\n readonly isInitialized: boolean\n\n /**\n * Database driver used by this connection.\n */\n driver: Driver\n\n /**\n * EntityManager of this connection.\n */\n readonly manager: EntityManager\n\n /**\n * Naming strategy used in the connection.\n */\n namingStrategy: NamingStrategyInterface\n\n /**\n * Name for the metadata table\n */\n readonly metadataTableName: string\n\n /**\n * Logger used to log orm events.\n */\n logger: Logger\n\n /**\n * Migration instances that are registered for this connection.\n */\n readonly migrations: MigrationInterface[] = []\n\n /**\n * Entity subscriber instances that are registered for this connection.\n */\n readonly subscribers: EntitySubscriberInterface<any>[] = []\n\n /**\n * All entity metadatas that are registered for this connection.\n */\n readonly entityMetadatas: EntityMetadata[] = []\n\n /**\n * All entity metadatas that are registered for this connection.\n * This is a copy of #.entityMetadatas property -> used for more performant searches.\n */\n readonly entityMetadatasMap = new Map<EntityTarget<any>, EntityMetadata>()\n\n /**\n * Used to work with query result cache.\n */\n queryResultCache?: QueryResultCache\n\n /**\n * Used to load relations and work with lazy relations.\n */\n readonly relationLoader: RelationLoader\n\n readonly relationIdLoader: RelationIdLoader\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(options: DataSourceOptions) {\n registerQueryBuilders()\n this.name = options.name || \"default\"\n this.options = options\n this.logger = new LoggerFactory().create(\n this.options.logger,\n this.options.logging,\n )\n this.driver = new DriverFactory().create(this)\n this.manager = this.createEntityManager()\n this.namingStrategy =\n options.namingStrategy || new DefaultNamingStrategy()\n this.metadataTableName = options.metadataTableName || \"typeorm_metadata\"\n this.queryResultCache = options.cache\n ? new QueryResultCacheFactory(this).create()\n : undefined\n this.relationLoader = new RelationLoader(this)\n this.relationIdLoader = new RelationIdLoader(this)\n this.isInitialized = false\n }\n\n // -------------------------------------------------------------------------\n // Public Accessors\n // -------------------------------------------------------------------------\n\n /**\n Indicates if DataSource is initialized or not.\n *\n * @deprecated use .isInitialized instead\n */\n get isConnected() {\n return this.isInitialized\n }\n\n /**\n * Gets the mongodb entity manager that allows to perform mongodb-specific repository operations\n * with any entity in this connection.\n *\n * Available only in mongodb connections.\n */\n get mongoManager(): MongoEntityManager {\n if (!InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(\n `MongoEntityManager is only available for MongoDB databases.`,\n )\n\n return this.manager as MongoEntityManager\n }\n\n /**\n * Gets a sql.js specific Entity Manager that allows to perform special load and save operations\n *\n * Available only in connection with the sqljs driver.\n */\n get sqljsManager(): SqljsEntityManager {\n if (!InstanceChecker.isSqljsEntityManager(this.manager))\n throw new TypeORMError(\n `SqljsEntityManager is only available for Sqljs databases.`,\n )\n\n return this.manager\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n /**\n * Updates current connection options with provided options.\n */\n setOptions(options: Partial<DataSourceOptions>): this {\n Object.assign(this.options, options)\n\n if (options.logger || options.logging) {\n this.logger = new LoggerFactory().create(\n options.logger || this.options.logger,\n options.logging || this.options.logging,\n )\n }\n\n if (options.namingStrategy) {\n this.namingStrategy = options.namingStrategy\n }\n\n if (options.cache) {\n this.queryResultCache = new QueryResultCacheFactory(this).create()\n }\n\n // todo: we must update the database in the driver as well, if it was set by setOptions method\n // in the future we need to refactor the code and remove \"database\" from the driver, and instead\n // use database (and options) from a single place - data source.\n if (options.database) {\n this.driver.database = DriverUtils.buildDriverOptions(\n this.options,\n ).database\n }\n\n // todo: need to take a look if we need to update schema and other \"poor\" properties\n\n return this\n }\n\n /**\n * Performs connection to the database.\n * This method should be called once on application bootstrap.\n * This method not necessarily creates database connection (depend on database type),\n * but it also can setup a connection pool with database to use.\n */\n async initialize(): Promise<this> {\n if (this.isInitialized)\n throw new CannotConnectAlreadyConnectedError(this.name)\n\n // connect to the database via its driver\n await this.driver.connect()\n\n // connect to the cache-specific database if cache is enabled\n if (this.queryResultCache) await this.queryResultCache.connect()\n\n // set connected status for the current connection\n ObjectUtils.assign(this, { isInitialized: true })\n\n try {\n // build all metadatas registered in the current connection\n await this.buildMetadatas()\n\n await this.driver.afterConnect()\n\n // if option is set - drop schema once connection is done\n if (this.options.dropSchema) await this.dropDatabase()\n\n // if option is set - automatically synchronize a schema\n if (this.options.migrationsRun)\n await this.runMigrations({\n transaction: this.options.migrationsTransactionMode,\n })\n\n // if option is set - automatically synchronize a schema\n if (this.options.synchronize) await this.synchronize()\n } catch (error) {\n // if for some reason build metadata fail (for example validation error during entity metadata check)\n // connection needs to be closed\n await this.destroy()\n throw error\n }\n\n return this\n }\n\n /**\n * Performs connection to the database.\n * This method should be called once on application bootstrap.\n * This method not necessarily creates database connection (depend on database type),\n * but it also can setup a connection pool with database to use.\n *\n * @deprecated use .initialize method instead\n */\n async connect(): Promise<this> {\n return this.initialize()\n }\n\n /**\n * Closes connection with the database.\n * Once connection is closed, you cannot use repositories or perform any operations except opening connection again.\n */\n async destroy(): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n await this.driver.disconnect()\n\n // disconnect from the cache-specific database if cache was enabled\n if (this.queryResultCache) await this.queryResultCache.disconnect()\n\n ObjectUtils.assign(this, { isInitialized: false })\n }\n\n /**\n * Closes connection with the database.\n * Once connection is closed, you cannot use repositories or perform any operations except opening connection again.\n *\n * @deprecated use .destroy method instead\n */\n async close(): Promise<void> {\n return this.destroy()\n }\n\n /**\n * Creates database schema for all entities registered in this connection.\n * Can be used only after connection to the database is established.\n *\n * @param dropBeforeSync If set to true then it drops the database with all its tables and data\n */\n async synchronize(dropBeforeSync: boolean = false): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n if (dropBeforeSync) await this.dropDatabase()\n\n const schemaBuilder = this.driver.createSchemaBuilder()\n await schemaBuilder.build()\n }\n\n /**\n * Drops the database and all its data.\n * Be careful with this method on production since this method will erase all your database tables and their data.\n * Can be used only after connection to the database is established.\n */\n // TODO rename\n async dropDatabase(): Promise<void> {\n const queryRunner = this.createQueryRunner()\n try {\n if (\n this.driver.options.type === \"mssql\" ||\n DriverUtils.isMySQLFamily(this.driver) ||\n this.driver.options.type === \"aurora-mysql\" ||\n DriverUtils.isSQLiteFamily(this.driver)\n ) {\n const databases: string[] = []\n this.entityMetadatas.forEach((metadata) => {\n if (\n metadata.database &&\n databases.indexOf(metadata.database) === -1\n )\n databases.push(metadata.database)\n })\n if (databases.length === 0 && this.driver.database) {\n databases.push(this.driver.database)\n }\n\n if (databases.length === 0) {\n await queryRunner.clearDatabase()\n } else {\n for (const database of databases) {\n await queryRunner.clearDatabase(database)\n }\n }\n } else {\n await queryRunner.clearDatabase()\n }\n } finally {\n await queryRunner.release()\n }\n }\n\n /**\n * Runs all pending migrations.\n * Can be used only after connection to the database is established.\n */\n async runMigrations(options?: {\n transaction?: \"all\" | \"none\" | \"each\"\n fake?: boolean\n }): Promise<Migration[]> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n const migrationExecutor = new MigrationExecutor(this)\n migrationExecutor.transaction =\n options?.transaction ||\n this.options?.migrationsTransactionMode ||\n \"all\"\n migrationExecutor.fake = (options && options.fake) || false\n\n const successMigrations =\n await migrationExecutor.executePendingMigrations()\n return successMigrations\n }\n\n /**\n * Reverts last executed migration.\n * Can be used only after connection to the database is established.\n */\n async undoLastMigration(options?: {\n transaction?: \"all\" | \"none\" | \"each\"\n fake?: boolean\n }): Promise<void> {\n if (!this.isInitialized)\n throw new CannotExecuteNotConnectedError(this.name)\n\n const migrationExecutor = new MigrationExecutor(this)\n migrationExecutor.transaction =\n (options && options.transaction) || \"all\"\n migrationExecutor.fake = (options && options.fake) || false\n\n await migrationExecutor.undoLastMigration()\n }\n\n /**\n * Lists all migrations and whether they have been run.\n * Returns true if there are pending migrations\n */\n async showMigrations(): Promise<boolean> {\n if (!this.isInitialized) {\n throw new CannotExecuteNotConnectedError(this.name)\n }\n const migrationExecutor = new MigrationExecutor(this)\n return await migrationExecutor.showMigrations()\n }\n\n /**\n * Checks if entity metadata exist for the given entity class, target name or table name.\n */\n hasMetadata(target: EntityTarget<any>): boolean {\n return !!this.findMetadata(target)\n }\n\n /**\n * Gets entity metadata for the given entity class or schema name.\n */\n getMetadata(target: EntityTarget<any>): EntityMetadata {\n const metadata = this.findMetadata(target)\n if (!metadata) throw new EntityMetadataNotFoundError(target)\n\n return metadata\n }\n\n /**\n * Gets repository for the given entity.\n */\n getRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): Repository<Entity> {\n return this.manager.getRepository(target)\n }\n\n /**\n * Gets tree repository for the given entity class or name.\n * Only tree-type entities can have a TreeRepository, like ones decorated with @Tree decorator.\n */\n getTreeRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): TreeRepository<Entity> {\n return this.manager.getTreeRepository(target)\n }\n\n /**\n * Gets mongodb-specific repository for the given entity class or name.\n * Works only if connection is mongodb-specific.\n */\n getMongoRepository<Entity extends ObjectLiteral>(\n target: EntityTarget<Entity>,\n ): MongoRepository<Entity> {\n if (!(this.driver.options.type === \"mongodb\"))\n throw new TypeORMError(\n `You can use getMongoRepository only for MongoDB connections.`,\n )\n\n return this.manager.getRepository(target) as any\n }\n\n /**\n * Gets custom entity repository marked with @EntityRepository decorator.\n *\n * @deprecated use Repository.extend function to create a custom repository\n */\n getCustomRepository<T>(customRepository: ObjectType<T>): T {\n return this.manager.getCustomRepository(customRepository)\n }\n\n /**\n * Wraps given function execution (and all operations made there) into a transaction.\n * All database operations must be executed using provided entity manager.\n */\n async transaction<T>(\n runInTransaction: (entityManager: EntityManager) => Promise<T>,\n ): Promise<T>\n async transaction<T>(\n isolationLevel: IsolationLevel,\n runInTransaction: (entityManager: EntityManager) => Promise<T>,\n ): Promise<T>\n async transaction<T>(\n isolationOrRunInTransaction:\n | IsolationLevel\n | ((entityManager: EntityManager) => Promise<T>),\n runInTransactionParam?: (entityManager: EntityManager) => Promise<T>,\n ): Promise<any> {\n return this.manager.transaction(\n isolationOrRunInTransaction as any,\n runInTransactionParam as any,\n )\n }\n\n /**\n * Executes raw SQL query and returns raw database results.\n * \n * @see [Official docs](https://typeorm.io/data-source-api) for examples.\n */\n async query<T = any>(\n query: string,\n parameters?: any[],\n queryRunner?: QueryRunner,\n ): Promise<T> {\n if (InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(`Queries aren't supported by MongoDB.`)\n\n if (queryRunner && queryRunner.isReleased)\n throw new QueryRunnerProviderAlreadyReleasedError()\n\n const usedQueryRunner = queryRunner || this.createQueryRunner()\n\n try {\n return await usedQueryRunner.query(query, parameters) // await is needed here because we are using finally\n } finally {\n if (!queryRunner) await usedQueryRunner.release()\n }\n }\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder<Entity extends ObjectLiteral>(\n entityClass: EntityTarget<Entity>,\n alias: string,\n queryRunner?: QueryRunner,\n ): SelectQueryBuilder<Entity>\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder(queryRunner?: QueryRunner): SelectQueryBuilder<any>\n\n /**\n * Creates a new query builder that can be used to build a SQL query.\n */\n createQueryBuilder<Entity extends ObjectLiteral>(\n entityOrRunner?: EntityTarget<Entity> | QueryRunner,\n alias?: string,\n queryRunner?: QueryRunner,\n ): SelectQueryBuilder<Entity> {\n if (InstanceChecker.isMongoEntityManager(this.manager))\n throw new TypeORMError(`Query Builder is not supported by MongoDB.`)\n\n if (alias) {\n alias = DriverUtils.buildAlias(this.driver, undefined, alias)\n const metadata = this.getMetadata(\n entityOrRunner as EntityTarget<Entity>,\n )\n return new SelectQueryBuilder(this, queryRunner)\n .select(alias)\n .from(metadata.target, alias)\n } else {\n return new SelectQueryBuilder(\n this,\n entityOrRunner as QueryRunner | undefined,\n )\n }\n }\n\n /**\n * Creates a query runner used for perform queries on a single database connection.\n * Using query runners you can control your queries to execute using single database connection and\n * manually control your database transaction.\n *\n * Mode is used in replication mode and indicates whatever you want to connect\n * to master database or any of slave databases.\n * If you perform writes you must use master database,\n * if you perform reads you can use slave databases.\n */\n createQueryRunner(mode: ReplicationMode = \"master\"): QueryRunner {\n const queryRunner = this.driver.createQueryRunner(mode)\n const manager = this.createEntityManager(queryRunner)\n Object.assign(queryRunner, { manager: manager })\n return queryRunner\n }\n\n /**\n * Gets entity metadata of the junction table (many-to-many table).\n */\n getManyToManyMetadata(\n entityTarget: EntityTarget<any>,\n relationPropertyPath: string,\n ) {\n const relationMetadata =\n this.getMetadata(entityTarget).findRelationWithPropertyPath(\n relationPropertyPath,\n )\n if (!relationMetadata)\n throw new TypeORMError(\n `Relation \"${relationPropertyPath}\" was not found in ${entityTarget} entity.`,\n )\n if (!relationMetadata.isManyToMany)\n throw new TypeORMError(\n `Relation \"${entityTarget}#${relationPropertyPath}\" does not have a many-to-many relationship.` +\n `You can use this method only on many-to-many relations.`,\n )\n\n return relationMetadata.junctionEntityMetadata\n }\n\n /**\n * Creates an Entity Manager for the current connection with the help of the EntityManagerFactory.\n */\n createEntityManager(queryRunner?: QueryRunner): EntityManager {\n return new EntityManagerFactory().create(this, queryRunner)\n }\n\n // -------------------------------------------------------------------------\n // Protected Methods\n // -------------------------------------------------------------------------\n\n /**\n * Finds exist entity metadata by the given entity class, target name or table name.\n */\n protected findMetadata(\n target: EntityTarget<any>,\n ): EntityMetadata | undefined {\n const metadataFromMap = this.entityMetadatasMap.get(target)\n if (metadataFromMap) return metadataFromMap\n\n for (let [_, metadata] of this.entityMetadatasMap) {\n if (\n InstanceChecker.isEntitySchema(target) &&\n metadata.name === target.options.name\n ) {\n return metadata\n }\n if (typeof target === \"string\") {\n if (target.indexOf(\".\") !== -1) {\n if (metadata.tablePath === target) {\n return metadata\n }\n } else {\n if (\n metadata.name === target ||\n metadata.tableName === target\n ) {\n return metadata\n }\n }\n }\n if (\n ObjectUtils.isObjectWithName(target) &&\n typeof target.name === \"string\"\n ) {\n if (target.name.indexOf(\".\") !== -1) {\n if (metadata.tablePath === target.name) {\n return metadata\n }\n } else {\n if (\n metadata.name === target.name ||\n metadata.tableName === target.name\n ) {\n return metadata\n }\n }\n }\n }\n\n return undefined\n }\n\n /**\n * Builds metadatas for all registered classes inside this connection.\n */\n protected async buildMetadatas(): Promise<void> {\n const connectionMetadataBuilder = new ConnectionMetadataBuilder(this)\n const entityMetadataValidator = new EntityMetadataValidator()\n\n // create subscribers instances if they are not disallowed from high-level (for example they can disallowed from migrations run process)\n const flattenedSubscribers = ObjectUtils.mixedListToArray(\n this.options.subscribers || [],\n )\n const subscribers = await connectionMetadataBuilder.buildSubscribers(\n flattenedSubscribers,\n )\n ObjectUtils.assign(this, { subscribers: subscribers })\n\n // build entity metadatas\n const flattenedEntities = ObjectUtils.mixedListToArray(\n this.options.entities || [],\n )\n const entityMetadatas =\n await connectionMetadataBuilder.buildEntityMetadatas(\n flattenedEntities,\n )\n ObjectUtils.assign(this, {\n entityMetadatas: entityMetadatas,\n entityMetadatasMap: new Map(\n entityMetadatas.map((metadata) => [metadata.target, metadata]),\n ),\n })\n\n // create migration instances\n const flattenedMigrations = ObjectUtils.mixedListToArray(\n this.options.migrations || [],\n )\n const migrations = await connectionMetadataBuilder.buildMigrations(\n flattenedMigrations,\n )\n ObjectUtils.assign(this, { migrations: migrations })\n\n // validate all created entity metadatas to make sure user created entities are valid and correct\n entityMetadataValidator.validateMany(\n this.entityMetadatas.filter(\n (metadata) => metadata.tableType !== \"view\",\n ),\n this.driver,\n )\n\n // set current data source to the entities\n for (let entityMetadata of entityMetadatas) {\n if (\n InstanceChecker.isBaseEntityConstructor(entityMetadata.target)\n ) {\n entityMetadata.target.useDataSource(this)\n }\n }\n }\n\n /**\n * Get the replication mode SELECT queries should use for this datasource by default\n */\n defaultReplicationModeForReads(): ReplicationMode {\n if (\"replication\" in this.driver.options) {\n const value = (\n this.driver.options.replication as {\n defaultMode?: ReplicationMode\n }\n ).defaultMode\n if (value) {\n return value\n }\n }\n return \"slave\"\n }\n}\n"],"sourceRoot":".."}
@@ -1,12 +1,12 @@
1
1
  import { ObjectType } from "../../common/ObjectType";
2
2
  import { RelationOptions } from "../options/RelationOptions";
3
3
  /**
4
- * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
5
- * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.
4
+ * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
5
+ * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
6
6
  */
7
7
  export declare function OneToOne<T>(typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>), options?: RelationOptions): PropertyDecorator;
8
8
  /**
9
- * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
10
- * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.
9
+ * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
10
+ * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
11
11
  */
12
12
  export declare function OneToOne<T>(typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>), inverseSide?: string | ((object: T) => any), options?: RelationOptions): PropertyDecorator;
@@ -1,8 +1,8 @@
1
1
  import { getMetadataArgsStorage } from "../../globals";
2
2
  import { ObjectUtils } from "../../util/ObjectUtils";
3
3
  /**
4
- * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.
5
- * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.
4
+ * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.
5
+ * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.
6
6
  */
7
7
  export function OneToOne(typeFunctionOrTarget, inverseSideOrOptions, options) {
8
8
  // normalize parameters
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/decorator/relations/OneToOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAqBpD;;;GAGG;AACH,MAAM,UAAU,QAAQ,CACpB,oBAA8D,EAC9D,oBAAsE,EACtE,OAAyB;IAEzB,uBAAuB;IACvB,IAAI,mBAAkD,CAAA;IACtD,IAAI,WAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC7C,OAAO,GAAoB,oBAAoB,CAAA;IACnD,CAAC;SAAM,CAAC;QACJ,mBAAmB,GAAG,oBAA2B,CAAA;IACrD,CAAC;IAED,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAqB,CAAA;QAE7C,4CAA4C;QAC5C,IAAI,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5D,IAAI,CAAC,MAAM,IAAI,OAAO,IAAK,OAAe,CAAC,WAAW,EAAE,CAAC;YACrD,0BAA0B;YAC1B,MAAM,aAAa,GAAI,OAAe,CAAC,WAAW,CAC9C,aAAa,EACb,MAAM,EACN,YAAY,CACf,CAAA;YACD,IACI,aAAa;gBACb,OAAO,aAAa,CAAC,IAAI,KAAK,QAAQ;gBACtC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,SAAS;gBAE9C,MAAM,GAAG,IAAI,CAAA;QACrB,CAAC;QAED,sBAAsB,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,+BAA+B;YAC/B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,oBAAoB;YAC1B,mBAAmB,EAAE,mBAAmB;YACxC,OAAO,EAAE,OAAO;SACK,CAAC,CAAA;IAC9B,CAAC,CAAA;AACL,CAAC","file":"OneToOne.js","sourcesContent":["import { getMetadataArgsStorage } from \"../../globals\"\nimport { RelationMetadataArgs } from \"../../metadata-args/RelationMetadataArgs\"\nimport { ObjectType } from \"../../common/ObjectType\"\nimport { RelationOptions } from \"../options/RelationOptions\"\nimport { ObjectUtils } from \"../../util/ObjectUtils\"\n\n/**\n * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.\n * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n options?: RelationOptions,\n): PropertyDecorator\n\n/**\n * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.\n * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n inverseSide?: string | ((object: T) => any),\n options?: RelationOptions,\n): PropertyDecorator\n\n/**\n * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2.\n * Entity1 is an owner of the relationship, and storages Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n inverseSideOrOptions?: string | ((object: T) => any) | RelationOptions,\n options?: RelationOptions,\n): PropertyDecorator {\n // normalize parameters\n let inverseSideProperty: string | ((object: T) => any)\n if (ObjectUtils.isObject(inverseSideOrOptions)) {\n options = <RelationOptions>inverseSideOrOptions\n } else {\n inverseSideProperty = inverseSideOrOptions as any\n }\n\n return function (object: Object, propertyName: string) {\n if (!options) options = {} as RelationOptions\n\n // now try to determine it its lazy relation\n let isLazy = options && options.lazy === true ? true : false\n if (!isLazy && Reflect && (Reflect as any).getMetadata) {\n // automatic determination\n const reflectedType = (Reflect as any).getMetadata(\n \"design:type\",\n object,\n propertyName,\n )\n if (\n reflectedType &&\n typeof reflectedType.name === \"string\" &&\n reflectedType.name.toLowerCase() === \"promise\"\n )\n isLazy = true\n }\n\n getMetadataArgsStorage().relations.push({\n target: object.constructor,\n propertyName: propertyName,\n // propertyType: reflectedType,\n isLazy: isLazy,\n relationType: \"one-to-one\",\n type: typeFunctionOrTarget,\n inverseSideProperty: inverseSideProperty,\n options: options,\n } as RelationMetadataArgs)\n }\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/decorator/relations/OneToOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAqBpD;;;GAGG;AACH,MAAM,UAAU,QAAQ,CACpB,oBAA8D,EAC9D,oBAAsE,EACtE,OAAyB;IAEzB,uBAAuB;IACvB,IAAI,mBAAkD,CAAA;IACtD,IAAI,WAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC7C,OAAO,GAAoB,oBAAoB,CAAA;IACnD,CAAC;SAAM,CAAC;QACJ,mBAAmB,GAAG,oBAA2B,CAAA;IACrD,CAAC;IAED,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAqB,CAAA;QAE7C,4CAA4C;QAC5C,IAAI,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5D,IAAI,CAAC,MAAM,IAAI,OAAO,IAAK,OAAe,CAAC,WAAW,EAAE,CAAC;YACrD,0BAA0B;YAC1B,MAAM,aAAa,GAAI,OAAe,CAAC,WAAW,CAC9C,aAAa,EACb,MAAM,EACN,YAAY,CACf,CAAA;YACD,IACI,aAAa;gBACb,OAAO,aAAa,CAAC,IAAI,KAAK,QAAQ;gBACtC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,SAAS;gBAE9C,MAAM,GAAG,IAAI,CAAA;QACrB,CAAC;QAED,sBAAsB,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,+BAA+B;YAC/B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,oBAAoB;YAC1B,mBAAmB,EAAE,mBAAmB;YACxC,OAAO,EAAE,OAAO;SACK,CAAC,CAAA;IAC9B,CAAC,CAAA;AACL,CAAC","file":"OneToOne.js","sourcesContent":["import { getMetadataArgsStorage } from \"../../globals\"\nimport { RelationMetadataArgs } from \"../../metadata-args/RelationMetadataArgs\"\nimport { ObjectType } from \"../../common/ObjectType\"\nimport { RelationOptions } from \"../options/RelationOptions\"\nimport { ObjectUtils } from \"../../util/ObjectUtils\"\n\n/**\n * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.\n * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n options?: RelationOptions,\n): PropertyDecorator\n\n/**\n * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.\n * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n inverseSide?: string | ((object: T) => any),\n options?: RelationOptions,\n): PropertyDecorator\n\n/**\n * One-to-one relation allows the creation of a direct relation between two entities. Entity1 has only one Entity2.\n * Entity1 is the owner of the relationship, and stores Entity2 id on its own side.\n */\nexport function OneToOne<T>(\n typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>),\n inverseSideOrOptions?: string | ((object: T) => any) | RelationOptions,\n options?: RelationOptions,\n): PropertyDecorator {\n // normalize parameters\n let inverseSideProperty: string | ((object: T) => any)\n if (ObjectUtils.isObject(inverseSideOrOptions)) {\n options = <RelationOptions>inverseSideOrOptions\n } else {\n inverseSideProperty = inverseSideOrOptions as any\n }\n\n return function (object: Object, propertyName: string) {\n if (!options) options = {} as RelationOptions\n\n // now try to determine it its lazy relation\n let isLazy = options && options.lazy === true ? true : false\n if (!isLazy && Reflect && (Reflect as any).getMetadata) {\n // automatic determination\n const reflectedType = (Reflect as any).getMetadata(\n \"design:type\",\n object,\n propertyName,\n )\n if (\n reflectedType &&\n typeof reflectedType.name === \"string\" &&\n reflectedType.name.toLowerCase() === \"promise\"\n )\n isLazy = true\n }\n\n getMetadataArgsStorage().relations.push({\n target: object.constructor,\n propertyName: propertyName,\n // propertyType: reflectedType,\n isLazy: isLazy,\n relationType: \"one-to-one\",\n type: typeFunctionOrTarget,\n inverseSideProperty: inverseSideProperty,\n options: options,\n } as RelationMetadataArgs)\n }\n}\n"],"sourceRoot":"../.."}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export interface AuroraMysqlConnectionCredentialsOptions {
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/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"AuroraMysqlConnectionCredentialsOptions.js","sourcesContent":["/**\n * MySQL specific connection credential options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface AuroraMysqlConnectionCredentialsOptions {\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"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"AuroraMysqlConnectionCredentialsOptions.js","sourcesContent":["/**\n * MySQL specific connection credential options.\n *\n * @see https://github.com/mysqljs/mysql#connection-options\n */\nexport interface AuroraMysqlConnectionCredentialsOptions {\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"],"sourceRoot":"../.."}
@@ -4,7 +4,7 @@ import { TlsOptions } from "tls";
4
4
  */
5
5
  export interface CockroachConnectionCredentialsOptions {
6
6
  /**
7
- * Connection url where perform connection to.
7
+ * Connection url where the connection is performed.
8
8
  */
9
9
  readonly url?: string;
10
10
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/cockroachdb/CockroachConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"CockroachConnectionCredentialsOptions.js","sourcesContent":["import { TlsOptions } from \"tls\"\n\n/**\n * Cockroachdb specific connection credential options.\n */\nexport interface CockroachConnectionCredentialsOptions {\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\n */\n readonly ssl?: boolean | TlsOptions\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/cockroachdb/CockroachConnectionCredentialsOptions.ts"],"names":[],"mappings":"","file":"CockroachConnectionCredentialsOptions.js","sourcesContent":["import { TlsOptions } from \"tls\"\n\n/**\n * Cockroachdb specific connection credential options.\n */\nexport interface CockroachConnectionCredentialsOptions {\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\n */\n readonly ssl?: boolean | TlsOptions\n}\n"],"sourceRoot":"../.."}
@@ -37,7 +37,7 @@ export interface CockroachConnectionOptions extends BaseDataSourceOptions, Cockr
37
37
  */
38
38
  readonly master: CockroachConnectionCredentialsOptions;
39
39
  /**
40
- * List of read-from severs (slaves).
40
+ * List of read-from servers (slaves).
41
41
  */
42
42
  readonly slaves: CockroachConnectionCredentialsOptions[];
43
43
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/cockroachdb/CockroachConnectionOptions.ts"],"names":[],"mappings":"","file":"CockroachConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { CockroachConnectionCredentialsOptions } from \"./CockroachConnectionCredentialsOptions\"\n\n/**\n * Cockroachdb-specific connection options.\n */\nexport interface CockroachConnectionOptions\n extends BaseDataSourceOptions,\n CockroachConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"cockroachdb\"\n\n /**\n * Enable time travel queries on cockroachdb.\n * https://www.cockroachlabs.com/docs/stable/as-of-system-time.html\n */\n readonly timeTravelQueries: boolean\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 * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: CockroachConnectionCredentialsOptions\n\n /**\n * List of read-from severs (slaves).\n */\n readonly slaves: CockroachConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\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 /**\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 * Max number of transaction retries in case of 40001 error.\n */\n readonly maxTransactionRetries?: number\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/cockroachdb/CockroachConnectionOptions.ts"],"names":[],"mappings":"","file":"CockroachConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReplicationMode } from \"../types/ReplicationMode\"\nimport { CockroachConnectionCredentialsOptions } from \"./CockroachConnectionCredentialsOptions\"\n\n/**\n * Cockroachdb-specific connection options.\n */\nexport interface CockroachConnectionOptions\n extends BaseDataSourceOptions,\n CockroachConnectionCredentialsOptions {\n /**\n * Database type.\n */\n readonly type: \"cockroachdb\"\n\n /**\n * Enable time travel queries on cockroachdb.\n * https://www.cockroachlabs.com/docs/stable/as-of-system-time.html\n */\n readonly timeTravelQueries: boolean\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 * Replication setup.\n */\n readonly replication?: {\n /**\n * Master server used by orm to perform writes.\n */\n readonly master: CockroachConnectionCredentialsOptions\n\n /**\n * List of read-from servers (slaves).\n */\n readonly slaves: CockroachConnectionCredentialsOptions[]\n\n /**\n * Default connection pool to use for SELECT queries\n * @default \"slave\"\n */\n readonly defaultMode?: ReplicationMode\n }\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 /**\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 * Max number of transaction retries in case of 40001 error.\n */\n readonly maxTransactionRetries?: number\n}\n"],"sourceRoot":"../.."}
@@ -10,7 +10,7 @@ export interface MongoConnectionOptions extends BaseDataSourceOptions {
10
10
  */
11
11
  readonly type: "mongodb";
12
12
  /**
13
- * Connection url where perform connection to.
13
+ * Connection url where the connection is performed.
14
14
  */
15
15
  readonly url?: string;
16
16
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../browser/src/driver/mongodb/MongoConnectionOptions.ts"],"names":[],"mappings":"","file":"MongoConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReadPreference } from \"./typings\"\n\n/**\n * MongoDB specific connection options.\n * Synced with http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html\n */\nexport interface MongoConnectionOptions extends BaseDataSourceOptions {\n /**\n * Database type.\n */\n readonly type: \"mongodb\"\n\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 replica set.\n */\n readonly hostReplicaSet?: 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 * Specifies whether to force dispatch all operations to the specified host. Default: false\n */\n readonly directConnection?: boolean\n\n /**\n * The driver object\n * This defaults to require(\"mongodb\")\n */\n readonly driver?: any\n\n /**\n * Use ssl connection (needs to have a mongod server with ssl support). Default: false\n */\n readonly ssl?: boolean\n\n /**\n * Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher).\n * Default: true\n */\n readonly sslValidate?: boolean\n\n /**\n * Array of valid certificates either as Buffers or Strings\n * (needs to have a mongod server with ssl support, 2.4 or higher).\n */\n readonly sslCA?: string | Buffer\n\n /**\n * String or buffer containing the certificate we wish to present\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslCert?: string | Buffer\n\n /**\n * String or buffer containing the certificate private key we wish to present\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslKey?: string\n\n /**\n * String or buffer containing the certificate password\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslPass?: string | Buffer\n\n /**\n * SSL Certificate revocation list binary buffer\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslCRL?: string | Buffer\n\n /**\n * Reconnect on error. Default: true\n */\n readonly autoReconnect?: boolean\n\n /**\n * TCP Socket NoDelay option. Default: true\n */\n readonly noDelay?: boolean\n\n /**\n * The number of milliseconds to wait before initiating keepAlive on the TCP socket. Default: 30000\n */\n readonly keepAlive?: number\n\n /**\n * TCP Connection timeout setting. Default: 30000\n */\n readonly connectTimeoutMS?: number\n\n /**\n * Version of IP stack. Can be 4, 6.\n * If undefined, will attempt to connect with IPv6, and will fall back to IPv4 on failure\n */\n readonly family?: number\n\n /**\n * TCP Socket timeout setting. Default: 360000\n */\n readonly socketTimeoutMS?: number\n\n /**\n * Server attempt to reconnect #times. Default 30\n */\n readonly reconnectTries?: number\n\n /**\n * Server will wait #milliseconds between retries. Default 1000\n */\n readonly reconnectInterval?: number\n\n /**\n * Control if high availability monitoring runs for Replicaset or Mongos proxies. Default true\n */\n readonly ha?: boolean\n\n /**\n * The High availability period for replicaset inquiry. Default: 10000\n */\n readonly haInterval?: number\n\n /**\n * The name of the replicaset to connect to\n */\n readonly replicaSet?: string\n\n /**\n * Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\n * Default: 15\n */\n readonly acceptableLatencyMS?: number\n\n /**\n * Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\n * Default: 15\n */\n readonly secondaryAcceptableLatencyMS?: number\n\n /**\n * Sets if the driver should connect even if no primary is available. Default: false\n */\n readonly connectWithNoPrimary?: boolean\n\n /**\n * If the database authentication is dependent on another databaseName.\n */\n readonly authSource?: string\n\n /**\n * The write concern.\n */\n readonly w?: string | number\n\n /**\n * The write concern timeout value.\n */\n readonly wtimeout?: number\n\n /**\n * Specify a journal write concern. Default: false\n */\n readonly j?: boolean\n\n /**\n * Force server to assign _id values instead of driver. Default: false\n */\n readonly forceServerObjectId?: boolean\n\n /**\n * Serialize functions on any object. Default: false\n */\n readonly serializeFunctions?: boolean\n\n /**\n * Specify if the BSON serializer should ignore undefined fields. Default: false\n */\n readonly ignoreUndefined?: boolean\n\n /**\n * Return document results as raw BSON buffers. Default: false\n */\n readonly raw?: boolean\n\n /**\n * Promotes Long values to number if they fit inside the 53 bits resolution. Default: true\n */\n readonly promoteLongs?: boolean\n\n /**\n * Promotes Binary BSON values to native Node Buffers. Default: false\n */\n readonly promoteBuffers?: boolean\n\n /**\n * Promotes BSON values to native types where possible, set to false to only receive wrapper types. Default: true\n */\n readonly promoteValues?: boolean\n\n /**\n * Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit. Default: false\n */\n readonly domainsEnabled?: boolean\n\n /**\n * Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection,\n * default is -1 which is unlimited.\n */\n readonly bufferMaxEntries?: number\n\n /**\n * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY,\n * ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).\n */\n readonly readPreference?: ReadPreference | string\n\n /**\n * A primary key factory object for generation of custom _id keys.\n */\n readonly pkFactory?: any\n\n /**\n * A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible.\n */\n readonly promiseLibrary?: any\n\n /**\n * Specify a read concern for the collection. (only MongoDB 3.2 or higher supported).\n */\n readonly readConcern?: any\n\n /**\n * Specify a maxStalenessSeconds value for secondary reads, minimum is 90 seconds\n */\n readonly maxStalenessSeconds?: number\n\n /**\n * Specify the log level used by the driver logger (error/warn/info/debug).\n */\n readonly loggerLevel?: \"error\" | \"warn\" | \"info\" | \"debug\"\n\n // Do not overwrite BaseDataSourceOptions.logger\n // readonly logger?: any;\n\n /**\n * Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function\n * Default: true\n */\n readonly checkServerIdentity?: boolean | Function\n\n /**\n * Validate MongoClient passed in options for correctness. Default: false\n */\n readonly validateOptions?: boolean | any\n\n /**\n * The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections\n */\n readonly appname?: string\n\n /**\n * Sets the authentication mechanism that MongoDB will use to authenticate the connection\n */\n readonly authMechanism?: string\n\n /**\n * Type of compression to use: snappy or zlib\n */\n readonly compression?: any\n\n /**\n * Specify a file sync write concern. Default: false\n */\n readonly fsync?: boolean\n\n /**\n * Read preference tags\n */\n readonly readPreferenceTags?: any[]\n\n /**\n * The number of retries for a tailable cursor. Default: 5\n */\n readonly numberOfRetries?: number\n\n /**\n * Enable auto reconnecting for single server instances. Default: true\n */\n readonly auto_reconnect?: boolean\n\n /**\n * Enable command monitoring for this client. Default: false\n */\n readonly monitorCommands?: boolean\n\n /**\n * If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections\n */\n readonly minSize?: number\n\n /**\n * Determines whether or not to use the new url parser. Default: false\n */\n readonly useNewUrlParser?: boolean\n\n /**\n * Determines whether or not to use the new Server Discovery and Monitoring engine. Default: false\n * https://github.com/mongodb/node-mongodb-native/releases/tag/v3.2.1\n */\n readonly useUnifiedTopology?: boolean\n\n /**\n * Automatic Client-Side Field Level Encryption configuration.\n */\n readonly autoEncryption?: any\n\n /**\n * Enables or disables the ability to retry writes upon encountering transient network errors.\n */\n readonly retryWrites?: boolean\n}\n"],"sourceRoot":"../.."}
1
+ {"version":3,"sources":["../browser/src/driver/mongodb/MongoConnectionOptions.ts"],"names":[],"mappings":"","file":"MongoConnectionOptions.js","sourcesContent":["import { BaseDataSourceOptions } from \"../../data-source/BaseDataSourceOptions\"\nimport { ReadPreference } from \"./typings\"\n\n/**\n * MongoDB specific connection options.\n * Synced with http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html\n */\nexport interface MongoConnectionOptions extends BaseDataSourceOptions {\n /**\n * Database type.\n */\n readonly type: \"mongodb\"\n\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 replica set.\n */\n readonly hostReplicaSet?: 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 * Specifies whether to force dispatch all operations to the specified host. Default: false\n */\n readonly directConnection?: boolean\n\n /**\n * The driver object\n * This defaults to require(\"mongodb\")\n */\n readonly driver?: any\n\n /**\n * Use ssl connection (needs to have a mongod server with ssl support). Default: false\n */\n readonly ssl?: boolean\n\n /**\n * Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher).\n * Default: true\n */\n readonly sslValidate?: boolean\n\n /**\n * Array of valid certificates either as Buffers or Strings\n * (needs to have a mongod server with ssl support, 2.4 or higher).\n */\n readonly sslCA?: string | Buffer\n\n /**\n * String or buffer containing the certificate we wish to present\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslCert?: string | Buffer\n\n /**\n * String or buffer containing the certificate private key we wish to present\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslKey?: string\n\n /**\n * String or buffer containing the certificate password\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslPass?: string | Buffer\n\n /**\n * SSL Certificate revocation list binary buffer\n * (needs to have a mongod server with ssl support, 2.4 or higher)\n */\n readonly sslCRL?: string | Buffer\n\n /**\n * Reconnect on error. Default: true\n */\n readonly autoReconnect?: boolean\n\n /**\n * TCP Socket NoDelay option. Default: true\n */\n readonly noDelay?: boolean\n\n /**\n * The number of milliseconds to wait before initiating keepAlive on the TCP socket. Default: 30000\n */\n readonly keepAlive?: number\n\n /**\n * TCP Connection timeout setting. Default: 30000\n */\n readonly connectTimeoutMS?: number\n\n /**\n * Version of IP stack. Can be 4, 6.\n * If undefined, will attempt to connect with IPv6, and will fall back to IPv4 on failure\n */\n readonly family?: number\n\n /**\n * TCP Socket timeout setting. Default: 360000\n */\n readonly socketTimeoutMS?: number\n\n /**\n * Server attempt to reconnect #times. Default 30\n */\n readonly reconnectTries?: number\n\n /**\n * Server will wait #milliseconds between retries. Default 1000\n */\n readonly reconnectInterval?: number\n\n /**\n * Control if high availability monitoring runs for Replicaset or Mongos proxies. Default true\n */\n readonly ha?: boolean\n\n /**\n * The High availability period for replicaset inquiry. Default: 10000\n */\n readonly haInterval?: number\n\n /**\n * The name of the replicaset to connect to\n */\n readonly replicaSet?: string\n\n /**\n * Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\n * Default: 15\n */\n readonly acceptableLatencyMS?: number\n\n /**\n * Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms).\n * Default: 15\n */\n readonly secondaryAcceptableLatencyMS?: number\n\n /**\n * Sets if the driver should connect even if no primary is available. Default: false\n */\n readonly connectWithNoPrimary?: boolean\n\n /**\n * If the database authentication is dependent on another databaseName.\n */\n readonly authSource?: string\n\n /**\n * The write concern.\n */\n readonly w?: string | number\n\n /**\n * The write concern timeout value.\n */\n readonly wtimeout?: number\n\n /**\n * Specify a journal write concern. Default: false\n */\n readonly j?: boolean\n\n /**\n * Force server to assign _id values instead of driver. Default: false\n */\n readonly forceServerObjectId?: boolean\n\n /**\n * Serialize functions on any object. Default: false\n */\n readonly serializeFunctions?: boolean\n\n /**\n * Specify if the BSON serializer should ignore undefined fields. Default: false\n */\n readonly ignoreUndefined?: boolean\n\n /**\n * Return document results as raw BSON buffers. Default: false\n */\n readonly raw?: boolean\n\n /**\n * Promotes Long values to number if they fit inside the 53 bits resolution. Default: true\n */\n readonly promoteLongs?: boolean\n\n /**\n * Promotes Binary BSON values to native Node Buffers. Default: false\n */\n readonly promoteBuffers?: boolean\n\n /**\n * Promotes BSON values to native types where possible, set to false to only receive wrapper types. Default: true\n */\n readonly promoteValues?: boolean\n\n /**\n * Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit. Default: false\n */\n readonly domainsEnabled?: boolean\n\n /**\n * Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection,\n * default is -1 which is unlimited.\n */\n readonly bufferMaxEntries?: number\n\n /**\n * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY,\n * ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).\n */\n readonly readPreference?: ReadPreference | string\n\n /**\n * A primary key factory object for generation of custom _id keys.\n */\n readonly pkFactory?: any\n\n /**\n * A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible.\n */\n readonly promiseLibrary?: any\n\n /**\n * Specify a read concern for the collection. (only MongoDB 3.2 or higher supported).\n */\n readonly readConcern?: any\n\n /**\n * Specify a maxStalenessSeconds value for secondary reads, minimum is 90 seconds\n */\n readonly maxStalenessSeconds?: number\n\n /**\n * Specify the log level used by the driver logger (error/warn/info/debug).\n */\n readonly loggerLevel?: \"error\" | \"warn\" | \"info\" | \"debug\"\n\n // Do not overwrite BaseDataSourceOptions.logger\n // readonly logger?: any;\n\n /**\n * Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function\n * Default: true\n */\n readonly checkServerIdentity?: boolean | Function\n\n /**\n * Validate MongoClient passed in options for correctness. Default: false\n */\n readonly validateOptions?: boolean | any\n\n /**\n * The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections\n */\n readonly appname?: string\n\n /**\n * Sets the authentication mechanism that MongoDB will use to authenticate the connection\n */\n readonly authMechanism?: string\n\n /**\n * Type of compression to use: snappy or zlib\n */\n readonly compression?: any\n\n /**\n * Specify a file sync write concern. Default: false\n */\n readonly fsync?: boolean\n\n /**\n * Read preference tags\n */\n readonly readPreferenceTags?: any[]\n\n /**\n * The number of retries for a tailable cursor. Default: 5\n */\n readonly numberOfRetries?: number\n\n /**\n * Enable auto reconnecting for single server instances. Default: true\n */\n readonly auto_reconnect?: boolean\n\n /**\n * Enable command monitoring for this client. Default: false\n */\n readonly monitorCommands?: boolean\n\n /**\n * If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections\n */\n readonly minSize?: number\n\n /**\n * Determines whether or not to use the new url parser. Default: false\n */\n readonly useNewUrlParser?: boolean\n\n /**\n * Determines whether or not to use the new Server Discovery and Monitoring engine. Default: false\n * https://github.com/mongodb/node-mongodb-native/releases/tag/v3.2.1\n */\n readonly useUnifiedTopology?: boolean\n\n /**\n * Automatic Client-Side Field Level Encryption configuration.\n */\n readonly autoEncryption?: any\n\n /**\n * Enables or disables the ability to retry writes upon encountering transient network errors.\n */\n readonly retryWrites?: boolean\n}\n"],"sourceRoot":"../.."}
@@ -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":"../.."}
@@ -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":"../.."}
@@ -4,7 +4,7 @@ import { TlsOptions } from "tls";
4
4
  */
5
5
  export interface PostgresConnectionCredentialsOptions {
6
6
  /**
7
- * Connection url where perform connection to.
7
+ * Connection url where the connection is performed.
8
8
  */
9
9
  readonly url?: string;
10
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":"../.."}
@@ -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":"../.."}