typeorm 0.3.21-dev.3d55188 → 0.3.21-dev.4d31902
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -11
- package/browser/cache/QueryResultCache.d.ts +4 -2
- package/browser/cache/QueryResultCache.js.map +1 -1
- package/browser/connection/ConnectionOptionsReader.d.ts +4 -4
- package/browser/data-source/DataSource.d.ts +2 -0
- package/browser/data-source/DataSource.js +2 -0
- package/browser/data-source/DataSource.js.map +1 -1
- package/browser/decorator/relations/OneToOne.d.ts +4 -4
- package/browser/decorator/relations/OneToOne.js +2 -2
- package/browser/decorator/relations/OneToOne.js.map +1 -1
- package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
- package/browser/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/aurora-mysql/AuroraMysqlQueryRunner.d.ts +0 -1
- package/browser/driver/better-sqlite3/BetterSqlite3Driver.js +2 -2
- package/browser/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
- package/browser/driver/better-sqlite3/BetterSqlite3QueryRunner.js +4 -0
- package/browser/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
- package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -2
- package/browser/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
- package/browser/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
- package/browser/driver/cockroachdb/CockroachQueryRunner.d.ts +0 -1
- package/browser/driver/cockroachdb/CockroachQueryRunner.js +5 -3
- package/browser/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
- package/browser/driver/mongodb/MongoConnectionOptions.d.ts +1 -2
- package/browser/driver/mongodb/MongoConnectionOptions.js.map +1 -1
- package/browser/driver/mongodb/MongoQueryRunner.d.ts +0 -1
- package/browser/driver/mongodb/typings.d.ts +0 -8
- package/browser/driver/mongodb/typings.js +0 -1
- package/browser/driver/mongodb/typings.js.map +1 -1
- package/browser/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
- package/browser/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
- package/browser/driver/mysql/MysqlConnectionOptions.js.map +1 -1
- package/browser/driver/mysql/MysqlQueryRunner.d.ts +0 -1
- package/browser/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
- package/browser/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/oracle/OracleConnectionOptions.d.ts +1 -1
- package/browser/driver/oracle/OracleConnectionOptions.js.map +1 -1
- package/browser/driver/oracle/OracleQueryRunner.d.ts +0 -1
- package/browser/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -2
- package/browser/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
- package/browser/driver/postgres/PostgresConnectionOptions.js.map +1 -1
- package/browser/driver/postgres/PostgresQueryRunner.d.ts +0 -1
- package/browser/driver/postgres/PostgresQueryRunner.js +5 -1
- package/browser/driver/postgres/PostgresQueryRunner.js.map +1 -1
- package/browser/driver/sap/SapQueryRunner.d.ts +0 -1
- package/browser/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
- package/browser/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
- package/browser/driver/spanner/SpannerConnectionOptions.js.map +1 -1
- package/browser/driver/spanner/SpannerQueryRunner.d.ts +0 -1
- package/browser/driver/sqlite/SqliteDriver.js +2 -2
- package/browser/driver/sqlite/SqliteDriver.js.map +1 -1
- package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.d.ts +0 -1
- package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
- package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
- package/browser/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerQueryRunner.d.ts +0 -1
- package/browser/entity-manager/EntityManager.d.ts +2 -0
- package/browser/entity-manager/EntityManager.js +4 -2
- package/browser/entity-manager/EntityManager.js.map +1 -1
- package/browser/find-options/FindOptionsOrder.d.ts +0 -1
- package/browser/find-options/FindOptionsRelations.d.ts +0 -1
- package/browser/find-options/FindOptionsSelect.d.ts +0 -1
- package/browser/find-options/FindOptionsWhere.d.ts +0 -1
- package/browser/metadata/ColumnMetadata.js +18 -9
- package/browser/metadata/ColumnMetadata.js.map +1 -1
- package/browser/platform/PlatformTools.d.ts +0 -4
- package/browser/platform/PlatformTools.js +3 -9
- package/browser/platform/PlatformTools.js.map +1 -1
- package/browser/query-builder/InsertQueryBuilder.js.map +1 -1
- package/browser/query-builder/QueryBuilder.js.map +1 -1
- package/browser/query-builder/SelectQueryBuilder.d.ts +0 -1
- package/browser/query-runner/QueryRunner.d.ts +0 -1
- package/browser/repository/Repository.d.ts +2 -0
- package/browser/repository/Repository.js +2 -0
- package/browser/repository/Repository.js.map +1 -1
- package/browser/schema-builder/RdbmsSchemaBuilder.js +1 -1
- package/browser/schema-builder/RdbmsSchemaBuilder.js.map +1 -1
- package/browser/util/ImportUtils.js +22 -34
- package/browser/util/ImportUtils.js.map +1 -1
- package/cache/QueryResultCache.d.ts +4 -2
- package/cache/QueryResultCache.js.map +1 -1
- package/commands/CommandUtils.d.ts +1 -1
- package/commands/CommandUtils.js +18 -16
- package/commands/CommandUtils.js.map +1 -1
- package/commands/InitCommand.js +1 -1
- package/commands/InitCommand.js.map +1 -1
- package/connection/ConnectionOptionsReader.d.ts +4 -4
- package/container.js +2 -3
- package/container.js.map +1 -1
- package/data-source/DataSource.d.ts +2 -0
- package/data-source/DataSource.js +2 -0
- package/data-source/DataSource.js.map +1 -1
- package/decorator/Check.js +1 -2
- package/decorator/Check.js.map +1 -1
- package/decorator/EntityRepository.js +1 -2
- package/decorator/EntityRepository.js.map +1 -1
- package/decorator/Exclusion.js +1 -2
- package/decorator/Exclusion.js.map +1 -1
- package/decorator/Generated.js +1 -2
- package/decorator/Generated.js.map +1 -1
- package/decorator/Index.js +1 -2
- package/decorator/Index.js.map +1 -1
- package/decorator/Unique.js +1 -2
- package/decorator/Unique.js.map +1 -1
- package/decorator/columns/Column.js +1 -2
- package/decorator/columns/Column.js.map +1 -1
- package/decorator/columns/CreateDateColumn.js +1 -2
- package/decorator/columns/CreateDateColumn.js.map +1 -1
- package/decorator/columns/DeleteDateColumn.js +1 -2
- package/decorator/columns/DeleteDateColumn.js.map +1 -1
- package/decorator/columns/ObjectIdColumn.js +1 -2
- package/decorator/columns/ObjectIdColumn.js.map +1 -1
- package/decorator/columns/PrimaryColumn.js +1 -2
- package/decorator/columns/PrimaryColumn.js.map +1 -1
- package/decorator/columns/PrimaryGeneratedColumn.js +1 -2
- package/decorator/columns/PrimaryGeneratedColumn.js.map +1 -1
- package/decorator/columns/UpdateDateColumn.js +1 -2
- package/decorator/columns/UpdateDateColumn.js.map +1 -1
- package/decorator/columns/VersionColumn.js +1 -2
- package/decorator/columns/VersionColumn.js.map +1 -1
- package/decorator/columns/ViewColumn.js +1 -2
- package/decorator/columns/ViewColumn.js.map +1 -1
- package/decorator/columns/VirtualColumn.js +1 -2
- package/decorator/columns/VirtualColumn.js.map +1 -1
- package/decorator/entity/ChildEntity.js +1 -2
- package/decorator/entity/ChildEntity.js.map +1 -1
- package/decorator/entity/Entity.js +1 -2
- package/decorator/entity/Entity.js.map +1 -1
- package/decorator/entity/TableInheritance.js +1 -2
- package/decorator/entity/TableInheritance.js.map +1 -1
- package/decorator/entity-view/ViewEntity.js +1 -2
- package/decorator/entity-view/ViewEntity.js.map +1 -1
- package/decorator/listeners/AfterInsert.js +1 -2
- package/decorator/listeners/AfterInsert.js.map +1 -1
- package/decorator/listeners/AfterLoad.js +1 -2
- package/decorator/listeners/AfterLoad.js.map +1 -1
- package/decorator/listeners/AfterRecover.js +1 -2
- package/decorator/listeners/AfterRecover.js.map +1 -1
- package/decorator/listeners/AfterRemove.js +1 -2
- package/decorator/listeners/AfterRemove.js.map +1 -1
- package/decorator/listeners/AfterSoftRemove.js +1 -2
- package/decorator/listeners/AfterSoftRemove.js.map +1 -1
- package/decorator/listeners/AfterUpdate.js +1 -2
- package/decorator/listeners/AfterUpdate.js.map +1 -1
- package/decorator/listeners/BeforeInsert.js +1 -2
- package/decorator/listeners/BeforeInsert.js.map +1 -1
- package/decorator/listeners/BeforeRecover.js +1 -2
- package/decorator/listeners/BeforeRecover.js.map +1 -1
- package/decorator/listeners/BeforeRemove.js +1 -2
- package/decorator/listeners/BeforeRemove.js.map +1 -1
- package/decorator/listeners/BeforeSoftRemove.js +1 -2
- package/decorator/listeners/BeforeSoftRemove.js.map +1 -1
- package/decorator/listeners/BeforeUpdate.js +1 -2
- package/decorator/listeners/BeforeUpdate.js.map +1 -1
- package/decorator/listeners/EventSubscriber.js +1 -2
- package/decorator/listeners/EventSubscriber.js.map +1 -1
- package/decorator/relations/JoinColumn.js +1 -2
- package/decorator/relations/JoinColumn.js.map +1 -1
- package/decorator/relations/JoinTable.js +1 -2
- package/decorator/relations/JoinTable.js.map +1 -1
- package/decorator/relations/ManyToMany.js +1 -2
- package/decorator/relations/ManyToMany.js.map +1 -1
- package/decorator/relations/ManyToOne.js +1 -2
- package/decorator/relations/ManyToOne.js.map +1 -1
- package/decorator/relations/OneToMany.js +1 -2
- package/decorator/relations/OneToMany.js.map +1 -1
- package/decorator/relations/OneToOne.d.ts +4 -4
- package/decorator/relations/OneToOne.js +3 -4
- package/decorator/relations/OneToOne.js.map +1 -1
- package/decorator/relations/RelationCount.js +1 -2
- package/decorator/relations/RelationCount.js.map +1 -1
- package/decorator/relations/RelationId.js +1 -2
- package/decorator/relations/RelationId.js.map +1 -1
- package/decorator/tree/Tree.js +1 -2
- package/decorator/tree/Tree.js.map +1 -1
- package/decorator/tree/TreeChildren.js +1 -2
- package/decorator/tree/TreeChildren.js.map +1 -1
- package/decorator/tree/TreeLevelColumn.js +1 -2
- package/decorator/tree/TreeLevelColumn.js.map +1 -1
- package/decorator/tree/TreeParent.js +1 -2
- package/decorator/tree/TreeParent.js.map +1 -1
- package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.d.ts +1 -1
- package/driver/aurora-mysql/AuroraMysqlConnectionCredentialsOptions.js.map +1 -1
- package/driver/aurora-mysql/AuroraMysqlQueryRunner.d.ts +0 -1
- package/driver/better-sqlite3/BetterSqlite3Driver.js +2 -2
- package/driver/better-sqlite3/BetterSqlite3Driver.js.map +1 -1
- package/driver/better-sqlite3/BetterSqlite3QueryRunner.js +4 -0
- package/driver/better-sqlite3/BetterSqlite3QueryRunner.js.map +1 -1
- package/driver/cockroachdb/CockroachConnectionCredentialsOptions.d.ts +1 -2
- package/driver/cockroachdb/CockroachConnectionCredentialsOptions.js.map +1 -1
- package/driver/cockroachdb/CockroachConnectionOptions.d.ts +1 -1
- package/driver/cockroachdb/CockroachConnectionOptions.js.map +1 -1
- package/driver/cockroachdb/CockroachQueryRunner.d.ts +0 -1
- package/driver/cockroachdb/CockroachQueryRunner.js +5 -3
- package/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
- package/driver/mongodb/MongoConnectionOptions.d.ts +1 -2
- package/driver/mongodb/MongoConnectionOptions.js.map +1 -1
- package/driver/mongodb/MongoQueryRunner.d.ts +0 -1
- package/driver/mongodb/typings.d.ts +0 -8
- package/driver/mongodb/typings.js +0 -1
- package/driver/mongodb/typings.js.map +1 -1
- package/driver/mysql/MysqlConnectionCredentialsOptions.d.ts +1 -1
- package/driver/mysql/MysqlConnectionCredentialsOptions.js.map +1 -1
- package/driver/mysql/MysqlConnectionOptions.d.ts +1 -1
- package/driver/mysql/MysqlConnectionOptions.js.map +1 -1
- package/driver/mysql/MysqlQueryRunner.d.ts +0 -1
- package/driver/oracle/OracleConnectionCredentialsOptions.d.ts +1 -1
- package/driver/oracle/OracleConnectionCredentialsOptions.js.map +1 -1
- package/driver/oracle/OracleConnectionOptions.d.ts +1 -1
- package/driver/oracle/OracleConnectionOptions.js.map +1 -1
- package/driver/oracle/OracleQueryRunner.d.ts +0 -1
- package/driver/postgres/PostgresConnectionCredentialsOptions.d.ts +1 -2
- package/driver/postgres/PostgresConnectionCredentialsOptions.js.map +1 -1
- package/driver/postgres/PostgresConnectionOptions.d.ts +1 -1
- package/driver/postgres/PostgresConnectionOptions.js.map +1 -1
- package/driver/postgres/PostgresQueryRunner.d.ts +0 -1
- package/driver/postgres/PostgresQueryRunner.js +5 -1
- package/driver/postgres/PostgresQueryRunner.js.map +1 -1
- package/driver/sap/SapQueryRunner.d.ts +0 -1
- package/driver/spanner/SpannerConnectionCredentialsOptions.d.ts +1 -1
- package/driver/spanner/SpannerConnectionCredentialsOptions.js.map +1 -1
- package/driver/spanner/SpannerConnectionOptions.d.ts +1 -1
- package/driver/spanner/SpannerConnectionOptions.js.map +1 -1
- package/driver/spanner/SpannerQueryRunner.d.ts +0 -1
- package/driver/sqlite/SqliteDriver.js +2 -2
- package/driver/sqlite/SqliteDriver.js.map +1 -1
- package/driver/sqlite-abstract/AbstractSqliteQueryRunner.d.ts +0 -1
- package/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +1 -1
- package/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
- package/driver/sqlserver/SqlServerConnectionOptions.d.ts +1 -1
- package/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
- package/driver/sqlserver/SqlServerQueryRunner.d.ts +0 -1
- package/entity-manager/EntityManager.d.ts +2 -0
- package/entity-manager/EntityManager.js +4 -2
- package/entity-manager/EntityManager.js.map +1 -1
- package/find-options/FindOptionsOrder.d.ts +0 -1
- package/find-options/FindOptionsRelations.d.ts +0 -1
- package/find-options/FindOptionsSelect.d.ts +0 -1
- package/find-options/FindOptionsWhere.d.ts +0 -1
- package/find-options/operator/And.js +1 -2
- package/find-options/operator/And.js.map +1 -1
- package/find-options/operator/Any.js +1 -2
- package/find-options/operator/Any.js.map +1 -1
- package/find-options/operator/ArrayContainedBy.js +1 -2
- package/find-options/operator/ArrayContainedBy.js.map +1 -1
- package/find-options/operator/ArrayContains.js +1 -2
- package/find-options/operator/ArrayContains.js.map +1 -1
- package/find-options/operator/ArrayOverlap.js +1 -2
- package/find-options/operator/ArrayOverlap.js.map +1 -1
- package/find-options/operator/Between.js +1 -2
- package/find-options/operator/Between.js.map +1 -1
- package/find-options/operator/Equal.js +1 -2
- package/find-options/operator/Equal.js.map +1 -1
- package/find-options/operator/ILike.js +1 -2
- package/find-options/operator/ILike.js.map +1 -1
- package/find-options/operator/In.js +1 -2
- package/find-options/operator/In.js.map +1 -1
- package/find-options/operator/IsNull.js +1 -2
- package/find-options/operator/IsNull.js.map +1 -1
- package/find-options/operator/JsonContains.js +1 -2
- package/find-options/operator/JsonContains.js.map +1 -1
- package/find-options/operator/LessThan.js +1 -2
- package/find-options/operator/LessThan.js.map +1 -1
- package/find-options/operator/LessThanOrEqual.js +1 -2
- package/find-options/operator/LessThanOrEqual.js.map +1 -1
- package/find-options/operator/Like.js +1 -2
- package/find-options/operator/Like.js.map +1 -1
- package/find-options/operator/MoreThan.js +1 -2
- package/find-options/operator/MoreThan.js.map +1 -1
- package/find-options/operator/MoreThanOrEqual.js +1 -2
- package/find-options/operator/MoreThanOrEqual.js.map +1 -1
- package/find-options/operator/Not.js +1 -2
- package/find-options/operator/Not.js.map +1 -1
- package/find-options/operator/Or.js +1 -2
- package/find-options/operator/Or.js.map +1 -1
- package/find-options/operator/Raw.js +1 -2
- package/find-options/operator/Raw.js.map +1 -1
- package/globals.js +14 -15
- package/globals.js.map +1 -1
- package/metadata/ColumnMetadata.js +18 -9
- package/metadata/ColumnMetadata.js.map +1 -1
- package/package.json +1 -1
- package/platform/PlatformTools.d.ts +0 -4
- package/platform/PlatformTools.js +12 -18
- package/platform/PlatformTools.js.map +1 -1
- package/query-builder/InsertQueryBuilder.js.map +1 -1
- package/query-builder/QueryBuilder.js.map +1 -1
- package/query-builder/SelectQueryBuilder.d.ts +0 -1
- package/query-builder/index.js +1 -2
- package/query-builder/index.js.map +1 -1
- package/query-runner/QueryRunner.d.ts +0 -1
- package/repository/Repository.d.ts +2 -0
- package/repository/Repository.js +2 -0
- package/repository/Repository.js.map +1 -1
- package/schema-builder/RdbmsSchemaBuilder.js +1 -1
- package/schema-builder/RdbmsSchemaBuilder.js.map +1 -1
- package/util/DirectoryExportedClassesLoader.js +2 -3
- package/util/DirectoryExportedClassesLoader.js.map +1 -1
- package/util/ImportUtils.js +23 -36
- package/util/ImportUtils.js.map +1 -1
- package/util/PathUtils.js +3 -4
- package/util/PathUtils.js.map +1 -1
- package/util/StringUtils.js +6 -7
- package/util/StringUtils.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metadata/ColumnMetadata.ts"],"names":[],"mappings":";;;AAOA,+CAA2C;AAE3C,2EAAuE;AACvE,qDAAiD;AACjD,6DAAyD;AAGzD;;GAEG;AACH,MAAa,cAAc;IAyUvB,wEAAwE;IACxE,cAAc;IACd,wEAAwE;IAExE,YAAY,OAUX;QAtVQ,mBAAa,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAyCrD;;WAEG;QACH,WAAM,GAAW,EAAE,CAAA;QAiBnB;;WAEG;QACH,cAAS,GAAY,KAAK,CAAA;QAE1B;;WAEG;QACH,gBAAW,GAAY,KAAK,CAAA;QAE5B;;WAEG;QACH,eAAU,GAAY,KAAK,CAAA;QAE3B;;WAEG;QACH,aAAQ,GAAY,IAAI,CAAA;QAExB;;WAEG;QACH,aAAQ,GAAY,IAAI,CAAA;QAExB;;WAEG;QACH,aAAQ,GAAY,IAAI,CAAA;QA+CxB;;;WAGG;QACH,aAAQ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AAO,CAAC,IAAI,KAAK,SAAS;YAC5C,sEAAsE;YACtE,aAAa,GAAG,EAAE,CAAA;QACtB,OAAO,UAAU,CAAC,cAAc,CAAC,UAAU,CACvC,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,iBAAiB,EACtB,aAAa,CAChB,CAAA;IACL,CAAC;CACJ;AA98BD,wCA88BC","file":"ColumnMetadata.js","sourcesContent":["import { ColumnType } from \"../driver/types/ColumnTypes\"\nimport { EntityMetadata } from \"./EntityMetadata\"\nimport { EmbeddedMetadata } from \"./EmbeddedMetadata\"\nimport { RelationMetadata } from \"./RelationMetadata\"\nimport { ObjectLiteral } from \"../common/ObjectLiteral\"\nimport { ColumnMetadataArgs } from \"../metadata-args/ColumnMetadataArgs\"\nimport { DataSource } from \"../data-source/DataSource\"\nimport { OrmUtils } from \"../util/OrmUtils\"\nimport { ValueTransformer } from \"../decorator/options/ValueTransformer\"\nimport { ApplyValueTransformers } from \"../util/ApplyValueTransformers\"\nimport { ObjectUtils } from \"../util/ObjectUtils\"\nimport { InstanceChecker } from \"../util/InstanceChecker\"\nimport { VirtualColumnOptions } from \"../decorator/options/VirtualColumnOptions\"\n\n/**\n * This metadata contains all information about entity's column.\n */\nexport class ColumnMetadata {\n readonly \"@instanceof\" = Symbol.for(\"ColumnMetadata\")\n\n // ---------------------------------------------------------------------\n // Public Properties\n // ---------------------------------------------------------------------\n\n /**\n * Target class where column decorator is used.\n * This may not be always equal to entity metadata (for example embeds or inheritance cases).\n */\n target: Function | string\n\n /**\n * Entity metadata where this column metadata is.\n *\n * For example for @Column() name: string in Post, entityMetadata will be metadata of Post entity.\n */\n entityMetadata: EntityMetadata\n\n /**\n * Embedded metadata where this column metadata is.\n * If this column is not in embed then this property value is undefined.\n */\n embeddedMetadata?: EmbeddedMetadata\n\n /**\n * If column is a foreign key of some relation then this relation's metadata will be there.\n * If this column does not have a foreign key then this property value is undefined.\n */\n relationMetadata?: RelationMetadata\n\n /**\n * Class's property name on which this column is applied.\n */\n propertyName: string\n\n /**\n * The database type of the column.\n */\n type: ColumnType\n\n /**\n * Type's length in the database.\n */\n length: string = \"\"\n\n /**\n * Type's display width in the database.\n */\n width?: number\n\n /**\n * Defines column character set.\n */\n charset?: string\n\n /**\n * Defines column collation.\n */\n collation?: string\n\n /**\n * Indicates if this column is a primary key.\n */\n isPrimary: boolean = false\n\n /**\n * Indicates if this column is generated (auto increment or generated other way).\n */\n isGenerated: boolean = false\n\n /**\n * Indicates if column can contain nulls or not.\n */\n isNullable: boolean = false\n\n /**\n * Indicates if column is selected by query builder or not.\n */\n isSelect: boolean = true\n\n /**\n * Indicates if column is inserted by default or not.\n */\n isInsert: boolean = true\n\n /**\n * Indicates if column allows updates or not.\n */\n isUpdate: boolean = true\n\n /**\n * Specifies generation strategy if this column will use auto increment.\n */\n generationStrategy?: \"uuid\" | \"increment\" | \"rowid\"\n\n /**\n * Identity column type. Supports only in Postgres 10+.\n */\n generatedIdentity?: \"ALWAYS\" | \"BY DEFAULT\"\n\n /**\n * Column comment.\n * This feature is not supported by all databases.\n */\n comment?: string\n\n /**\n * Default database value.\n */\n default?:\n | number\n | boolean\n | string\n | null\n | (number | boolean | string)[]\n | Record<string, object>\n | (() => string)\n\n /**\n * ON UPDATE trigger. Works only for MySQL.\n */\n onUpdate?: string\n\n /**\n * The precision for a decimal (exact numeric) column (applies only for decimal column),\n * which is the maximum number of digits that are stored for the values.\n */\n precision?: number | null\n\n /**\n * The scale for a decimal (exact numeric) column (applies only for decimal column),\n * which represents the number of digits to the right of the decimal point and must not be greater than precision.\n */\n scale?: number\n\n /**\n * Puts ZEROFILL attribute on to numeric column. Works only for MySQL.\n * If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column\n */\n zerofill: boolean = false\n\n /**\n * Puts UNSIGNED attribute on to numeric column. Works only for MySQL.\n */\n unsigned: boolean = false\n\n /**\n * Array of possible enumerated values.\n *\n * `postgres` and `mysql` store enum values as strings but we want to keep support\n * for numeric and heterogeneous based typescript enums, so we need (string|number)[]\n */\n enum?: (string | number)[]\n\n /**\n * Exact name of enum\n */\n enumName?: string\n\n /**\n * Generated column expression.\n */\n asExpression?: string\n\n /**\n * Generated column type.\n */\n generatedType?: \"VIRTUAL\" | \"STORED\"\n\n /**\n * Return type of HSTORE column.\n * Returns value as string or as object.\n */\n hstoreType?: \"object\" | \"string\"\n\n /**\n * Indicates if this column is an array.\n */\n isArray: boolean = false\n\n /**\n * Gets full path to this column property (including column property name).\n * Full path is relevant when column is used in embeds (one or multiple nested).\n * For example it will return \"counters.subcounters.likes\".\n * If property is not in embeds then it returns just property name of the column.\n */\n propertyPath: string\n\n /**\n * Same as property path, but dots are replaced with '_'.\n * Used in query builder statements.\n */\n propertyAliasName: string\n\n /**\n * Gets full path to this column database name (including column database name).\n * Full path is relevant when column is used in embeds (one or multiple nested).\n * For example it will return \"counters.subcounters.likes\".\n * If property is not in embeds then it returns just database name of the column.\n */\n databasePath: string\n\n /**\n * Complete column name in the database including its embedded prefixes.\n */\n databaseName: string\n\n /**\n * Database name in the database without embedded prefixes applied.\n */\n databaseNameWithoutPrefixes: string\n\n /**\n * Database name set by entity metadata builder, not yet passed naming strategy process and without embedded prefixes.\n */\n givenDatabaseName?: string\n\n /**\n * Indicates if column is virtual. Virtual columns are not mapped to the entity.\n */\n isVirtual: boolean = false\n\n /**\n * Indicates if column is a virtual property. Virtual properties are not mapped to the entity.\n * This property is used in tandem the virtual column decorator.\n * @See https://typeorm.io/decorator-reference#virtualcolumn for more details.\n */\n isVirtualProperty: boolean = false\n\n /**\n * Query to be used to populate the column data. This query is used when generating the relational db script.\n * The query function is called with the current entities alias either defined by the Entity Decorator or automatically\n * @See https://typeorm.io/decorator-reference#virtualcolumn for more details.\n */\n query?: (alias: string) => string\n\n /**\n * Indicates if column is discriminator. Discriminator columns are not mapped to the entity.\n */\n isDiscriminator: boolean = false\n\n /**\n * Indicates if column is tree-level column. Tree-level columns are used in closure entities.\n */\n isTreeLevel: boolean = false\n\n /**\n * Indicates if this column contains an entity creation date.\n */\n isCreateDate: boolean = false\n\n /**\n * Indicates if this column contains an entity update date.\n */\n isUpdateDate: boolean = false\n\n /**\n * Indicates if this column contains an entity delete date.\n */\n isDeleteDate: boolean = false\n\n /**\n * Indicates if this column contains an entity version.\n */\n isVersion: boolean = false\n\n /**\n * Indicates if this column contains an object id.\n */\n isObjectId: boolean = false\n\n /**\n * If this column is foreign key then it references some other column,\n * and this property will contain reference to this column.\n */\n referencedColumn: ColumnMetadata | undefined\n\n /**\n * If this column is primary key then this specifies the name for it.\n */\n primaryKeyConstraintName?: string\n\n /**\n * If this column is foreign key then this specifies the name for it.\n */\n foreignKeyConstraintName?: string\n\n /**\n * Specifies a value transformer that is to be used to (un)marshal\n * this column when reading or writing to the database.\n */\n transformer?: ValueTransformer | ValueTransformer[]\n\n /**\n * Column type in the case if this column is in the closure table.\n * Column can be ancestor or descendant in the closure tables.\n */\n closureType?: \"ancestor\" | \"descendant\"\n\n /**\n * Indicates if this column is nested set's left column.\n * Used only in tree entities with nested-set type.\n */\n isNestedSetLeft: boolean = false\n\n /**\n * Indicates if this column is nested set's right column.\n * Used only in tree entities with nested-set type.\n */\n isNestedSetRight: boolean = false\n\n /**\n * Indicates if this column is materialized path's path column.\n * Used only in tree entities with materialized path type.\n */\n isMaterializedPath: boolean = false\n\n /**\n * Spatial Feature Type (Geometry, Point, Polygon, etc.)\n */\n spatialFeatureType?: string\n\n /**\n * SRID (Spatial Reference ID (EPSG code))\n */\n srid?: number\n\n // ---------------------------------------------------------------------\n // Constructor\n // ---------------------------------------------------------------------\n\n constructor(options: {\n connection: DataSource\n entityMetadata: EntityMetadata\n embeddedMetadata?: EmbeddedMetadata\n referencedColumn?: ColumnMetadata\n args: ColumnMetadataArgs\n closureType?: \"ancestor\" | \"descendant\"\n nestedSetLeft?: boolean\n nestedSetRight?: boolean\n materializedPath?: boolean\n }) {\n this.entityMetadata = options.entityMetadata\n this.embeddedMetadata = options.embeddedMetadata!\n this.referencedColumn = options.referencedColumn\n if (options.args.target) this.target = options.args.target\n if (options.args.propertyName)\n this.propertyName = options.args.propertyName\n if (options.args.options.name)\n this.givenDatabaseName = options.args.options.name\n if (options.args.options.type) this.type = options.args.options.type\n if (options.args.options.length)\n this.length = options.args.options.length\n ? options.args.options.length.toString()\n : \"\"\n if (options.args.options.width) this.width = options.args.options.width\n if (options.args.options.charset)\n this.charset = options.args.options.charset\n if (options.args.options.collation)\n this.collation = options.args.options.collation\n if (options.args.options.primary)\n this.isPrimary = options.args.options.primary\n if (options.args.options.default === null)\n // to make sure default: null is the same as nullable: true\n this.isNullable = true\n if (options.args.options.nullable !== undefined)\n this.isNullable = options.args.options.nullable\n if (options.args.options.select !== undefined)\n this.isSelect = options.args.options.select\n if (options.args.options.insert !== undefined)\n this.isInsert = options.args.options.insert\n if (options.args.options.update !== undefined)\n this.isUpdate = options.args.options.update\n if (options.args.options.readonly !== undefined)\n this.isUpdate = !options.args.options.readonly\n if (options.args.options.comment)\n this.comment = options.args.options.comment\n if (options.args.options.default !== undefined)\n this.default = options.args.options.default\n if (options.args.options.onUpdate)\n this.onUpdate = options.args.options.onUpdate\n if (options.args.options.generatedIdentity)\n this.generatedIdentity = options.args.options.generatedIdentity\n if (\n options.args.options.scale !== null &&\n options.args.options.scale !== undefined\n )\n this.scale = options.args.options.scale\n if (options.args.options.zerofill) {\n this.zerofill = options.args.options.zerofill\n this.unsigned = true // if you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column\n }\n if (options.args.options.unsigned)\n this.unsigned = options.args.options.unsigned\n if (options.args.options.precision !== null)\n this.precision = options.args.options.precision\n if (options.args.options.enum) {\n if (\n ObjectUtils.isObject(options.args.options.enum) &&\n !Array.isArray(options.args.options.enum)\n ) {\n this.enum = Object.keys(options.args.options.enum)\n // remove numeric keys - typescript numeric enum types generate them\n // From the documentation: “declaration merging” means that the compiler merges two separate declarations\n // declared with the same name into a single definition. This concept is often used to merge enum with namespace\n // where in namespace we define e.g. utility methods for creating enum. This is well known in other languages\n // like Java (enum methods). Here in case if enum have function, we need to remove it from metadata, otherwise\n // generated SQL statements contains string representation of that function which leads into syntax error\n // at database side.\n .filter(\n (key) =>\n isNaN(+key) &&\n typeof (options.args.options.enum as ObjectLiteral)[\n key\n ] !== \"function\",\n )\n .map(\n (key) =>\n (options.args.options.enum as ObjectLiteral)[key],\n )\n } else {\n this.enum = options.args.options.enum\n }\n }\n if (options.args.options.enumName) {\n this.enumName = options.args.options.enumName\n }\n if (options.args.options.primaryKeyConstraintName) {\n this.primaryKeyConstraintName =\n options.args.options.primaryKeyConstraintName\n }\n if (options.args.options.foreignKeyConstraintName) {\n this.foreignKeyConstraintName =\n options.args.options.foreignKeyConstraintName\n }\n if (options.args.options.asExpression) {\n this.asExpression = options.args.options.asExpression\n this.generatedType = options.args.options.generatedType\n ? options.args.options.generatedType\n : \"VIRTUAL\"\n }\n if (options.args.options.hstoreType)\n this.hstoreType = options.args.options.hstoreType\n if (options.args.options.array)\n this.isArray = options.args.options.array\n if (options.args.mode) {\n this.isVirtualProperty = options.args.mode === \"virtual-property\"\n this.isVirtual = options.args.mode === \"virtual\"\n this.isTreeLevel = options.args.mode === \"treeLevel\"\n this.isCreateDate = options.args.mode === \"createDate\"\n this.isUpdateDate = options.args.mode === \"updateDate\"\n this.isDeleteDate = options.args.mode === \"deleteDate\"\n this.isVersion = options.args.mode === \"version\"\n this.isObjectId = options.args.mode === \"objectId\"\n }\n if (this.isVirtualProperty) {\n this.isInsert = false\n this.isUpdate = false\n }\n if (options.args.options.transformer)\n this.transformer = options.args.options.transformer\n if (options.args.options.spatialFeatureType)\n this.spatialFeatureType = options.args.options.spatialFeatureType\n if (options.args.options.srid !== undefined)\n this.srid = options.args.options.srid\n if ((options.args.options as VirtualColumnOptions).query)\n this.query = (options.args.options as VirtualColumnOptions).query\n if (this.isTreeLevel)\n this.type = options.connection.driver.mappedDataTypes.treeLevel\n if (this.isCreateDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.createDate\n if (!this.default)\n this.default = () =>\n options.connection.driver.mappedDataTypes.createDateDefault\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.createDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.createDatePrecision\n }\n if (this.isUpdateDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.updateDate\n if (!this.default)\n this.default = () =>\n options.connection.driver.mappedDataTypes.updateDateDefault\n if (!this.onUpdate)\n this.onUpdate =\n options.connection.driver.mappedDataTypes.updateDateDefault\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.updateDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.updateDatePrecision\n }\n if (this.isDeleteDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.deleteDate\n if (!this.isNullable)\n this.isNullable =\n options.connection.driver.mappedDataTypes.deleteDateNullable\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.deleteDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.deleteDatePrecision\n }\n if (this.isVersion)\n this.type = options.connection.driver.mappedDataTypes.version\n if (options.closureType) this.closureType = options.closureType\n if (options.nestedSetLeft) this.isNestedSetLeft = options.nestedSetLeft\n if (options.nestedSetRight)\n this.isNestedSetRight = options.nestedSetRight\n if (options.materializedPath)\n this.isMaterializedPath = options.materializedPath\n }\n\n // ---------------------------------------------------------------------\n // Public Methods\n // ---------------------------------------------------------------------\n\n /**\n * Creates entity id map from the given entity ids array.\n */\n createValueMap(value: any, useDatabaseName = false) {\n // extract column value from embeds of entity if column is in embedded\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object and return it in a\n // { data: { information: { counters: { id: ... } } } } format\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n\n // now need to access post[data][information][counters] to get column value from the counters\n // and on each step we need to create complex literal object, e.g. first { data },\n // then { data: { information } }, then { data: { information: { counters } } },\n // then { data: { information: { counters: [this.propertyName]: entity[data][information][counters][this.propertyName] } } }\n // this recursive function helps doing that\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n map: ObjectLiteral,\n ): any => {\n const propertyName = propertyNames.shift()\n if (propertyName) {\n map[propertyName] = {}\n extractEmbeddedColumnValue(propertyNames, map[propertyName])\n return map\n }\n\n // this is bugfix for #720 when increment number is bigint we need to make sure its a string\n if (\n (this.generationStrategy === \"increment\" ||\n this.generationStrategy === \"rowid\") &&\n this.type === \"bigint\" &&\n value !== null\n )\n value = String(value)\n\n map[useDatabaseName ? this.databaseName : this.propertyName] =\n value\n return map\n }\n return extractEmbeddedColumnValue(propertyNames, {})\n } else {\n // no embeds - no problems. Simply return column property name and its value of the entity\n\n // this is bugfix for #720 when increment number is bigint we need to make sure its a string\n if (\n (this.generationStrategy === \"increment\" ||\n this.generationStrategy === \"rowid\") &&\n this.type === \"bigint\" &&\n value !== null\n )\n value = String(value)\n\n return {\n [useDatabaseName ? this.databaseName : this.propertyName]:\n value,\n }\n }\n }\n\n /**\n * Extracts column value and returns its column name with this value in a literal object.\n * If column is in embedded (or recursive embedded) it returns complex literal object.\n *\n * Examples what this method can return depend if this column is in embeds.\n * { id: 1 } or { title: \"hello\" }, { counters: { code: 1 } }, { data: { information: { counters: { code: 1 } } } }\n */\n getEntityValueMap(\n entity: ObjectLiteral,\n options?: { skipNulls?: boolean },\n ): ObjectLiteral | undefined {\n const returnNulls = false // options && options.skipNulls === false ? false : true; // todo: remove if current will not bring problems, uncomment if it will.\n\n // extract column value from embeds of entity if column is in embedded\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object and return it in a\n // { data: { information: { counters: { id: ... } } } } format\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n const isEmbeddedArray = this.embeddedMetadata.isArray\n\n // now need to access post[data][information][counters] to get column value from the counters\n // and on each step we need to create complex literal object, e.g. first { data },\n // then { data: { information } }, then { data: { information: { counters } } },\n // then { data: { information: { counters: [this.propertyName]: entity[data][information][counters][this.propertyName] } } }\n // this recursive function helps doing that\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n value: ObjectLiteral,\n ): ObjectLiteral => {\n if (value === undefined) {\n return {}\n }\n\n const propertyName = propertyNames.shift()\n\n if (propertyName) {\n const submap = extractEmbeddedColumnValue(\n propertyNames,\n value[propertyName],\n )\n if (Object.keys(submap).length > 0) {\n return { [propertyName]: submap }\n }\n return {}\n }\n\n if (isEmbeddedArray && Array.isArray(value)) {\n return value.map((v) => ({\n [this.propertyName]: v[this.propertyName],\n }))\n }\n\n if (\n value[this.propertyName] !== undefined &&\n (returnNulls === false || value[this.propertyName] !== null)\n ) {\n return { [this.propertyName]: value[this.propertyName] }\n }\n\n return {}\n }\n const map = extractEmbeddedColumnValue(propertyNames, entity)\n\n return Object.keys(map).length > 0 ? map : undefined\n } else {\n // no embeds - no problems. Simply return column property name and its value of the entity\n /**\n * Object.getOwnPropertyDescriptor checks if the relation is lazy, in which case value is a Promise\n * DO NOT use `entity[\n this.relationMetadata.propertyName] instanceof Promise`, which will invoke property getter and make unwanted DB request\n * refer: https://github.com/typeorm/typeorm/pull/8676#issuecomment-1049906331\n */\n if (\n this.relationMetadata &&\n !Object.getOwnPropertyDescriptor(\n entity,\n this.relationMetadata.propertyName,\n )?.get &&\n entity[this.relationMetadata.propertyName] &&\n ObjectUtils.isObject(entity[this.relationMetadata.propertyName])\n ) {\n const map = this.relationMetadata.joinColumns.reduce(\n (map, joinColumn) => {\n const value =\n joinColumn.referencedColumn!.getEntityValueMap(\n entity[this.relationMetadata!.propertyName],\n )\n if (value === undefined) return map\n return OrmUtils.mergeDeep(map, value)\n },\n {},\n )\n if (Object.keys(map).length > 0)\n return { [this.propertyName]: map }\n\n return undefined\n } else {\n if (\n entity[this.propertyName] !== undefined &&\n (returnNulls === false ||\n entity[this.propertyName] !== null)\n )\n return { [this.propertyName]: entity[this.propertyName] }\n\n return undefined\n }\n }\n }\n\n /**\n * Extracts column value from the given entity.\n * If column is in embedded (or recursive embedded) it extracts its value from there.\n */\n getEntityValue(\n entity: ObjectLiteral,\n transform: boolean = false,\n ): any | undefined {\n if (entity === undefined || entity === null) return undefined\n\n // extract column value from embeddeds of entity if column is in embedded\n let value: any = undefined\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n const isEmbeddedArray = this.embeddedMetadata.isArray\n\n // next we need to access post[data][information][counters][this.propertyName] to get column value from the counters\n // this recursive function takes array of generated property names and gets the post[data][information][counters] embed\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n value: ObjectLiteral,\n ): any => {\n const propertyName = propertyNames.shift()\n return propertyName && value\n ? extractEmbeddedColumnValue(\n propertyNames,\n value[propertyName],\n )\n : value\n }\n\n // once we get nested embed object we get its column, e.g. post[data][information][counters][this.propertyName]\n const embeddedObject = extractEmbeddedColumnValue(\n propertyNames,\n entity,\n )\n if (embeddedObject) {\n if (this.relationMetadata && this.referencedColumn) {\n const relatedEntity =\n this.relationMetadata.getEntityValue(embeddedObject)\n if (\n relatedEntity &&\n ObjectUtils.isObject(relatedEntity) &&\n !InstanceChecker.isFindOperator(relatedEntity) &&\n !Buffer.isBuffer(relatedEntity)\n ) {\n value =\n this.referencedColumn.getEntityValue(relatedEntity)\n } else if (\n embeddedObject[this.propertyName] &&\n ObjectUtils.isObject(\n embeddedObject[this.propertyName],\n ) &&\n !InstanceChecker.isFindOperator(\n embeddedObject[this.propertyName],\n ) &&\n !Buffer.isBuffer(embeddedObject[this.propertyName]) &&\n !(embeddedObject[this.propertyName] instanceof Date)\n ) {\n value = this.referencedColumn.getEntityValue(\n embeddedObject[this.propertyName],\n )\n } else {\n value = embeddedObject[this.propertyName]\n }\n } else if (this.referencedColumn) {\n value = this.referencedColumn.getEntityValue(\n embeddedObject[this.propertyName],\n )\n } else if (isEmbeddedArray && Array.isArray(embeddedObject)) {\n value = embeddedObject.map((o) => o[this.propertyName])\n } else {\n value = embeddedObject[this.propertyName]\n }\n }\n } else {\n // no embeds - no problems. Simply return column name by property name of the entity\n if (this.relationMetadata && this.referencedColumn) {\n const relatedEntity =\n this.relationMetadata.getEntityValue(entity)\n if (\n relatedEntity &&\n ObjectUtils.isObject(relatedEntity) &&\n !InstanceChecker.isFindOperator(relatedEntity) &&\n !(typeof relatedEntity === \"function\") &&\n !Buffer.isBuffer(relatedEntity)\n ) {\n value = this.referencedColumn.getEntityValue(relatedEntity)\n } else if (\n entity[this.propertyName] &&\n ObjectUtils.isObject(entity[this.propertyName]) &&\n !InstanceChecker.isFindOperator(\n entity[this.propertyName],\n ) &&\n !(typeof entity[this.propertyName] === \"function\") &&\n !Buffer.isBuffer(entity[this.propertyName]) &&\n !(entity[this.propertyName] instanceof Date)\n ) {\n value = this.referencedColumn.getEntityValue(\n entity[this.propertyName],\n )\n } else {\n value = entity[this.propertyName]\n }\n } else if (this.referencedColumn) {\n value = this.referencedColumn.getEntityValue(\n entity[this.propertyName],\n )\n } else {\n value = entity[this.propertyName]\n }\n }\n\n if (transform && this.transformer)\n value = ApplyValueTransformers.transformTo(this.transformer, value)\n\n return value\n }\n\n /**\n * Sets given entity's column value.\n * Using of this method helps to set entity relation's value of the lazy and non-lazy relations.\n */\n setEntityValue(entity: ObjectLiteral, value: any): void {\n if (this.embeddedMetadata) {\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const extractEmbeddedColumnValue = (\n embeddedMetadatas: EmbeddedMetadata[],\n map: ObjectLiteral,\n ): any => {\n // if (!object[embeddedMetadata.propertyName])\n // object[embeddedMetadata.propertyName] = embeddedMetadata.create();\n\n const embeddedMetadata = embeddedMetadatas.shift()\n if (embeddedMetadata) {\n if (!map[embeddedMetadata.propertyName])\n map[embeddedMetadata.propertyName] =\n embeddedMetadata.create()\n\n extractEmbeddedColumnValue(\n embeddedMetadatas,\n map[embeddedMetadata.propertyName],\n )\n return map\n }\n map[this.propertyName] = value\n return map\n }\n return extractEmbeddedColumnValue(\n [...this.embeddedMetadata.embeddedMetadataTree],\n entity,\n )\n } else {\n // we write a deep object in this entity only if the column is virtual\n // because if its not virtual it means the user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.propertyName !== this.propertyName\n ) {\n if (!(this.propertyName in entity)) {\n entity[this.propertyName] = {}\n }\n\n entity[this.propertyName][this.referencedColumn.propertyName] =\n value\n } else {\n entity[this.propertyName] = value\n }\n }\n }\n\n /**\n * Compares given entity's column value with a given value.\n */\n compareEntityValue(entity: any, valueToCompareWith: any) {\n const columnValue = this.getEntityValue(entity)\n if (ObjectUtils.isObject(columnValue)) {\n return columnValue.equals(valueToCompareWith)\n }\n return columnValue === valueToCompareWith\n }\n\n // ---------------------------------------------------------------------\n // Builder Methods\n // ---------------------------------------------------------------------\n\n build(connection: DataSource): this {\n this.propertyPath = this.buildPropertyPath()\n this.propertyAliasName = this.propertyPath.replace(\".\", \"_\")\n this.databaseName = this.buildDatabaseName(connection)\n this.databasePath = this.buildDatabasePath()\n this.databaseNameWithoutPrefixes = connection.namingStrategy.columnName(\n this.propertyName,\n this.givenDatabaseName,\n [],\n )\n return this\n }\n\n protected buildPropertyPath(): string {\n let path = \"\"\n if (\n this.embeddedMetadata &&\n this.embeddedMetadata.parentPropertyNames.length\n )\n path = this.embeddedMetadata.parentPropertyNames.join(\".\") + \".\"\n\n path += this.propertyName\n\n // we add reference column to property path only if this column is virtual\n // because if its not virtual it means user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.propertyName !== this.propertyName\n )\n path += \".\" + this.referencedColumn.propertyName\n\n return path\n }\n\n protected buildDatabasePath(): string {\n let path = \"\"\n if (\n this.embeddedMetadata &&\n this.embeddedMetadata.parentPropertyNames.length\n )\n path = this.embeddedMetadata.parentPropertyNames.join(\".\") + \".\"\n\n path += this.databaseName\n\n // we add reference column to property path only if this column is virtual\n // because if its not virtual it means user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.databaseName !== this.databaseName\n )\n path += \".\" + this.referencedColumn.databaseName\n\n return path\n }\n\n protected buildDatabaseName(connection: DataSource): string {\n let propertyNames = this.embeddedMetadata\n ? this.embeddedMetadata.parentPrefixes\n : []\n if (connection.driver.options.type === \"mongodb\")\n // we don't need to include embedded name for the mongodb column names\n propertyNames = []\n return connection.namingStrategy.columnName(\n this.propertyName,\n this.givenDatabaseName,\n propertyNames,\n )\n }\n}\n"],"sourceRoot":".."}
|
|
1
|
+
{"version":3,"sources":["../../src/metadata/ColumnMetadata.ts"],"names":[],"mappings":";;;AAOA,+CAA2C;AAE3C,2EAAuE;AACvE,qDAAiD;AACjD,6DAAyD;AAGzD;;GAEG;AACH,MAAa,cAAc;IAyUvB,wEAAwE;IACxE,cAAc;IACd,wEAAwE;IAExE,YAAY,OAUX;QAtVQ,mBAAa,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAyCrD;;WAEG;QACH,WAAM,GAAW,EAAE,CAAA;QAiBnB;;W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,gBAAgB;YACrB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM;YAEhD,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;QAEpE,IAAI,IAAI,IAAI,CAAC,YAAY,CAAA;QAEzB,0EAA0E;QAC1E,mFAAmF;QACnF,2DAA2D;QAC3D,IACI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU;YAC/B,IAAI,CAAC,SAAS;YACd,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,gBAAgB,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY;YAExD,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAA;QAEpD,OAAO,IAAI,CAAA;IACf,CAAC;IAES,iBAAiB,CAAC,UAAsB;QAC9C,IAAI,aAAa,GAAG,IAAI,CAAC,gBAAgB;YACrC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc;YACtC,CAAC,CAAC,EAAE,CAAA;QACR,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS;YAC5C,sEAAsE;YACtE,aAAa,GAAG,EAAE,CAAA;QACtB,OAAO,UAAU,CAAC,cAAc,CAAC,UAAU,CACvC,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,iBAAiB,EACtB,aAAa,CAChB,CAAA;IACL,CAAC;CACJ;AAz9BD,wCAy9BC","file":"ColumnMetadata.js","sourcesContent":["import { ColumnType } from \"../driver/types/ColumnTypes\"\nimport { EntityMetadata } from \"./EntityMetadata\"\nimport { EmbeddedMetadata } from \"./EmbeddedMetadata\"\nimport { RelationMetadata } from \"./RelationMetadata\"\nimport { ObjectLiteral } from \"../common/ObjectLiteral\"\nimport { ColumnMetadataArgs } from \"../metadata-args/ColumnMetadataArgs\"\nimport { DataSource } from \"../data-source/DataSource\"\nimport { OrmUtils } from \"../util/OrmUtils\"\nimport { ValueTransformer } from \"../decorator/options/ValueTransformer\"\nimport { ApplyValueTransformers } from \"../util/ApplyValueTransformers\"\nimport { ObjectUtils } from \"../util/ObjectUtils\"\nimport { InstanceChecker } from \"../util/InstanceChecker\"\nimport { VirtualColumnOptions } from \"../decorator/options/VirtualColumnOptions\"\n\n/**\n * This metadata contains all information about entity's column.\n */\nexport class ColumnMetadata {\n readonly \"@instanceof\" = Symbol.for(\"ColumnMetadata\")\n\n // ---------------------------------------------------------------------\n // Public Properties\n // ---------------------------------------------------------------------\n\n /**\n * Target class where column decorator is used.\n * This may not be always equal to entity metadata (for example embeds or inheritance cases).\n */\n target: Function | string\n\n /**\n * Entity metadata where this column metadata is.\n *\n * For example for @Column() name: string in Post, entityMetadata will be metadata of Post entity.\n */\n entityMetadata: EntityMetadata\n\n /**\n * Embedded metadata where this column metadata is.\n * If this column is not in embed then this property value is undefined.\n */\n embeddedMetadata?: EmbeddedMetadata\n\n /**\n * If column is a foreign key of some relation then this relation's metadata will be there.\n * If this column does not have a foreign key then this property value is undefined.\n */\n relationMetadata?: RelationMetadata\n\n /**\n * Class's property name on which this column is applied.\n */\n propertyName: string\n\n /**\n * The database type of the column.\n */\n type: ColumnType\n\n /**\n * Type's length in the database.\n */\n length: string = \"\"\n\n /**\n * Type's display width in the database.\n */\n width?: number\n\n /**\n * Defines column character set.\n */\n charset?: string\n\n /**\n * Defines column collation.\n */\n collation?: string\n\n /**\n * Indicates if this column is a primary key.\n */\n isPrimary: boolean = false\n\n /**\n * Indicates if this column is generated (auto increment or generated other way).\n */\n isGenerated: boolean = false\n\n /**\n * Indicates if column can contain nulls or not.\n */\n isNullable: boolean = false\n\n /**\n * Indicates if column is selected by query builder or not.\n */\n isSelect: boolean = true\n\n /**\n * Indicates if column is inserted by default or not.\n */\n isInsert: boolean = true\n\n /**\n * Indicates if column allows updates or not.\n */\n isUpdate: boolean = true\n\n /**\n * Specifies generation strategy if this column will use auto increment.\n */\n generationStrategy?: \"uuid\" | \"increment\" | \"rowid\"\n\n /**\n * Identity column type. Supports only in Postgres 10+.\n */\n generatedIdentity?: \"ALWAYS\" | \"BY DEFAULT\"\n\n /**\n * Column comment.\n * This feature is not supported by all databases.\n */\n comment?: string\n\n /**\n * Default database value.\n */\n default?:\n | number\n | boolean\n | string\n | null\n | (number | boolean | string)[]\n | Record<string, object>\n | (() => string)\n\n /**\n * ON UPDATE trigger. Works only for MySQL.\n */\n onUpdate?: string\n\n /**\n * The precision for a decimal (exact numeric) column (applies only for decimal column),\n * which is the maximum number of digits that are stored for the values.\n */\n precision?: number | null\n\n /**\n * The scale for a decimal (exact numeric) column (applies only for decimal column),\n * which represents the number of digits to the right of the decimal point and must not be greater than precision.\n */\n scale?: number\n\n /**\n * Puts ZEROFILL attribute on to numeric column. Works only for MySQL.\n * If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column\n */\n zerofill: boolean = false\n\n /**\n * Puts UNSIGNED attribute on to numeric column. Works only for MySQL.\n */\n unsigned: boolean = false\n\n /**\n * Array of possible enumerated values.\n *\n * `postgres` and `mysql` store enum values as strings but we want to keep support\n * for numeric and heterogeneous based typescript enums, so we need (string|number)[]\n */\n enum?: (string | number)[]\n\n /**\n * Exact name of enum\n */\n enumName?: string\n\n /**\n * Generated column expression.\n */\n asExpression?: string\n\n /**\n * Generated column type.\n */\n generatedType?: \"VIRTUAL\" | \"STORED\"\n\n /**\n * Return type of HSTORE column.\n * Returns value as string or as object.\n */\n hstoreType?: \"object\" | \"string\"\n\n /**\n * Indicates if this column is an array.\n */\n isArray: boolean = false\n\n /**\n * Gets full path to this column property (including column property name).\n * Full path is relevant when column is used in embeds (one or multiple nested).\n * For example it will return \"counters.subcounters.likes\".\n * If property is not in embeds then it returns just property name of the column.\n */\n propertyPath: string\n\n /**\n * Same as property path, but dots are replaced with '_'.\n * Used in query builder statements.\n */\n propertyAliasName: string\n\n /**\n * Gets full path to this column database name (including column database name).\n * Full path is relevant when column is used in embeds (one or multiple nested).\n * For example it will return \"counters.subcounters.likes\".\n * If property is not in embeds then it returns just database name of the column.\n */\n databasePath: string\n\n /**\n * Complete column name in the database including its embedded prefixes.\n */\n databaseName: string\n\n /**\n * Database name in the database without embedded prefixes applied.\n */\n databaseNameWithoutPrefixes: string\n\n /**\n * Database name set by entity metadata builder, not yet passed naming strategy process and without embedded prefixes.\n */\n givenDatabaseName?: string\n\n /**\n * Indicates if column is virtual. Virtual columns are not mapped to the entity.\n */\n isVirtual: boolean = false\n\n /**\n * Indicates if column is a virtual property. Virtual properties are not mapped to the entity.\n * This property is used in tandem the virtual column decorator.\n * @See https://typeorm.io/decorator-reference#virtualcolumn for more details.\n */\n isVirtualProperty: boolean = false\n\n /**\n * Query to be used to populate the column data. This query is used when generating the relational db script.\n * The query function is called with the current entities alias either defined by the Entity Decorator or automatically\n * @See https://typeorm.io/decorator-reference#virtualcolumn for more details.\n */\n query?: (alias: string) => string\n\n /**\n * Indicates if column is discriminator. Discriminator columns are not mapped to the entity.\n */\n isDiscriminator: boolean = false\n\n /**\n * Indicates if column is tree-level column. Tree-level columns are used in closure entities.\n */\n isTreeLevel: boolean = false\n\n /**\n * Indicates if this column contains an entity creation date.\n */\n isCreateDate: boolean = false\n\n /**\n * Indicates if this column contains an entity update date.\n */\n isUpdateDate: boolean = false\n\n /**\n * Indicates if this column contains an entity delete date.\n */\n isDeleteDate: boolean = false\n\n /**\n * Indicates if this column contains an entity version.\n */\n isVersion: boolean = false\n\n /**\n * Indicates if this column contains an object id.\n */\n isObjectId: boolean = false\n\n /**\n * If this column is foreign key then it references some other column,\n * and this property will contain reference to this column.\n */\n referencedColumn: ColumnMetadata | undefined\n\n /**\n * If this column is primary key then this specifies the name for it.\n */\n primaryKeyConstraintName?: string\n\n /**\n * If this column is foreign key then this specifies the name for it.\n */\n foreignKeyConstraintName?: string\n\n /**\n * Specifies a value transformer that is to be used to (un)marshal\n * this column when reading or writing to the database.\n */\n transformer?: ValueTransformer | ValueTransformer[]\n\n /**\n * Column type in the case if this column is in the closure table.\n * Column can be ancestor or descendant in the closure tables.\n */\n closureType?: \"ancestor\" | \"descendant\"\n\n /**\n * Indicates if this column is nested set's left column.\n * Used only in tree entities with nested-set type.\n */\n isNestedSetLeft: boolean = false\n\n /**\n * Indicates if this column is nested set's right column.\n * Used only in tree entities with nested-set type.\n */\n isNestedSetRight: boolean = false\n\n /**\n * Indicates if this column is materialized path's path column.\n * Used only in tree entities with materialized path type.\n */\n isMaterializedPath: boolean = false\n\n /**\n * Spatial Feature Type (Geometry, Point, Polygon, etc.)\n */\n spatialFeatureType?: string\n\n /**\n * SRID (Spatial Reference ID (EPSG code))\n */\n srid?: number\n\n // ---------------------------------------------------------------------\n // Constructor\n // ---------------------------------------------------------------------\n\n constructor(options: {\n connection: DataSource\n entityMetadata: EntityMetadata\n embeddedMetadata?: EmbeddedMetadata\n referencedColumn?: ColumnMetadata\n args: ColumnMetadataArgs\n closureType?: \"ancestor\" | \"descendant\"\n nestedSetLeft?: boolean\n nestedSetRight?: boolean\n materializedPath?: boolean\n }) {\n this.entityMetadata = options.entityMetadata\n this.embeddedMetadata = options.embeddedMetadata!\n this.referencedColumn = options.referencedColumn\n if (options.args.target) this.target = options.args.target\n if (options.args.propertyName)\n this.propertyName = options.args.propertyName\n if (options.args.options.name)\n this.givenDatabaseName = options.args.options.name\n if (options.args.options.type) this.type = options.args.options.type\n if (options.args.options.length)\n this.length = options.args.options.length\n ? options.args.options.length.toString()\n : \"\"\n if (options.args.options.width) this.width = options.args.options.width\n if (options.args.options.charset)\n this.charset = options.args.options.charset\n if (options.args.options.collation)\n this.collation = options.args.options.collation\n if (options.args.options.primary)\n this.isPrimary = options.args.options.primary\n if (options.args.options.default === null)\n // to make sure default: null is the same as nullable: true\n this.isNullable = true\n if (options.args.options.nullable !== undefined)\n this.isNullable = options.args.options.nullable\n if (options.args.options.select !== undefined)\n this.isSelect = options.args.options.select\n if (options.args.options.insert !== undefined)\n this.isInsert = options.args.options.insert\n if (options.args.options.update !== undefined)\n this.isUpdate = options.args.options.update\n if (options.args.options.readonly !== undefined)\n this.isUpdate = !options.args.options.readonly\n if (options.args.options.comment)\n this.comment = options.args.options.comment\n if (options.args.options.default !== undefined)\n this.default = options.args.options.default\n if (options.args.options.onUpdate)\n this.onUpdate = options.args.options.onUpdate\n if (options.args.options.generatedIdentity)\n this.generatedIdentity = options.args.options.generatedIdentity\n if (\n options.args.options.scale !== null &&\n options.args.options.scale !== undefined\n )\n this.scale = options.args.options.scale\n if (options.args.options.zerofill) {\n this.zerofill = options.args.options.zerofill\n this.unsigned = true // if you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column\n }\n if (options.args.options.unsigned)\n this.unsigned = options.args.options.unsigned\n if (options.args.options.precision !== null)\n this.precision = options.args.options.precision\n if (options.args.options.enum) {\n if (\n ObjectUtils.isObject(options.args.options.enum) &&\n !Array.isArray(options.args.options.enum)\n ) {\n this.enum = Object.keys(options.args.options.enum)\n // remove numeric keys - typescript numeric enum types generate them\n // From the documentation: “declaration merging” means that the compiler merges two separate declarations\n // declared with the same name into a single definition. This concept is often used to merge enum with namespace\n // where in namespace we define e.g. utility methods for creating enum. This is well known in other languages\n // like Java (enum methods). Here in case if enum have function, we need to remove it from metadata, otherwise\n // generated SQL statements contains string representation of that function which leads into syntax error\n // at database side.\n .filter(\n (key) =>\n isNaN(+key) &&\n typeof (options.args.options.enum as ObjectLiteral)[\n key\n ] !== \"function\",\n )\n .map(\n (key) =>\n (options.args.options.enum as ObjectLiteral)[key],\n )\n } else {\n this.enum = options.args.options.enum\n }\n }\n if (options.args.options.enumName) {\n this.enumName = options.args.options.enumName\n }\n if (options.args.options.primaryKeyConstraintName) {\n this.primaryKeyConstraintName =\n options.args.options.primaryKeyConstraintName\n }\n if (options.args.options.foreignKeyConstraintName) {\n this.foreignKeyConstraintName =\n options.args.options.foreignKeyConstraintName\n }\n if (options.args.options.asExpression) {\n this.asExpression = options.args.options.asExpression\n this.generatedType = options.args.options.generatedType\n ? options.args.options.generatedType\n : \"VIRTUAL\"\n }\n if (options.args.options.hstoreType)\n this.hstoreType = options.args.options.hstoreType\n if (options.args.options.array)\n this.isArray = options.args.options.array\n if (options.args.mode) {\n this.isVirtualProperty = options.args.mode === \"virtual-property\"\n this.isVirtual = options.args.mode === \"virtual\"\n this.isTreeLevel = options.args.mode === \"treeLevel\"\n this.isCreateDate = options.args.mode === \"createDate\"\n this.isUpdateDate = options.args.mode === \"updateDate\"\n this.isDeleteDate = options.args.mode === \"deleteDate\"\n this.isVersion = options.args.mode === \"version\"\n this.isObjectId = options.args.mode === \"objectId\"\n }\n if (this.isVirtualProperty) {\n this.isInsert = false\n this.isUpdate = false\n }\n if (options.args.options.transformer)\n this.transformer = options.args.options.transformer\n if (options.args.options.spatialFeatureType)\n this.spatialFeatureType = options.args.options.spatialFeatureType\n if (options.args.options.srid !== undefined)\n this.srid = options.args.options.srid\n if ((options.args.options as VirtualColumnOptions).query)\n this.query = (options.args.options as VirtualColumnOptions).query\n if (this.isTreeLevel)\n this.type = options.connection.driver.mappedDataTypes.treeLevel\n if (this.isCreateDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.createDate\n if (!this.default)\n this.default = () =>\n options.connection.driver.mappedDataTypes.createDateDefault\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.createDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.createDatePrecision\n }\n if (this.isUpdateDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.updateDate\n if (!this.default)\n this.default = () =>\n options.connection.driver.mappedDataTypes.updateDateDefault\n if (!this.onUpdate)\n this.onUpdate =\n options.connection.driver.mappedDataTypes.updateDateDefault\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.updateDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.updateDatePrecision\n }\n if (this.isDeleteDate) {\n if (!this.type)\n this.type = options.connection.driver.mappedDataTypes.deleteDate\n if (!this.isNullable)\n this.isNullable =\n options.connection.driver.mappedDataTypes.deleteDateNullable\n // skip precision if it was explicitly set to \"null\" in column options. Otherwise use default precision if it exist.\n if (\n this.precision === undefined &&\n options.args.options.precision === undefined &&\n options.connection.driver.mappedDataTypes.deleteDatePrecision\n )\n this.precision =\n options.connection.driver.mappedDataTypes.deleteDatePrecision\n }\n if (this.isVersion)\n this.type = options.connection.driver.mappedDataTypes.version\n if (options.closureType) this.closureType = options.closureType\n if (options.nestedSetLeft) this.isNestedSetLeft = options.nestedSetLeft\n if (options.nestedSetRight)\n this.isNestedSetRight = options.nestedSetRight\n if (options.materializedPath)\n this.isMaterializedPath = options.materializedPath\n }\n\n // ---------------------------------------------------------------------\n // Public Methods\n // ---------------------------------------------------------------------\n\n /**\n * Creates entity id map from the given entity ids array.\n */\n createValueMap(value: any, useDatabaseName = false) {\n // extract column value from embeds of entity if column is in embedded\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object and return it in a\n // { data: { information: { counters: { id: ... } } } } format\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n\n // now need to access post[data][information][counters] to get column value from the counters\n // and on each step we need to create complex literal object, e.g. first { data },\n // then { data: { information } }, then { data: { information: { counters } } },\n // then { data: { information: { counters: [this.propertyName]: entity[data][information][counters][this.propertyName] } } }\n // this recursive function helps doing that\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n map: ObjectLiteral,\n ): any => {\n const propertyName = propertyNames.shift()\n if (propertyName) {\n map[propertyName] = {}\n extractEmbeddedColumnValue(propertyNames, map[propertyName])\n return map\n }\n\n // this is bugfix for #720 when increment number is bigint we need to make sure its a string\n if (\n (this.generationStrategy === \"increment\" ||\n this.generationStrategy === \"rowid\") &&\n this.type === \"bigint\" &&\n value !== null\n )\n value = String(value)\n\n map[useDatabaseName ? this.databaseName : this.propertyName] =\n value\n return map\n }\n return extractEmbeddedColumnValue(propertyNames, {})\n } else {\n // no embeds - no problems. Simply return column property name and its value of the entity\n\n // this is bugfix for #720 when increment number is bigint we need to make sure its a string\n if (\n (this.generationStrategy === \"increment\" ||\n this.generationStrategy === \"rowid\") &&\n this.type === \"bigint\" &&\n value !== null\n )\n value = String(value)\n\n return {\n [useDatabaseName ? this.databaseName : this.propertyName]:\n value,\n }\n }\n }\n\n /**\n * Extracts column value and returns its column name with this value in a literal object.\n * If column is in embedded (or recursive embedded) it returns complex literal object.\n *\n * Examples what this method can return depend if this column is in embeds.\n * { id: 1 } or { title: \"hello\" }, { counters: { code: 1 } }, { data: { information: { counters: { code: 1 } } } }\n */\n getEntityValueMap(\n entity: ObjectLiteral,\n options?: { skipNulls?: boolean },\n ): ObjectLiteral | undefined {\n const returnNulls = false // options && options.skipNulls === false ? false : true; // todo: remove if current will not bring problems, uncomment if it will.\n\n // extract column value from embeds of entity if column is in embedded\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object and return it in a\n // { data: { information: { counters: { id: ... } } } } format\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n const isEmbeddedArray = this.embeddedMetadata.isArray\n\n // now need to access post[data][information][counters] to get column value from the counters\n // and on each step we need to create complex literal object, e.g. first { data },\n // then { data: { information } }, then { data: { information: { counters } } },\n // then { data: { information: { counters: [this.propertyName]: entity[data][information][counters][this.propertyName] } } }\n // this recursive function helps doing that\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n value: ObjectLiteral,\n ): ObjectLiteral => {\n if (value === undefined) {\n return {}\n }\n\n const propertyName = propertyNames.shift()\n\n if (propertyName) {\n const submap = extractEmbeddedColumnValue(\n propertyNames,\n value[propertyName],\n )\n if (Object.keys(submap).length > 0) {\n return { [propertyName]: submap }\n }\n return {}\n }\n\n if (isEmbeddedArray && Array.isArray(value)) {\n return value.map((v) => ({\n [this.propertyName]: v[this.propertyName],\n }))\n }\n\n if (\n value[this.propertyName] !== undefined &&\n (returnNulls === false || value[this.propertyName] !== null)\n ) {\n return { [this.propertyName]: value[this.propertyName] }\n }\n\n return {}\n }\n const map = extractEmbeddedColumnValue(propertyNames, entity)\n\n return Object.keys(map).length > 0 ? map : undefined\n } else {\n // no embeds - no problems. Simply return column property name and its value of the entity\n /**\n * Object.getOwnPropertyDescriptor checks if the relation is lazy, in which case value is a Promise\n * DO NOT use `entity[\n this.relationMetadata.propertyName] instanceof Promise`, which will invoke property getter and make unwanted DB request\n * refer: https://github.com/typeorm/typeorm/pull/8676#issuecomment-1049906331\n */\n if (\n this.relationMetadata &&\n !Object.getOwnPropertyDescriptor(\n entity,\n this.relationMetadata.propertyName,\n )?.get &&\n entity[this.relationMetadata.propertyName] &&\n ObjectUtils.isObject(entity[this.relationMetadata.propertyName])\n ) {\n if (this.relationMetadata.joinColumns.length > 1) {\n const map = this.relationMetadata.joinColumns.reduce(\n (map, joinColumn) => {\n const value =\n joinColumn.referencedColumn!.getEntityValueMap(\n entity[this.relationMetadata!.propertyName],\n )\n if (value === undefined) return map\n return OrmUtils.mergeDeep(map, value)\n },\n {},\n )\n if (Object.keys(map).length > 0)\n return { [this.propertyName]: map }\n } else {\n const value =\n this.relationMetadata.joinColumns[0].referencedColumn!.getEntityValue(\n entity[this.relationMetadata!.propertyName],\n )\n if (value) {\n return { [this.propertyName]: value }\n }\n }\n\n return undefined\n } else {\n if (\n entity[this.propertyName] !== undefined &&\n (returnNulls === false ||\n entity[this.propertyName] !== null)\n ) {\n return { [this.propertyName]: entity[this.propertyName] }\n }\n\n return undefined\n }\n }\n }\n\n /**\n * Extracts column value from the given entity.\n * If column is in embedded (or recursive embedded) it extracts its value from there.\n */\n getEntityValue(\n entity: ObjectLiteral,\n transform: boolean = false,\n ): any | undefined {\n if (entity === undefined || entity === null) return undefined\n\n // extract column value from embeddeds of entity if column is in embedded\n let value: any = undefined\n if (this.embeddedMetadata) {\n // example: post[data][information][counters].id where \"data\", \"information\" and \"counters\" are embeddeds\n // we need to get value of \"id\" column from the post real entity object\n\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const propertyNames = [...this.embeddedMetadata.parentPropertyNames]\n const isEmbeddedArray = this.embeddedMetadata.isArray\n\n // next we need to access post[data][information][counters][this.propertyName] to get column value from the counters\n // this recursive function takes array of generated property names and gets the post[data][information][counters] embed\n const extractEmbeddedColumnValue = (\n propertyNames: string[],\n value: ObjectLiteral,\n ): any => {\n const propertyName = propertyNames.shift()\n return propertyName && value\n ? extractEmbeddedColumnValue(\n propertyNames,\n value[propertyName],\n )\n : value\n }\n\n // once we get nested embed object we get its column, e.g. post[data][information][counters][this.propertyName]\n const embeddedObject = extractEmbeddedColumnValue(\n propertyNames,\n entity,\n )\n if (embeddedObject) {\n if (this.relationMetadata && this.referencedColumn) {\n const relatedEntity =\n this.relationMetadata.getEntityValue(embeddedObject)\n if (\n relatedEntity &&\n ObjectUtils.isObject(relatedEntity) &&\n !InstanceChecker.isFindOperator(relatedEntity) &&\n !Buffer.isBuffer(relatedEntity)\n ) {\n value =\n this.referencedColumn.getEntityValue(relatedEntity)\n } else if (\n embeddedObject[this.propertyName] &&\n ObjectUtils.isObject(\n embeddedObject[this.propertyName],\n ) &&\n !InstanceChecker.isFindOperator(\n embeddedObject[this.propertyName],\n ) &&\n !Buffer.isBuffer(embeddedObject[this.propertyName]) &&\n !(embeddedObject[this.propertyName] instanceof Date)\n ) {\n value = this.referencedColumn.getEntityValue(\n embeddedObject[this.propertyName],\n )\n } else {\n value = embeddedObject[this.propertyName]\n }\n } else if (this.referencedColumn) {\n value = this.referencedColumn.getEntityValue(\n embeddedObject[this.propertyName],\n )\n } else if (isEmbeddedArray && Array.isArray(embeddedObject)) {\n value = embeddedObject.map((o) => o[this.propertyName])\n } else {\n value = embeddedObject[this.propertyName]\n }\n }\n } else {\n // no embeds - no problems. Simply return column name by property name of the entity\n if (this.relationMetadata && this.referencedColumn) {\n const relatedEntity =\n this.relationMetadata.getEntityValue(entity)\n if (\n relatedEntity &&\n ObjectUtils.isObject(relatedEntity) &&\n !InstanceChecker.isFindOperator(relatedEntity) &&\n !(typeof relatedEntity === \"function\") &&\n !Buffer.isBuffer(relatedEntity)\n ) {\n value = this.referencedColumn.getEntityValue(relatedEntity)\n } else if (\n entity[this.propertyName] &&\n ObjectUtils.isObject(entity[this.propertyName]) &&\n !InstanceChecker.isFindOperator(\n entity[this.propertyName],\n ) &&\n !(typeof entity[this.propertyName] === \"function\") &&\n !Buffer.isBuffer(entity[this.propertyName]) &&\n !(entity[this.propertyName] instanceof Date)\n ) {\n value = this.referencedColumn.getEntityValue(\n entity[this.propertyName],\n )\n } else {\n value = entity[this.propertyName]\n }\n } else if (this.referencedColumn) {\n value = this.referencedColumn.getEntityValue(\n entity[this.propertyName],\n )\n } else {\n value = entity[this.propertyName]\n }\n }\n\n if (transform && this.transformer)\n value = ApplyValueTransformers.transformTo(this.transformer, value)\n\n return value\n }\n\n /**\n * Sets given entity's column value.\n * Using of this method helps to set entity relation's value of the lazy and non-lazy relations.\n */\n setEntityValue(entity: ObjectLiteral, value: any): void {\n if (this.embeddedMetadata) {\n // first step - we extract all parent properties of the entity relative to this column, e.g. [data, information, counters]\n const extractEmbeddedColumnValue = (\n embeddedMetadatas: EmbeddedMetadata[],\n map: ObjectLiteral,\n ): any => {\n // if (!object[embeddedMetadata.propertyName])\n // object[embeddedMetadata.propertyName] = embeddedMetadata.create();\n\n const embeddedMetadata = embeddedMetadatas.shift()\n if (embeddedMetadata) {\n if (!map[embeddedMetadata.propertyName])\n map[embeddedMetadata.propertyName] =\n embeddedMetadata.create()\n\n extractEmbeddedColumnValue(\n embeddedMetadatas,\n map[embeddedMetadata.propertyName],\n )\n return map\n }\n map[this.propertyName] = value\n return map\n }\n return extractEmbeddedColumnValue(\n [...this.embeddedMetadata.embeddedMetadataTree],\n entity,\n )\n } else {\n // we write a deep object in this entity only if the column is virtual\n // because if its not virtual it means the user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.propertyName !== this.propertyName\n ) {\n if (!(this.propertyName in entity)) {\n entity[this.propertyName] = {}\n }\n\n entity[this.propertyName][this.referencedColumn.propertyName] =\n value\n } else {\n entity[this.propertyName] = value\n }\n }\n }\n\n /**\n * Compares given entity's column value with a given value.\n */\n compareEntityValue(entity: any, valueToCompareWith: any) {\n const columnValue = this.getEntityValue(entity)\n if (ObjectUtils.isObject(columnValue)) {\n return columnValue.equals(valueToCompareWith)\n }\n return columnValue === valueToCompareWith\n }\n\n // ---------------------------------------------------------------------\n // Builder Methods\n // ---------------------------------------------------------------------\n\n build(connection: DataSource): this {\n this.propertyPath = this.buildPropertyPath()\n this.propertyAliasName = this.propertyPath.replace(\".\", \"_\")\n this.databaseName = this.buildDatabaseName(connection)\n this.databasePath = this.buildDatabasePath()\n this.databaseNameWithoutPrefixes = connection.namingStrategy.columnName(\n this.propertyName,\n this.givenDatabaseName,\n [],\n )\n return this\n }\n\n protected buildPropertyPath(): string {\n let path = \"\"\n if (\n this.embeddedMetadata &&\n this.embeddedMetadata.parentPropertyNames.length\n )\n path = this.embeddedMetadata.parentPropertyNames.join(\".\") + \".\"\n\n path += this.propertyName\n\n // we add reference column to property path only if this column is virtual\n // because if its not virtual it means user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.propertyName !== this.propertyName\n )\n path += \".\" + this.referencedColumn.propertyName\n\n return path\n }\n\n protected buildDatabasePath(): string {\n let path = \"\"\n if (\n this.embeddedMetadata &&\n this.embeddedMetadata.parentPropertyNames.length\n )\n path = this.embeddedMetadata.parentPropertyNames.join(\".\") + \".\"\n\n path += this.databaseName\n\n // we add reference column to property path only if this column is virtual\n // because if its not virtual it means user defined a real column for this relation\n // also we don't do it if column is inside a junction table\n if (\n !this.entityMetadata.isJunction &&\n this.isVirtual &&\n this.referencedColumn &&\n this.referencedColumn.databaseName !== this.databaseName\n )\n path += \".\" + this.referencedColumn.databaseName\n\n return path\n }\n\n protected buildDatabaseName(connection: DataSource): string {\n let propertyNames = this.embeddedMetadata\n ? this.embeddedMetadata.parentPrefixes\n : []\n if (connection.driver.options.type === \"mongodb\")\n // we don't need to include embedded name for the mongodb column names\n propertyNames = []\n return connection.namingStrategy.columnName(\n this.propertyName,\n this.givenDatabaseName,\n propertyNames,\n )\n }\n}\n"],"sourceRoot":".."}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "typeorm", "private": false, "version": "0.3.21-dev.
|
|
1
|
+
{ "name": "typeorm", "private": false, "version": "0.3.21-dev.4d31902", "description": "Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.", "license": "MIT", "readmeFilename": "README.md", "author": { "name": "Umed Khudoiberdiev", "email": "pleerock.me@gmail.com" }, "engines": { "node": ">=16.13.0" }, "exports": { ".": { "types": "./index.d.ts", "node": { "import": "./index.mjs", "require": "./index.js", "types": "./index.d.ts" }, "browser": { "require": "./index.js", "import": "./browser/index.js", "default": "./index.js" } }, "./browser": { "types": "./index.d.ts", "default": "./browser/index.js" }, "./*.js": "./*.js", "./*": { "require": "./*.js", "import": "./*" } }, "main": "./index.js", "module": "./index.mjs", "types": "./index.d.ts", "browser": { "./browser/connection/ConnectionOptionsReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/connection/options-reader/ConnectionOptionsXmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/connection/options-reader/ConnectionOptionsYmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/driver/aurora-data-api/AuroraDataApiDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/better-sqlite3/BetterSqlite3Driver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/cockroachdb/CockroachDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoQueryRunner.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/bson.typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mysql/MysqlDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/oracle/OracleDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/postgres/PostgresDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sap/SapDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sqlite/SqliteDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sqlserver/SqlServerDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/entity-manager/MongoEntityManager.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/logger/FileLogger.js": "./browser/platform/BrowserFileLoggerDummy.js", "./browser/platform/PlatformTools.js": "./browser/platform/BrowserPlatformTools.js", "./browser/repository/MongoRepository.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/util/DirectoryExportedClassesLoader.js": "./browser/platform/BrowserDirectoryExportedClassesLoader.js", "./index.js": "./browser/index.js", "./index.mjs": "./browser/index.js" }, "repository": { "type": "git", "url": "https://github.com/typeorm/typeorm.git" }, "bugs": { "url": "https://github.com/typeorm/typeorm/issues" }, "homepage": "https://typeorm.io", "tags": [ "orm", "typescript", "typescript-orm", "mysql", "mysql-orm", "postgresql", "postgresql-orm", "mariadb", "mariadb-orm", "spanner", "sqlite", "sqlite-orm", "sql-server", "sql-server-orm", "oracle", "oracle-orm", "cloud-spanner", "cloud-spanner-orm" ], "devDependencies": { "@eslint/js": "^9.17.0", "@tsconfig/node16": "^16.1.1", "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/debug": "^4.1.7", "@types/gulp-rename": "^2.0.6", "@types/gulp-sourcemaps": "^0.0.38", "@types/mocha": "^10.0.1", "@types/node": "^18.13.0", "@types/sha.js": "^2.4.0", "@types/sinon": "^10.0.13", "@types/source-map-support": "^0.5.6", "@types/uuid": "^9.0.0", "@types/yargs": "^17.0.22", "better-sqlite3": "^8.1.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "class-transformer": "^0.5.1", "conventional-changelog-angular": "^5.0.13", "conventional-changelog-cli": "^2.2.2", "eslint": "^9.17.0", "globals": "^15.14.0", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", "gulp-mocha": "^10.0.0", "gulp-rename": "^2.0.0", "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", "gulp-sourcemaps": "^3.0.0", "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", "husky": "^8.0.3", "mocha": "^10.8.2", "mongodb": "^6.3.0", "mssql": "^10.0.1", "mysql": "^2.18.1", "mysql2": "^3.9.7", "pg": "^8.9.0", "pg-query-stream": "^4.3.0", "prettier": "^2.8.8", "redis": "^4.6.4", "remap-istanbul": "^0.13.0", "rimraf": "^5.0.10", "sinon": "^15.0.1", "sinon-chai": "^3.7.0", "source-map-support": "^0.5.21", "sql.js": "^1.8.0", "sqlite3": "^5.1.4", "ts-node": "^10.9.2", "typeorm-aurora-data-api-driver": "^2.4.4", "typescript": "^5.7.2", "typescript-eslint": "^8.18.1" }, "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", "better-sqlite3": "^8.0.0 || ^9.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", "mongodb": "^5.8.0", "mssql": "^9.1.1 || ^10.0.1", "mysql2": "^2.2.5 || ^3.0.1", "oracledb": "^6.3.0", "pg": "^8.5.1", "pg-native": "^3.0.0", "pg-query-stream": "^4.0.0", "redis": "^3.1.1 || ^4.0.0", "reflect-metadata": "^0.1.14 || ^0.2.0", "sql.js": "^1.4.0", "sqlite3": "^5.0.3", "ts-node": "^10.7.0", "typeorm-aurora-data-api-driver": "^2.0.0" }, "peerDependenciesMeta": { "@google-cloud/spanner": { "optional": true }, "@sap/hana-client": { "optional": true }, "better-sqlite3": { "optional": true }, "hdb-pool": { "optional": true }, "ioredis": { "optional": true }, "mongodb": { "optional": true }, "mssql": { "optional": true }, "mysql2": { "optional": true }, "oracledb": { "optional": true }, "pg": { "optional": true }, "pg-native": { "optional": true }, "pg-query-stream": { "optional": true }, "redis": { "optional": true }, "sql.js": { "optional": true }, "sqlite3": { "optional": true }, "ts-node": { "optional": true }, "typeorm-aurora-data-api-driver": { "optional": true } }, "dependencies": { "@sqltools/formatter": "^1.2.5", "app-root-path": "^3.1.0", "buffer": "^6.0.3", "chalk": "^4.1.2", "cli-highlight": "^2.1.11", "dayjs": "^1.11.9", "debug": "^4.3.4", "dotenv": "^16.0.3", "glob": "^10.4.5", "sha.js": "^2.4.11", "tslib": "^2.5.0", "uuid": "^9.0.0", "yargs": "^17.6.2" }, "scripts": { "test": "rimraf ./build && tsc && mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test", "test-fast": "mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test", "compile": "rimraf ./build && tsc", "watch": "./node_modules/.bin/tsc -w", "package": "gulp package", "pack": "gulp pack", "lint": "eslint .", "format": "prettier --write --end-of-line auto \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2" }, "bin": { "typeorm": "./cli.js", "typeorm-ts-node-commonjs": "./cli-ts-node-commonjs.js", "typeorm-ts-node-esm": "./cli-ts-node-esm.js" }, "funding": "https://opencollective.com/typeorm", "collective": { "type": "opencollective", "url": "https://opencollective.com/typeorm", "logo": "https://opencollective.com/opencollective/logo.txt" }, "nyc": { "all": true, "cache": false, "exclude": [ "**/*.d.ts" ], "extension": [ ".ts" ], "include": [ "build/compiled/src/**", "src/**" ], "reporter": "json" } }
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlatformTools = exports.Writable = exports.Readable = exports.EventEmitter = exports.ReadStream = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
7
7
|
const dotenv_1 = tslib_1.__importDefault(require("dotenv"));
|
|
8
8
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
9
9
|
const cli_highlight_1 = require("cli-highlight");
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "ReadStream", { enumerable: true, get: function () { return
|
|
10
|
+
var fs_2 = require("fs");
|
|
11
|
+
Object.defineProperty(exports, "ReadStream", { enumerable: true, get: function () { return fs_2.ReadStream; } });
|
|
12
12
|
var events_1 = require("events");
|
|
13
13
|
Object.defineProperty(exports, "EventEmitter", { enumerable: true, get: function () { return events_1.EventEmitter; } });
|
|
14
14
|
var stream_1 = require("stream");
|
|
@@ -112,7 +112,7 @@ class PlatformTools {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
catch (err) {
|
|
115
|
-
return require(
|
|
115
|
+
return require(path_1.default.resolve(process.cwd() + "/node_modules/" + name));
|
|
116
116
|
}
|
|
117
117
|
// If nothing above matched and we get here, the package was not listed within PlatformTools
|
|
118
118
|
// and is an Invalid Package. To make it explicit that this is NOT the intended use case for
|
|
@@ -124,7 +124,7 @@ class PlatformTools {
|
|
|
124
124
|
* Normalizes given path. Does "path.normalize" and replaces backslashes with forward slashes on Windows.
|
|
125
125
|
*/
|
|
126
126
|
static pathNormalize(pathStr) {
|
|
127
|
-
let normalizedPath =
|
|
127
|
+
let normalizedPath = path_1.default.normalize(pathStr);
|
|
128
128
|
if (process.platform === "win32")
|
|
129
129
|
normalizedPath = normalizedPath.replace(/\\/g, "/");
|
|
130
130
|
return normalizedPath;
|
|
@@ -133,34 +133,28 @@ class PlatformTools {
|
|
|
133
133
|
* Gets file extension. Does "path.extname".
|
|
134
134
|
*/
|
|
135
135
|
static pathExtname(pathStr) {
|
|
136
|
-
return
|
|
136
|
+
return path_1.default.extname(pathStr);
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Resolved given path. Does "path.resolve".
|
|
140
140
|
*/
|
|
141
141
|
static pathResolve(pathStr) {
|
|
142
|
-
return
|
|
142
|
+
return path_1.default.resolve(pathStr);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* Synchronously checks if file exist. Does "fs.existsSync".
|
|
146
146
|
*/
|
|
147
147
|
static fileExist(pathStr) {
|
|
148
|
-
return
|
|
148
|
+
return fs_1.default.existsSync(pathStr);
|
|
149
149
|
}
|
|
150
150
|
static readFileSync(filename) {
|
|
151
|
-
return
|
|
151
|
+
return fs_1.default.readFileSync(filename);
|
|
152
152
|
}
|
|
153
153
|
static appendFileSync(filename, data) {
|
|
154
|
-
|
|
154
|
+
fs_1.default.appendFileSync(filename, data);
|
|
155
155
|
}
|
|
156
156
|
static async writeFile(path, data) {
|
|
157
|
-
return
|
|
158
|
-
fs.writeFile(path, data, (err) => {
|
|
159
|
-
if (err)
|
|
160
|
-
fail(err);
|
|
161
|
-
ok();
|
|
162
|
-
});
|
|
163
|
-
});
|
|
157
|
+
return fs_1.default.promises.writeFile(path, data);
|
|
164
158
|
}
|
|
165
159
|
/**
|
|
166
160
|
* Loads a dotenv file into the environment variables.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/platform/PlatformTools.ts"],"names":[],"mappings":";;;;AAAA,mDAA4B;AAC5B,+CAAwB;AACxB,4DAA2B;AAC3B,0DAAyB;AACzB,iDAAgD;AAEhD,yBAA+B;AAAtB,gGAAA,UAAU,OAAA;AACnB,iCAAqC;AAA5B,sGAAA,YAAY,OAAA;AACrB,iCAA2C;AAAlC,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAE3B;;GAEG;AACH,MAAa,aAAa;IAMtB;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACpB,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,2HAA2H;QAC3H,8FAA8F;QAC9F,kCAAkC;QAElC,IAAI,CAAC;YACD,wEAAwE;YACxE,QAAQ,IAAI,EAAE,CAAC;gBACX;;mBAEG;gBACH,KAAK,SAAS;oBACV,OAAO,OAAO,CAAC,uBAAuB,CAAC,CAAA;gBAE3C;;mBAEG;gBACH,KAAK,SAAS;oBACV,OAAO,OAAO,CAAC,SAAS,CAAC,CAAA;gBAE7B;;mBAEG;gBACH,KAAK,kBAAkB;oBACnB,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEtC,KAAK,mCAAmC;oBACpC,OAAO,OAAO,CAAC,mCAAmC,CAAC,CAAA;gBAEvD,KAAK,UAAU;oBACX,OAAO,OAAO,CAAC,UAAU,CAAC,CAAA;gBAE9B;;mBAEG;gBACH,KAAK,OAAO;oBACR,OAAO,OAAO,CAAC,OAAO,CAAC,CAAA;gBAE3B,KAAK,QAAQ;oBACT,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAA;gBAE5B;;mBAEG;gBACH,KAAK,UAAU;oBACX,OAAO,OAAO,CAAC,UAAU,CAAC,CAAA;gBAE9B;;mBAEG;gBACH,KAAK,I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AAC,CAAC,CAAA;IACzC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAS;QACjB,OAAO,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAU;QACnB,OAAO,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAAe;QACvB,OAAO,eAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAc,EAAE,GAAS;QACtC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;QACtC,IAAI,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC/B,CAAC;;AA3PL,sCA4PC;AA3PG;;GAEG;AACI,kBAAI,GAAuB,MAAM,CAAA","file":"PlatformTools.js","sourcesContent":["import * as path from \"path\"\nimport * as fs from \"fs\"\nimport dotenv from \"dotenv\"\nimport chalk from \"chalk\"\nimport { highlight, Theme } from \"cli-highlight\"\n\nexport { ReadStream } from \"fs\"\nexport { EventEmitter } from \"events\"\nexport { Readable, Writable } from \"stream\"\n\n/**\n * Platform-specific tools.\n */\nexport class PlatformTools {\n /**\n * Type of the currently running platform.\n */\n static type: \"browser\" | \"node\" = \"node\"\n\n /**\n * Gets global variable where global stuff can be stored.\n */\n static getGlobalVariable(): any {\n return global\n }\n\n /**\n * Loads (\"require\"-s) given file or package.\n * This operation only supports on node platform\n */\n static load(name: string): any {\n // if name is not absolute or relative, then try to load package from the node_modules of the directory we are currently in\n // this is useful when we are using typeorm package globally installed and it accesses drivers\n // that are not installed globally\n\n try {\n // switch case to explicit require statements for webpack compatibility.\n switch (name) {\n /**\n * spanner\n */\n case \"spanner\":\n return require(\"@google-cloud/spanner\")\n\n /**\n * mongodb\n */\n case \"mongodb\":\n return require(\"mongodb\")\n\n /**\n * hana\n */\n case \"@sap/hana-client\":\n return require(\"@sap/hana-client\")\n\n case \"@sap/hana-client/extension/Stream\":\n return require(\"@sap/hana-client/extension/Stream\")\n\n case \"hdb-pool\":\n return require(\"hdb-pool\")\n\n /**\n * mysql\n */\n case \"mysql\":\n return require(\"mysql\")\n\n case \"mysql2\":\n return require(\"mysql2\")\n\n /**\n * oracle\n */\n case \"oracledb\":\n return require(\"oracledb\")\n\n /**\n * postgres\n */\n case \"pg\":\n return require(\"pg\")\n\n case \"pg-native\":\n return require(\"pg-native\")\n\n case \"pg-query-stream\":\n return require(\"pg-query-stream\")\n\n case \"typeorm-aurora-data-api-driver\":\n return require(\"typeorm-aurora-data-api-driver\")\n\n /**\n * redis\n */\n case \"redis\":\n return require(\"redis\")\n\n case \"ioredis\":\n return require(\"ioredis\")\n\n /**\n * better-sqlite3\n */\n case \"better-sqlite3\":\n return require(\"better-sqlite3\")\n\n /**\n * sqlite\n */\n case \"sqlite3\":\n return require(\"sqlite3\")\n\n /**\n * sql.js\n */\n case \"sql.js\":\n return require(\"sql.js\")\n\n /**\n * sqlserver\n */\n case \"mssql\":\n return require(\"mssql\")\n\n /**\n * react-native-sqlite\n */\n case \"react-native-sqlite-storage\":\n return require(\"react-native-sqlite-storage\")\n }\n } catch (err) {\n return require(path.resolve(\n process.cwd() + \"/node_modules/\" + name,\n ))\n }\n\n // If nothing above matched and we get here, the package was not listed within PlatformTools\n // and is an Invalid Package. To make it explicit that this is NOT the intended use case for\n // PlatformTools.load - it's not just a way to replace `require` all willy-nilly - let's throw\n // an error.\n throw new TypeError(`Invalid Package for PlatformTools.load: ${name}`)\n }\n\n /**\n * Normalizes given path. Does \"path.normalize\" and replaces backslashes with forward slashes on Windows.\n */\n static pathNormalize(pathStr: string): string {\n let normalizedPath = path.normalize(pathStr)\n if (process.platform === \"win32\")\n normalizedPath = normalizedPath.replace(/\\\\/g, \"/\")\n return normalizedPath\n }\n\n /**\n * Gets file extension. Does \"path.extname\".\n */\n static pathExtname(pathStr: string): string {\n return path.extname(pathStr)\n }\n\n /**\n * Resolved given path. Does \"path.resolve\".\n */\n static pathResolve(pathStr: string): string {\n return path.resolve(pathStr)\n }\n\n /**\n * Synchronously checks if file exist. Does \"fs.existsSync\".\n */\n static fileExist(pathStr: string): boolean {\n return fs.existsSync(pathStr)\n }\n\n static readFileSync(filename: string): Buffer {\n return fs.readFileSync(filename)\n }\n\n static appendFileSync(filename: string, data: any): void {\n fs.appendFileSync(filename, data)\n }\n\n static async writeFile(path: string, data: any): Promise<void> {\n return new Promise<void>((ok, fail) => {\n fs.writeFile(path, data, (err) => {\n if (err) fail(err)\n ok()\n })\n })\n }\n\n /**\n * Loads a dotenv file into the environment variables.\n *\n * @param path The file to load as a dotenv configuration\n */\n static dotenv(pathStr: string): void {\n dotenv.config({ path: pathStr })\n }\n\n /**\n * Gets environment variable.\n */\n static getEnvVariable(name: string): any {\n return process.env[name]\n }\n\n /**\n * Highlights sql string to be print in the console.\n */\n static highlightSql(sql: string) {\n const theme: Theme = {\n keyword: chalk.blueBright,\n literal: chalk.blueBright,\n string: chalk.white,\n type: chalk.magentaBright,\n built_in: chalk.magentaBright,\n comment: chalk.gray,\n }\n return highlight(sql, { theme: theme, language: \"sql\" })\n }\n\n /**\n * Highlights json string to be print in the console.\n */\n static highlightJson(json: string) {\n return highlight(json, { language: \"json\" })\n }\n\n /**\n * Logging functions needed by AdvancedConsoleLogger\n */\n static logInfo(prefix: string, info: any) {\n console.log(chalk.gray.underline(prefix), info)\n }\n\n static logError(prefix: string, error: any) {\n console.log(chalk.underline.red(prefix), error)\n }\n\n static logWarn(prefix: string, warning: any) {\n console.log(chalk.underline.yellow(prefix), warning)\n }\n\n static log(message: string) {\n console.log(chalk.underline(message))\n }\n\n static info(info: any) {\n return chalk.gray(info)\n }\n\n static error(error: any) {\n return chalk.red(error)\n }\n\n static warn(message: string) {\n return chalk.yellow(message)\n }\n\n static logCmdErr(prefix: string, err?: any) {\n console.log(chalk.black.bgRed(prefix))\n if (err) console.error(err)\n }\n}\n"],"sourceRoot":".."}
|
|
1
|
+
{"version":3,"sources":["../../src/platform/PlatformTools.ts"],"names":[],"mappings":";;;;AAAA,wDAAuB;AACvB,oDAAmB;AACnB,4DAA2B;AAC3B,0DAAyB;AACzB,iDAAgD;AAEhD,yBAA+B;AAAtB,gGAAA,UAAU,OAAA;AACnB,iCAAqC;AAA5B,sGAAA,YAAY,OAAA;AACrB,iCAA2C;AAAlC,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAE3B;;GAEG;AACH,MAAa,aAAa;IAMtB;;OAEG;IACH,MAAM,CAAC,iBAAiB;QACpB,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,IAAY;QACpB,2HAA2H;QAC3H,8FAA8F;QAC9F,kCAAkC;QAElC,IAAI,CAAC;YACD,wEAAwE;YACxE,QAAQ,IAAI,EAAE,CAAC;gBACX;;mBAEG;gBACH,KAAK,SAAS;oBACV,OAAO,OAAO,CAAC,uBAAuB,CAAC,CAAA;gBAE3C;;mBAEG;gBACH,KAAK,SAAS;oBACV,OAAO,OAAO,CAAC,SAAS,CAAC,CAAA;gBAE7B;;mBAEG;gBACH,KAAK,kBAAkB;oBACnB,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEtC,KAAK,mCAAmC;oBACpC,OAAO,OAAO,CAAC,mCAAmC,CAAC,CAAA;gBAEvD,KAAK,UAAU;oBACX,OAAO,OAAO,CAAC,UAAU,CAAC,CAAA;gBAE9B;;mBAEG;gBACH,KAAK,OAAO;oBACR,OAAO,OAAO,CAAC,OAAO,CAAC,CAAA;gBAE3B,KAAK,QAAQ;oBACT,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAA;gBAE5B;;mBAEG;gBACH,KAAK,UAAU;oBACX,OAAO,OAAO,CAAC,UAAU,CAAC,CAAA;gBAE9B;;mBAEG;gBACH,KAA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C,GAAG,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAAe;QACvB,OAAO,eAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAc,EAAE,GAAS;QACtC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;QACtC,IAAI,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC/B,CAAC;;AAtPL,sCAuPC;AAtPG;;GAEG;AACI,kBAAI,GAAuB,MAAM,CAAA","file":"PlatformTools.js","sourcesContent":["import path from \"path\"\nimport fs from \"fs\"\nimport dotenv from \"dotenv\"\nimport chalk from \"chalk\"\nimport { highlight, Theme } from \"cli-highlight\"\n\nexport { ReadStream } from \"fs\"\nexport { EventEmitter } from \"events\"\nexport { Readable, Writable } from \"stream\"\n\n/**\n * Platform-specific tools.\n */\nexport class PlatformTools {\n /**\n * Type of the currently running platform.\n */\n static type: \"browser\" | \"node\" = \"node\"\n\n /**\n * Gets global variable where global stuff can be stored.\n */\n static getGlobalVariable(): any {\n return global\n }\n\n /**\n * Loads (\"require\"-s) given file or package.\n * This operation only supports on node platform\n */\n static load(name: string): any {\n // if name is not absolute or relative, then try to load package from the node_modules of the directory we are currently in\n // this is useful when we are using typeorm package globally installed and it accesses drivers\n // that are not installed globally\n\n try {\n // switch case to explicit require statements for webpack compatibility.\n switch (name) {\n /**\n * spanner\n */\n case \"spanner\":\n return require(\"@google-cloud/spanner\")\n\n /**\n * mongodb\n */\n case \"mongodb\":\n return require(\"mongodb\")\n\n /**\n * hana\n */\n case \"@sap/hana-client\":\n return require(\"@sap/hana-client\")\n\n case \"@sap/hana-client/extension/Stream\":\n return require(\"@sap/hana-client/extension/Stream\")\n\n case \"hdb-pool\":\n return require(\"hdb-pool\")\n\n /**\n * mysql\n */\n case \"mysql\":\n return require(\"mysql\")\n\n case \"mysql2\":\n return require(\"mysql2\")\n\n /**\n * oracle\n */\n case \"oracledb\":\n return require(\"oracledb\")\n\n /**\n * postgres\n */\n case \"pg\":\n return require(\"pg\")\n\n case \"pg-native\":\n return require(\"pg-native\")\n\n case \"pg-query-stream\":\n return require(\"pg-query-stream\")\n\n case \"typeorm-aurora-data-api-driver\":\n return require(\"typeorm-aurora-data-api-driver\")\n\n /**\n * redis\n */\n case \"redis\":\n return require(\"redis\")\n\n case \"ioredis\":\n return require(\"ioredis\")\n\n /**\n * better-sqlite3\n */\n case \"better-sqlite3\":\n return require(\"better-sqlite3\")\n\n /**\n * sqlite\n */\n case \"sqlite3\":\n return require(\"sqlite3\")\n\n /**\n * sql.js\n */\n case \"sql.js\":\n return require(\"sql.js\")\n\n /**\n * sqlserver\n */\n case \"mssql\":\n return require(\"mssql\")\n\n /**\n * react-native-sqlite\n */\n case \"react-native-sqlite-storage\":\n return require(\"react-native-sqlite-storage\")\n }\n } catch (err) {\n return require(path.resolve(\n process.cwd() + \"/node_modules/\" + name,\n ))\n }\n\n // If nothing above matched and we get here, the package was not listed within PlatformTools\n // and is an Invalid Package. To make it explicit that this is NOT the intended use case for\n // PlatformTools.load - it's not just a way to replace `require` all willy-nilly - let's throw\n // an error.\n throw new TypeError(`Invalid Package for PlatformTools.load: ${name}`)\n }\n\n /**\n * Normalizes given path. Does \"path.normalize\" and replaces backslashes with forward slashes on Windows.\n */\n static pathNormalize(pathStr: string): string {\n let normalizedPath = path.normalize(pathStr)\n if (process.platform === \"win32\")\n normalizedPath = normalizedPath.replace(/\\\\/g, \"/\")\n return normalizedPath\n }\n\n /**\n * Gets file extension. Does \"path.extname\".\n */\n static pathExtname(pathStr: string): string {\n return path.extname(pathStr)\n }\n\n /**\n * Resolved given path. Does \"path.resolve\".\n */\n static pathResolve(pathStr: string): string {\n return path.resolve(pathStr)\n }\n\n /**\n * Synchronously checks if file exist. Does \"fs.existsSync\".\n */\n static fileExist(pathStr: string): boolean {\n return fs.existsSync(pathStr)\n }\n\n static readFileSync(filename: string): Buffer {\n return fs.readFileSync(filename)\n }\n\n static appendFileSync(filename: string, data: any): void {\n fs.appendFileSync(filename, data)\n }\n\n static async writeFile(path: string, data: any): Promise<void> {\n return fs.promises.writeFile(path, data)\n }\n\n /**\n * Loads a dotenv file into the environment variables.\n *\n * @param path The file to load as a dotenv configuration\n */\n static dotenv(pathStr: string): void {\n dotenv.config({ path: pathStr })\n }\n\n /**\n * Gets environment variable.\n */\n static getEnvVariable(name: string): any {\n return process.env[name]\n }\n\n /**\n * Highlights sql string to be print in the console.\n */\n static highlightSql(sql: string) {\n const theme: Theme = {\n keyword: chalk.blueBright,\n literal: chalk.blueBright,\n string: chalk.white,\n type: chalk.magentaBright,\n built_in: chalk.magentaBright,\n comment: chalk.gray,\n }\n return highlight(sql, { theme: theme, language: \"sql\" })\n }\n\n /**\n * Highlights json string to be print in the console.\n */\n static highlightJson(json: string) {\n return highlight(json, { language: \"json\" })\n }\n\n /**\n * Logging functions needed by AdvancedConsoleLogger\n */\n static logInfo(prefix: string, info: any) {\n console.log(chalk.gray.underline(prefix), info)\n }\n\n static logError(prefix: string, error: any) {\n console.log(chalk.underline.red(prefix), error)\n }\n\n static logWarn(prefix: string, warning: any) {\n console.log(chalk.underline.yellow(prefix), warning)\n }\n\n static log(message: string) {\n console.log(chalk.underline(message))\n }\n\n static info(info: any) {\n return chalk.gray(info)\n }\n\n static error(error: any) {\n return chalk.red(error)\n }\n\n static warn(message: string) {\n return chalk.yellow(message)\n }\n\n static logCmdErr(prefix: string, err?: any) {\n console.log(chalk.black.bgRed(prefix))\n if (err) console.error(err)\n }\n}\n"],"sourceRoot":".."}
|