typeorm 0.3.17 → 0.3.18-dev.022d2b5
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 +23 -23
- package/browser/driver/DriverUtils.js +2 -5
- package/browser/driver/DriverUtils.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +2 -1
- package/browser/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerConnectionOptions.d.ts +5 -0
- package/browser/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerQueryRunner.js +13 -0
- package/browser/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
- package/browser/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.d.ts +12 -0
- package/browser/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.js +3 -0
- package/browser/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.js.map +1 -0
- package/browser/entity-manager/EntityManager.js +5 -1
- package/browser/entity-manager/EntityManager.js.map +1 -1
- package/browser/error/QueryFailedError.d.ts +3 -3
- package/browser/error/QueryFailedError.js.map +1 -1
- package/browser/find-options/FindOptionsUtils.js +1 -1
- package/browser/find-options/FindOptionsUtils.js.map +1 -1
- package/browser/index.d.ts +1 -0
- package/browser/index.js +1 -0
- package/browser/index.js.map +1 -1
- package/browser/naming-strategy/DefaultNamingStrategy.d.ts +0 -1
- package/browser/naming-strategy/DefaultNamingStrategy.js +0 -3
- package/browser/naming-strategy/DefaultNamingStrategy.js.map +1 -1
- package/browser/naming-strategy/NamingStrategyInterface.d.ts +0 -4
- package/browser/naming-strategy/NamingStrategyInterface.js.map +1 -1
- package/browser/persistence/Subject.js +2 -1
- package/browser/persistence/Subject.js.map +1 -1
- package/browser/query-builder/QueryBuilder.js +1 -1
- package/browser/query-builder/QueryBuilder.js.map +1 -1
- package/browser/repository/Repository.d.ts +1 -1
- package/browser/repository/Repository.js +9 -5
- package/browser/repository/Repository.js.map +1 -1
- package/commands/CommandUtils.js +6 -1
- package/commands/CommandUtils.js.map +1 -1
- package/commands/EntityCreateCommand.d.ts +3 -0
- package/commands/EntityCreateCommand.js +7 -0
- package/commands/EntityCreateCommand.js.map +1 -1
- package/commands/InitCommand.js +1 -1
- package/commands/InitCommand.js.map +1 -1
- package/commands/MigrationCreateCommand.d.ts +5 -1
- package/commands/MigrationCreateCommand.js +6 -1
- package/commands/MigrationCreateCommand.js.map +1 -1
- package/commands/MigrationGenerateCommand.d.ts +5 -1
- package/commands/MigrationGenerateCommand.js +5 -0
- package/commands/MigrationGenerateCommand.js.map +1 -1
- package/commands/SubscriberCreateCommand.d.ts +3 -0
- package/commands/SubscriberCreateCommand.js +7 -0
- package/commands/SubscriberCreateCommand.js.map +1 -1
- package/driver/DriverUtils.js +2 -5
- package/driver/DriverUtils.js.map +1 -1
- package/driver/sqlserver/SqlServerConnectionCredentialsOptions.d.ts +2 -1
- package/driver/sqlserver/SqlServerConnectionCredentialsOptions.js.map +1 -1
- package/driver/sqlserver/SqlServerConnectionOptions.d.ts +5 -0
- package/driver/sqlserver/SqlServerConnectionOptions.js.map +1 -1
- package/driver/sqlserver/SqlServerQueryRunner.js +13 -0
- package/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
- package/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.d.ts +12 -0
- package/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.js +4 -0
- package/driver/sqlserver/authentication/AzureActiveDirectoryDefaultAuthentication.js.map +1 -0
- package/entity-manager/EntityManager.js +5 -1
- package/entity-manager/EntityManager.js.map +1 -1
- package/error/QueryFailedError.d.ts +3 -3
- package/error/QueryFailedError.js.map +1 -1
- package/find-options/FindOptionsUtils.js +1 -1
- package/find-options/FindOptionsUtils.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.mjs +2 -0
- package/naming-strategy/DefaultNamingStrategy.d.ts +0 -1
- package/naming-strategy/DefaultNamingStrategy.js +0 -3
- package/naming-strategy/DefaultNamingStrategy.js.map +1 -1
- package/naming-strategy/NamingStrategyInterface.d.ts +0 -4
- package/naming-strategy/NamingStrategyInterface.js.map +1 -1
- package/package.json +1 -271
- package/persistence/Subject.js +2 -1
- package/persistence/Subject.js.map +1 -1
- package/query-builder/QueryBuilder.js +1 -1
- package/query-builder/QueryBuilder.js.map +1 -1
- package/repository/Repository.d.ts +1 -1
- package/repository/Repository.js +9 -5
- package/repository/Repository.js.map +1 -1
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA;GACG;AACH,4BAAyB;AAEzB,4EAA4E;AAC5E,wBAAwB;AACxB,4EAA4E;AAE5E,oDAAyB;AACzB,sDAA2B;AAC3B,gEAAqC;AACrC,8DAAmC;AACnC,iEAAsC;AACtC,6DAAkC;AAClC,+DAAoC;AACpC,gEAAqC;AACrC,kDAAuB;AACvB,qEAA0C;AAC1C,+EAAoD;AACpD,+EAAoD;AACpD,qFAA0D;AAC1D,4EAAiD;AACjD,+EAAoD;AACpD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,6EAAkD;AAClD,4EAAiD;AACjD,0EAA+C;AAC/C,4EAAiD;AACjD,gFAAqD;AACrD,6EAAkD;AAClD,4EAAiD;AACjD,6EAAkD;AAClD,6EAAkD;AAClD,iFAAsD;AACtD,8EAAmD;AACnD,6EAAkD;AAClD,gFAAqD;AACrD,4EAAiD;AACjD,2EAAgD;AAChD,gFAAqD;AACrD,+EAAoD;AACpD,8EAAmD;AACnD,4EAAiD;AACjD,+EAAoD;AACpD,2EAAgD;AAChD,0EAA+C;AAC/C,2EAAgD;AAChD,0EAA+C;AAC/C,0EAA+C;AAC/C,yEAA8C;AAC9C,8EAAmD;AACnD,2EAAgD;AAChD,oEAAyC;AACzC,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BAAuB,OAAA;AAEhC,uDAAqD;AAA5C,wGAAA,UAAU,OAAA;AACnB,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,oEAAkE;AAAzD,sHAAA,iBAAiB,OAAA;AAG1B,6DAA2D;AAAlD,4GAAA,YAAY,OAAA;AACrB,yEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,6EAA2E;AAAlE,4HAAA,oBAAoB,OAAA;AAC7B,qDAAmD;AAA1C,oGAAA,QAAQ,OAAA;AACjB,2DAAyD;AAAhD,0GAAA,WAAW,OAAA;AAGpB,oEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,oEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,oEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,0DAAwD;AAA/C,0GAAA,WAAW,OAAA;AAEpB,0EAAwE;AAA/D,wHAAA,kBAAkB,OAAA;AAC3B,mDAAiD;AAAxC,sGAAA,SAAS,OAAA;AAClB,mEAAiE;AAAxD,sHAAA,iBAAiB,OAAA;AAE1B,iFAA+E;AAAtE,8HAAA,qBAAqB,OAAA;AAE9B,2FAAyF;AAAhF,wIAAA,0BAA0B,OAAA;AAWnC,6DAA2D;AAAlD,4GAAA,YAAY,OAAA;AAIrB,uGAAqG;AAA5F,sJAAA,iCAAiC,OAAA;AAE1C,2EAAyE;AAAhE,0HAAA,mBAAmB,OAAA;AAC5B,0DAAwD;AAA/C,kHAAA,eAAe,OAAA;AACxB,kEAAgE;AAAvD,0HAAA,mBAAmB,OAAA","file":"index.js","sourcesContent":["/*!\n */\nimport \"reflect-metadata\"\n\n// -------------------------------------------------------------------------\n// Commonly Used exports\n// -------------------------------------------------------------------------\n\nexport * from \"./globals\"\nexport * from \"./container\"\nexport * from \"./common/EntityTarget\"\nexport * from \"./common/ObjectType\"\nexport * from \"./common/ObjectLiteral\"\nexport * from \"./common/MixedList\"\nexport * from \"./common/DeepPartial\"\nexport * from \"./common/RelationType\"\nexport * from \"./error\"\nexport * from \"./decorator/columns/Column\"\nexport * from \"./decorator/columns/CreateDateColumn\"\nexport * from \"./decorator/columns/DeleteDateColumn\"\nexport * from \"./decorator/columns/PrimaryGeneratedColumn\"\nexport * from \"./decorator/columns/PrimaryColumn\"\nexport * from \"./decorator/columns/UpdateDateColumn\"\nexport * from \"./decorator/columns/VersionColumn\"\nexport * from \"./decorator/columns/VirtualColumn\"\nexport * from \"./decorator/columns/ViewColumn\"\nexport * from \"./decorator/columns/ObjectIdColumn\"\nexport * from \"./decorator/listeners/AfterInsert\"\nexport * from \"./decorator/listeners/AfterLoad\"\nexport * from \"./decorator/listeners/AfterRemove\"\nexport * from \"./decorator/listeners/AfterSoftRemove\"\nexport * from \"./decorator/listeners/AfterRecover\"\nexport * from \"./decorator/listeners/AfterUpdate\"\nexport * from \"./decorator/listeners/BeforeInsert\"\nexport * from \"./decorator/listeners/BeforeRemove\"\nexport * from \"./decorator/listeners/BeforeSoftRemove\"\nexport * from \"./decorator/listeners/BeforeRecover\"\nexport * from \"./decorator/listeners/BeforeUpdate\"\nexport * from \"./decorator/listeners/EventSubscriber\"\nexport * from \"./decorator/options/ColumnOptions\"\nexport * from \"./decorator/options/IndexOptions\"\nexport * from \"./decorator/options/JoinColumnOptions\"\nexport * from \"./decorator/options/JoinTableOptions\"\nexport * from \"./decorator/options/RelationOptions\"\nexport * from \"./decorator/options/EntityOptions\"\nexport * from \"./decorator/options/ValueTransformer\"\nexport * from \"./decorator/relations/JoinColumn\"\nexport * from \"./decorator/relations/JoinTable\"\nexport * from \"./decorator/relations/ManyToMany\"\nexport * from \"./decorator/relations/ManyToOne\"\nexport * from \"./decorator/relations/OneToMany\"\nexport * from \"./decorator/relations/OneToOne\"\nexport * from \"./decorator/relations/RelationCount\"\nexport * from \"./decorator/relations/RelationId\"\nexport * from \"./decorator/entity/Entity\"\nexport * from \"./decorator/entity/ChildEntity\"\nexport * from \"./decorator/entity/TableInheritance\"\nexport * from \"./decorator/entity-view/ViewEntity\"\nexport * from \"./decorator/tree/TreeLevelColumn\"\nexport * from \"./decorator/tree/TreeParent\"\nexport * from \"./decorator/tree/TreeChildren\"\nexport * from \"./decorator/tree/Tree\"\nexport * from \"./decorator/Index\"\nexport * from \"./decorator/Unique\"\nexport * from \"./decorator/Check\"\nexport * from \"./decorator/Exclusion\"\nexport * from \"./decorator/Generated\"\nexport * from \"./decorator/EntityRepository\"\nexport * from \"./find-options/operator/And\"\nexport * from \"./find-options/operator/Any\"\nexport * from \"./find-options/operator/ArrayContainedBy\"\nexport * from \"./find-options/operator/ArrayContains\"\nexport * from \"./find-options/operator/ArrayOverlap\"\nexport * from \"./find-options/operator/Between\"\nexport * from \"./find-options/operator/Equal\"\nexport * from \"./find-options/operator/In\"\nexport * from \"./find-options/operator/IsNull\"\nexport * from \"./find-options/operator/LessThan\"\nexport * from \"./find-options/operator/LessThanOrEqual\"\nexport * from \"./find-options/operator/ILike\"\nexport * from \"./find-options/operator/Like\"\nexport * from \"./find-options/operator/MoreThan\"\nexport * from \"./find-options/operator/MoreThanOrEqual\"\nexport * from \"./find-options/operator/Not\"\nexport * from \"./find-options/operator/Raw\"\nexport * from \"./find-options/operator/JsonContains\"\nexport * from \"./find-options/EqualOperator\"\nexport * from \"./find-options/FindManyOptions\"\nexport * from \"./find-options/FindOneOptions\"\nexport * from \"./find-options/FindOperator\"\nexport * from \"./find-options/FindOperatorType\"\nexport * from \"./find-options/FindOptionsOrder\"\nexport * from \"./find-options/FindOptionsRelations\"\nexport * from \"./find-options/FindOptionsSelect\"\nexport * from \"./find-options/FindOptionsUtils\"\nexport * from \"./find-options/FindOptionsWhere\"\nexport * from \"./find-options/FindTreeOptions\"\nexport * from \"./find-options/JoinOptions\"\nexport * from \"./find-options/OrderByCondition\"\nexport * from \"./logger/AbstractLogger\"\nexport * from \"./logger/Logger\"\nexport * from \"./logger/LoggerOptions\"\nexport * from \"./logger/AdvancedConsoleLogger\"\nexport * from \"./logger/SimpleConsoleLogger\"\nexport * from \"./logger/FileLogger\"\nexport * from \"./metadata/EntityMetadata\"\nexport * from \"./entity-manager/EntityManager\"\nexport * from \"./repository/AbstractRepository\"\nexport * from \"./repository/Repository\"\nexport * from \"./repository/BaseEntity\"\nexport * from \"./repository/TreeRepository\"\nexport * from \"./repository/MongoRepository\"\nexport * from \"./repository/RemoveOptions\"\nexport * from \"./repository/SaveOptions\"\nexport * from \"./schema-builder/table/TableCheck\"\nexport * from \"./schema-builder/table/TableColumn\"\nexport * from \"./schema-builder/table/TableExclusion\"\nexport * from \"./schema-builder/table/TableForeignKey\"\nexport * from \"./schema-builder/table/TableIndex\"\nexport * from \"./schema-builder/table/TableUnique\"\nexport * from \"./schema-builder/table/Table\"\nexport * from \"./schema-builder/options/TableCheckOptions\"\nexport * from \"./schema-builder/options/TableColumnOptions\"\nexport * from \"./schema-builder/options/TableExclusionOptions\"\nexport * from \"./schema-builder/options/TableForeignKeyOptions\"\nexport * from \"./schema-builder/options/TableIndexOptions\"\nexport * from \"./schema-builder/options/TableOptions\"\nexport * from \"./schema-builder/options/TableUniqueOptions\"\nexport * from \"./schema-builder/options/ViewOptions\"\nexport * from \"./driver/mongodb/typings\"\nexport * from \"./driver/types/DatabaseType\"\nexport * from \"./driver/types/GeoJsonTypes\"\nexport * from \"./driver/types/ReplicationMode\"\nexport * from \"./driver/sqlserver/MssqlParameter\"\n\n// export * from \"./data-source\";\n\nexport { ConnectionOptionsReader } from \"./connection/ConnectionOptionsReader\"\nexport { ConnectionOptions } from \"./connection/ConnectionOptions\"\nexport { DataSource } from \"./data-source/DataSource\"\nexport { Connection } from \"./connection/Connection\"\nexport { ConnectionManager } from \"./connection/ConnectionManager\"\nexport { DataSourceOptions } from \"./data-source/DataSourceOptions\"\nexport { Driver } from \"./driver/Driver\"\nexport { QueryBuilder } from \"./query-builder/QueryBuilder\"\nexport { SelectQueryBuilder } from \"./query-builder/SelectQueryBuilder\"\nexport { DeleteQueryBuilder } from \"./query-builder/DeleteQueryBuilder\"\nexport { InsertQueryBuilder } from \"./query-builder/InsertQueryBuilder\"\nexport { UpdateQueryBuilder } from \"./query-builder/UpdateQueryBuilder\"\nexport { RelationQueryBuilder } from \"./query-builder/RelationQueryBuilder\"\nexport { Brackets } from \"./query-builder/Brackets\"\nexport { NotBrackets } from \"./query-builder/NotBrackets\"\nexport { WhereExpressionBuilder } from \"./query-builder/WhereExpressionBuilder\"\nexport { WhereExpression } from \"./query-builder/WhereExpressionBuilder\"\nexport { InsertResult } from \"./query-builder/result/InsertResult\"\nexport { UpdateResult } from \"./query-builder/result/UpdateResult\"\nexport { DeleteResult } from \"./query-builder/result/DeleteResult\"\nexport { QueryResult } from \"./query-runner/QueryResult\"\nexport { QueryRunner } from \"./query-runner/QueryRunner\"\nexport { MongoEntityManager } from \"./entity-manager/MongoEntityManager\"\nexport { Migration } from \"./migration/Migration\"\nexport { MigrationExecutor } from \"./migration/MigrationExecutor\"\nexport { MigrationInterface } from \"./migration/MigrationInterface\"\nexport { DefaultNamingStrategy } from \"./naming-strategy/DefaultNamingStrategy\"\nexport { NamingStrategyInterface } from \"./naming-strategy/NamingStrategyInterface\"\nexport { LegacyOracleNamingStrategy } from \"./naming-strategy/LegacyOracleNamingStrategy\"\nexport { InsertEvent } from \"./subscriber/event/InsertEvent\"\nexport { LoadEvent } from \"./subscriber/event/LoadEvent\"\nexport { UpdateEvent } from \"./subscriber/event/UpdateEvent\"\nexport { RemoveEvent } from \"./subscriber/event/RemoveEvent\"\nexport { SoftRemoveEvent } from \"./subscriber/event/SoftRemoveEvent\"\nexport { RecoverEvent } from \"./subscriber/event/RecoverEvent\"\nexport { TransactionCommitEvent } from \"./subscriber/event/TransactionCommitEvent\"\nexport { TransactionRollbackEvent } from \"./subscriber/event/TransactionRollbackEvent\"\nexport { TransactionStartEvent } from \"./subscriber/event/TransactionStartEvent\"\nexport { EntitySubscriberInterface } from \"./subscriber/EntitySubscriberInterface\"\nexport { EntitySchema } from \"./entity-schema/EntitySchema\"\nexport { EntitySchemaColumnOptions } from \"./entity-schema/EntitySchemaColumnOptions\"\nexport { EntitySchemaIndexOptions } from \"./entity-schema/EntitySchemaIndexOptions\"\nexport { EntitySchemaRelationOptions } from \"./entity-schema/EntitySchemaRelationOptions\"\nexport { EntitySchemaEmbeddedColumnOptions } from \"./entity-schema/EntitySchemaEmbeddedColumnOptions\"\nexport { ColumnType } from \"./driver/types/ColumnTypes\"\nexport { EntitySchemaOptions } from \"./entity-schema/EntitySchemaOptions\"\nexport { InstanceChecker } from \"./util/InstanceChecker\"\nexport { TreeRepositoryUtils } from \"./util/TreeRepositoryUtils\"\n"],"sourceRoot":"."}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA;GACG;AACH,4BAAyB;AAEzB,4EAA4E;AAC5E,wBAAwB;AACxB,4EAA4E;AAE5E,oDAAyB;AACzB,sDAA2B;AAC3B,gEAAqC;AACrC,8DAAmC;AACnC,iEAAsC;AACtC,6DAAkC;AAClC,+DAAoC;AACpC,gEAAqC;AACrC,kDAAuB;AACvB,qEAA0C;AAC1C,+EAAoD;AACpD,+EAAoD;AACpD,qFAA0D;AAC1D,4EAAiD;AACjD,+EAAoD;AACpD,4EAAiD;AACjD,4EAAiD;AACjD,yEAA8C;AAC9C,6EAAkD;AAClD,4EAAiD;AACjD,0EAA+C;AAC/C,4EAAiD;AACjD,gFAAqD;AACrD,6EAAkD;AAClD,4EAAiD;AACjD,6EAAkD;AAClD,6EAAkD;AAClD,iFAAsD;AACtD,8EAAmD;AACnD,6EAAkD;AAClD,gFAAqD;AACrD,4EAAiD;AACjD,2EAAgD;AAChD,gFAAqD;AACrD,+EAAoD;AACpD,8EAAmD;AACnD,4EAAiD;AACjD,+EAAoD;AACpD,2EAAgD;AAChD,0EAA+C;AAC/C,2EAAgD;A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flect-metadata\"\n\n// -------------------------------------------------------------------------\n// Commonly Used exports\n// -------------------------------------------------------------------------\n\nexport * from \"./globals\"\nexport * from \"./container\"\nexport * from \"./common/EntityTarget\"\nexport * from \"./common/ObjectType\"\nexport * from \"./common/ObjectLiteral\"\nexport * from \"./common/MixedList\"\nexport * from \"./common/DeepPartial\"\nexport * from \"./common/RelationType\"\nexport * from \"./error\"\nexport * from \"./decorator/columns/Column\"\nexport * from \"./decorator/columns/CreateDateColumn\"\nexport * from \"./decorator/columns/DeleteDateColumn\"\nexport * from \"./decorator/columns/PrimaryGeneratedColumn\"\nexport * from \"./decorator/columns/PrimaryColumn\"\nexport * from \"./decorator/columns/UpdateDateColumn\"\nexport * from \"./decorator/columns/VersionColumn\"\nexport * from \"./decorator/columns/VirtualColumn\"\nexport * from \"./decorator/columns/ViewColumn\"\nexport * from \"./decorator/columns/ObjectIdColumn\"\nexport * from \"./decorator/listeners/AfterInsert\"\nexport * from \"./decorator/listeners/AfterLoad\"\nexport * from \"./decorator/listeners/AfterRemove\"\nexport * from \"./decorator/listeners/AfterSoftRemove\"\nexport * from \"./decorator/listeners/AfterRecover\"\nexport * from \"./decorator/listeners/AfterUpdate\"\nexport * from \"./decorator/listeners/BeforeInsert\"\nexport * from \"./decorator/listeners/BeforeRemove\"\nexport * from \"./decorator/listeners/BeforeSoftRemove\"\nexport * from \"./decorator/listeners/BeforeRecover\"\nexport * from \"./decorator/listeners/BeforeUpdate\"\nexport * from \"./decorator/listeners/EventSubscriber\"\nexport * from \"./decorator/options/ColumnOptions\"\nexport * from \"./decorator/options/IndexOptions\"\nexport * from \"./decorator/options/JoinColumnOptions\"\nexport * from \"./decorator/options/JoinTableOptions\"\nexport * from \"./decorator/options/RelationOptions\"\nexport * from \"./decorator/options/EntityOptions\"\nexport * from \"./decorator/options/ValueTransformer\"\nexport * from \"./decorator/relations/JoinColumn\"\nexport * from \"./decorator/relations/JoinTable\"\nexport * from \"./decorator/relations/ManyToMany\"\nexport * from \"./decorator/relations/ManyToOne\"\nexport * from \"./decorator/relations/OneToMany\"\nexport * from \"./decorator/relations/OneToOne\"\nexport * from \"./decorator/relations/RelationCount\"\nexport * from \"./decorator/relations/RelationId\"\nexport * from \"./decorator/entity/Entity\"\nexport * from \"./decorator/entity/ChildEntity\"\nexport * from \"./decorator/entity/TableInheritance\"\nexport * from \"./decorator/entity-view/ViewEntity\"\nexport * from \"./decorator/tree/TreeLevelColumn\"\nexport * from \"./decorator/tree/TreeParent\"\nexport * from \"./decorator/tree/TreeChildren\"\nexport * from \"./decorator/tree/Tree\"\nexport * from \"./decorator/Index\"\nexport * from \"./decorator/Unique\"\nexport * from \"./decorator/Check\"\nexport * from \"./decorator/Exclusion\"\nexport * from \"./decorator/Generated\"\nexport * from \"./decorator/EntityRepository\"\nexport * from \"./find-options/operator/And\"\nexport * from \"./find-options/operator/Any\"\nexport * from \"./find-options/operator/ArrayContainedBy\"\nexport * from \"./find-options/operator/ArrayContains\"\nexport * from \"./find-options/operator/ArrayOverlap\"\nexport * from \"./find-options/operator/Between\"\nexport * from \"./find-options/operator/Equal\"\nexport * from \"./find-options/operator/In\"\nexport * from \"./find-options/operator/IsNull\"\nexport * from \"./find-options/operator/LessThan\"\nexport * from \"./find-options/operator/LessThanOrEqual\"\nexport * from \"./find-options/operator/ILike\"\nexport * from \"./find-options/operator/Like\"\nexport * from \"./find-options/operator/MoreThan\"\nexport * from \"./find-options/operator/MoreThanOrEqual\"\nexport * from \"./find-options/operator/Not\"\nexport * from \"./find-options/operator/Raw\"\nexport * from \"./find-options/operator/JsonContains\"\nexport * from \"./find-options/EqualOperator\"\nexport * from \"./find-options/FindManyOptions\"\nexport * from \"./find-options/FindOneOptions\"\nexport * from \"./find-options/FindOperator\"\nexport * from \"./find-options/FindOperatorType\"\nexport * from \"./find-options/FindOptionsOrder\"\nexport * from \"./find-options/FindOptionsRelations\"\nexport * from \"./find-options/FindOptionsSelect\"\nexport * from \"./find-options/FindOptionsUtils\"\nexport * from \"./find-options/FindOptionsWhere\"\nexport * from \"./find-options/FindTreeOptions\"\nexport * from \"./find-options/JoinOptions\"\nexport * from \"./find-options/OrderByCondition\"\nexport * from \"./logger/AbstractLogger\"\nexport * from \"./logger/Logger\"\nexport * from \"./logger/LoggerOptions\"\nexport * from \"./logger/AdvancedConsoleLogger\"\nexport * from \"./logger/SimpleConsoleLogger\"\nexport * from \"./logger/FileLogger\"\nexport * from \"./metadata/EntityMetadata\"\nexport * from \"./entity-manager/EntityManager\"\nexport * from \"./repository/AbstractRepository\"\nexport * from \"./repository/Repository\"\nexport * from \"./repository/BaseEntity\"\nexport * from \"./repository/TreeRepository\"\nexport * from \"./repository/MongoRepository\"\nexport * from \"./repository/RemoveOptions\"\nexport * from \"./repository/SaveOptions\"\nexport * from \"./schema-builder/table/TableCheck\"\nexport * from \"./schema-builder/table/TableColumn\"\nexport * from \"./schema-builder/table/TableExclusion\"\nexport * from \"./schema-builder/table/TableForeignKey\"\nexport * from \"./schema-builder/table/TableIndex\"\nexport * from \"./schema-builder/table/TableUnique\"\nexport * from \"./schema-builder/table/Table\"\nexport * from \"./schema-builder/view/View\"\nexport * from \"./schema-builder/options/TableCheckOptions\"\nexport * from \"./schema-builder/options/TableColumnOptions\"\nexport * from \"./schema-builder/options/TableExclusionOptions\"\nexport * from \"./schema-builder/options/TableForeignKeyOptions\"\nexport * from \"./schema-builder/options/TableIndexOptions\"\nexport * from \"./schema-builder/options/TableOptions\"\nexport * from \"./schema-builder/options/TableUniqueOptions\"\nexport * from \"./schema-builder/options/ViewOptions\"\nexport * from \"./driver/mongodb/typings\"\nexport * from \"./driver/types/DatabaseType\"\nexport * from \"./driver/types/GeoJsonTypes\"\nexport * from \"./driver/types/ReplicationMode\"\nexport * from \"./driver/sqlserver/MssqlParameter\"\n\n// export * from \"./data-source\";\n\nexport { ConnectionOptionsReader } from \"./connection/ConnectionOptionsReader\"\nexport { ConnectionOptions } from \"./connection/ConnectionOptions\"\nexport { DataSource } from \"./data-source/DataSource\"\nexport { Connection } from \"./connection/Connection\"\nexport { ConnectionManager } from \"./connection/ConnectionManager\"\nexport { DataSourceOptions } from \"./data-source/DataSourceOptions\"\nexport { Driver } from \"./driver/Driver\"\nexport { QueryBuilder } from \"./query-builder/QueryBuilder\"\nexport { SelectQueryBuilder } from \"./query-builder/SelectQueryBuilder\"\nexport { DeleteQueryBuilder } from \"./query-builder/DeleteQueryBuilder\"\nexport { InsertQueryBuilder } from \"./query-builder/InsertQueryBuilder\"\nexport { UpdateQueryBuilder } from \"./query-builder/UpdateQueryBuilder\"\nexport { RelationQueryBuilder } from \"./query-builder/RelationQueryBuilder\"\nexport { Brackets } from \"./query-builder/Brackets\"\nexport { NotBrackets } from \"./query-builder/NotBrackets\"\nexport { WhereExpressionBuilder } from \"./query-builder/WhereExpressionBuilder\"\nexport { WhereExpression } from \"./query-builder/WhereExpressionBuilder\"\nexport { InsertResult } from \"./query-builder/result/InsertResult\"\nexport { UpdateResult } from \"./query-builder/result/UpdateResult\"\nexport { DeleteResult } from \"./query-builder/result/DeleteResult\"\nexport { QueryResult } from \"./query-runner/QueryResult\"\nexport { QueryRunner } from \"./query-runner/QueryRunner\"\nexport { MongoEntityManager } from \"./entity-manager/MongoEntityManager\"\nexport { Migration } from \"./migration/Migration\"\nexport { MigrationExecutor } from \"./migration/MigrationExecutor\"\nexport { MigrationInterface } from \"./migration/MigrationInterface\"\nexport { DefaultNamingStrategy } from \"./naming-strategy/DefaultNamingStrategy\"\nexport { NamingStrategyInterface } from \"./naming-strategy/NamingStrategyInterface\"\nexport { LegacyOracleNamingStrategy } from \"./naming-strategy/LegacyOracleNamingStrategy\"\nexport { InsertEvent } from \"./subscriber/event/InsertEvent\"\nexport { LoadEvent } from \"./subscriber/event/LoadEvent\"\nexport { UpdateEvent } from \"./subscriber/event/UpdateEvent\"\nexport { RemoveEvent } from \"./subscriber/event/RemoveEvent\"\nexport { SoftRemoveEvent } from \"./subscriber/event/SoftRemoveEvent\"\nexport { RecoverEvent } from \"./subscriber/event/RecoverEvent\"\nexport { TransactionCommitEvent } from \"./subscriber/event/TransactionCommitEvent\"\nexport { TransactionRollbackEvent } from \"./subscriber/event/TransactionRollbackEvent\"\nexport { TransactionStartEvent } from \"./subscriber/event/TransactionStartEvent\"\nexport { EntitySubscriberInterface } from \"./subscriber/EntitySubscriberInterface\"\nexport { EntitySchema } from \"./entity-schema/EntitySchema\"\nexport { EntitySchemaColumnOptions } from \"./entity-schema/EntitySchemaColumnOptions\"\nexport { EntitySchemaIndexOptions } from \"./entity-schema/EntitySchemaIndexOptions\"\nexport { EntitySchemaRelationOptions } from \"./entity-schema/EntitySchemaRelationOptions\"\nexport { EntitySchemaEmbeddedColumnOptions } from \"./entity-schema/EntitySchemaEmbeddedColumnOptions\"\nexport { ColumnType } from \"./driver/types/ColumnTypes\"\nexport { EntitySchemaOptions } from \"./entity-schema/EntitySchemaOptions\"\nexport { InstanceChecker } from \"./util/InstanceChecker\"\nexport { TreeRepositoryUtils } from \"./util/TreeRepositoryUtils\"\n"],"sourceRoot":"."}
|
package/index.mjs
CHANGED
|
@@ -40,7 +40,6 @@ export declare class DefaultNamingStrategy implements NamingStrategyInterface {
|
|
|
40
40
|
* Note that table name comes here already normalized by #tableName method.
|
|
41
41
|
*/
|
|
42
42
|
prefixTableName(prefix: string, tableName: string): string;
|
|
43
|
-
eagerJoinRelationAlias(alias: string, propertyPath: string): string;
|
|
44
43
|
nestedSetColumnNames: {
|
|
45
44
|
left: string;
|
|
46
45
|
right: string;
|
|
@@ -139,9 +139,6 @@ class DefaultNamingStrategy {
|
|
|
139
139
|
prefixTableName(prefix, tableName) {
|
|
140
140
|
return prefix + tableName;
|
|
141
141
|
}
|
|
142
|
-
eagerJoinRelationAlias(alias, propertyPath) {
|
|
143
|
-
return alias + "_" + propertyPath.replace(".", "_");
|
|
144
|
-
}
|
|
145
142
|
}
|
|
146
143
|
exports.DefaultNamingStrategy = DefaultNamingStrategy;
|
|
147
144
|
|
|
@@ -1 +1 @@
|
|
|
1
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from \"./NamingStrategyInterface\"\nimport { RandomGenerator } from \"../util/RandomGenerator\"\nimport { camelCase, snakeCase, titleCase } from \"../util/StringUtils\"\nimport { Table } from \"../schema-builder/table/Table\"\n\n/**\n * Naming strategy that is used by default.\n */\nexport class DefaultNamingStrategy implements NamingStrategyInterface {\n protected getTableName(tableOrName: Table | string): string {\n if (typeof tableOrName !== \"string\") {\n tableOrName = tableOrName.name\n }\n\n return tableOrName.split(\".\").pop()!\n }\n /**\n * Normalizes table name.\n *\n * @param targetName Name of the target entity that can be used to generate a table name.\n * @param userSpecifiedName For example if user specified a table name in a decorator, e.g. @Entity(\"name\")\n */\n tableName(\n targetName: string,\n userSpecifiedName: string | undefined,\n ): string {\n return userSpecifiedName ? userSpecifiedName : snakeCase(targetName)\n }\n\n /**\n * Creates a table name for a junction table of a closure table.\n *\n * @param originalClosureTableName Name of the closure table which owns this junction table.\n */\n closureJunctionTableName(originalClosureTableName: string): string {\n return originalClosureTableName + \"_closure\"\n }\n\n columnName(\n propertyName: string,\n customName: string,\n embeddedPrefixes: string[],\n ): string {\n const name = customName || propertyName\n\n if (embeddedPrefixes.length)\n return camelCase(embeddedPrefixes.join(\"_\")) + titleCase(name)\n\n return name\n }\n\n relationName(propertyName: string): string {\n return propertyName\n }\n\n primaryKeyName(tableOrName: Table | string, columnNames: string[]): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"PK_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n uniqueConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"UQ_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n relationConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n let key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n if (where) key += `_${where}`\n\n return \"REL_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n defaultConstraintName(\n tableOrName: Table | string,\n columnName: string,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${columnName}`\n return \"DF_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n foreignKeyName(\n tableOrName: Table | string,\n columnNames: string[],\n _referencedTablePath?: string,\n _referencedColumnNames?: string[],\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"FK_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n indexName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n let key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n if (where) key += `_${where}`\n\n return \"IDX_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n checkConstraintName(\n tableOrName: Table | string,\n expression: string,\n isEnum?: boolean,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${expression}`\n const name = \"CHK_\" + RandomGenerator.sha1(key).substr(0, 26)\n return isEnum ? `${name}_ENUM` : name\n }\n\n exclusionConstraintName(\n tableOrName: Table | string,\n expression: string,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${expression}`\n return \"XCL_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n joinColumnName(relationName: string, referencedColumnName: string): string {\n return camelCase(relationName + \"_\" + referencedColumnName)\n }\n\n joinTableName(\n firstTableName: string,\n secondTableName: string,\n firstPropertyName: string,\n secondPropertyName: string,\n ): string {\n return snakeCase(\n firstTableName +\n \"_\" +\n firstPropertyName.replace(/\\./gi, \"_\") +\n \"_\" +\n secondTableName,\n )\n }\n\n joinTableColumnDuplicationPrefix(\n columnName: string,\n index: number,\n ): string {\n return columnName + \"_\" + index\n }\n\n joinTableColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string {\n return camelCase(\n tableName + \"_\" + (columnName ? columnName : propertyName),\n )\n }\n\n joinTableInverseColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string {\n return this.joinTableColumnName(tableName, propertyName, columnName)\n }\n\n /**\n * Adds globally set prefix to the table name.\n * This method is executed no matter if prefix was set or not.\n * Table name is either user's given table name, either name generated from entity target.\n * Note that table name comes here already normalized by #tableName method.\n */\n prefixTableName(prefix: string, tableName: string): string {\n return prefix + tableName\n }\n\n eagerJoinRelationAlias(alias: string, propertyPath: string): string {\n return alias + \"_\" + propertyPath.replace(\".\", \"_\")\n }\n\n nestedSetColumnNames = { left: \"nsleft\", right: \"nsright\" }\n materializedPathColumnName = \"mpath\"\n}\n"],"sourceRoot":".."}
|
|
1
|
+
{"version":3,"sources":["../../src/naming-strategy/Defa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iCAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3D,CAAC;IAED,cAAc,CAAC,YAAoB,EAAE,oBAA4B;QAC7D,OAAO,IAAA,uBAAS,EAAC,YAAY,GAAG,GAAG,GAAG,oBAAoB,CAAC,CAAA;IAC/D,CAAC;IAED,aAAa,CACT,cAAsB,EACtB,eAAuB,EACvB,iBAAyB,EACzB,kBAA0B;QAE1B,OAAO,IAAA,uBAAS,EACZ,cAAc;YACV,GAAG;YACH,iBAAiB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;YACtC,GAAG;YACH,eAAe,CACtB,CAAA;IACL,CAAC;IAED,gCAAgC,CAC5B,UAAkB,EAClB,KAAa;QAEb,OAAO,UAAU,GAAG,GAAG,GAAG,KAAK,CAAA;IACnC,CAAC;IAED,mBAAmB,CACf,SAAiB,EACjB,YAAoB,EACpB,UAAmB;QAEnB,OAAO,IAAA,uBAAS,EACZ,SAAS,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAC7D,CAAA;IACL,CAAC;IAED,0BAA0B,CACtB,SAAiB,EACjB,YAAoB,EACpB,UAAmB;QAEnB,OAAO,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CAAA;IACxE,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,MAAc,EAAE,SAAiB;QAC7C,OAAO,MAAM,GAAG,SAAS,CAAA;IAC7B,CAAC;CAIJ;AA7MD,sDA6MC","file":"DefaultNamingStrategy.js","sourcesContent":["import { NamingStrategyInterface } from \"./NamingStrategyInterface\"\nimport { RandomGenerator } from \"../util/RandomGenerator\"\nimport { camelCase, snakeCase, titleCase } from \"../util/StringUtils\"\nimport { Table } from \"../schema-builder/table/Table\"\n\n/**\n * Naming strategy that is used by default.\n */\nexport class DefaultNamingStrategy implements NamingStrategyInterface {\n protected getTableName(tableOrName: Table | string): string {\n if (typeof tableOrName !== \"string\") {\n tableOrName = tableOrName.name\n }\n\n return tableOrName.split(\".\").pop()!\n }\n /**\n * Normalizes table name.\n *\n * @param targetName Name of the target entity that can be used to generate a table name.\n * @param userSpecifiedName For example if user specified a table name in a decorator, e.g. @Entity(\"name\")\n */\n tableName(\n targetName: string,\n userSpecifiedName: string | undefined,\n ): string {\n return userSpecifiedName ? userSpecifiedName : snakeCase(targetName)\n }\n\n /**\n * Creates a table name for a junction table of a closure table.\n *\n * @param originalClosureTableName Name of the closure table which owns this junction table.\n */\n closureJunctionTableName(originalClosureTableName: string): string {\n return originalClosureTableName + \"_closure\"\n }\n\n columnName(\n propertyName: string,\n customName: string,\n embeddedPrefixes: string[],\n ): string {\n const name = customName || propertyName\n\n if (embeddedPrefixes.length)\n return camelCase(embeddedPrefixes.join(\"_\")) + titleCase(name)\n\n return name\n }\n\n relationName(propertyName: string): string {\n return propertyName\n }\n\n primaryKeyName(tableOrName: Table | string, columnNames: string[]): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"PK_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n uniqueConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"UQ_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n relationConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n let key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n if (where) key += `_${where}`\n\n return \"REL_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n defaultConstraintName(\n tableOrName: Table | string,\n columnName: string,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${columnName}`\n return \"DF_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n foreignKeyName(\n tableOrName: Table | string,\n columnNames: string[],\n _referencedTablePath?: string,\n _referencedColumnNames?: string[],\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n return \"FK_\" + RandomGenerator.sha1(key).substr(0, 27)\n }\n\n indexName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string {\n // sort incoming column names to avoid issue when [\"id\", \"name\"] and [\"name\", \"id\"] arrays\n const clonedColumnNames = [...columnNames]\n clonedColumnNames.sort()\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n let key = `${replacedTableName}_${clonedColumnNames.join(\"_\")}`\n if (where) key += `_${where}`\n\n return \"IDX_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n checkConstraintName(\n tableOrName: Table | string,\n expression: string,\n isEnum?: boolean,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${expression}`\n const name = \"CHK_\" + RandomGenerator.sha1(key).substr(0, 26)\n return isEnum ? `${name}_ENUM` : name\n }\n\n exclusionConstraintName(\n tableOrName: Table | string,\n expression: string,\n ): string {\n const tableName = this.getTableName(tableOrName)\n const replacedTableName = tableName.replace(\".\", \"_\")\n const key = `${replacedTableName}_${expression}`\n return \"XCL_\" + RandomGenerator.sha1(key).substr(0, 26)\n }\n\n joinColumnName(relationName: string, referencedColumnName: string): string {\n return camelCase(relationName + \"_\" + referencedColumnName)\n }\n\n joinTableName(\n firstTableName: string,\n secondTableName: string,\n firstPropertyName: string,\n secondPropertyName: string,\n ): string {\n return snakeCase(\n firstTableName +\n \"_\" +\n firstPropertyName.replace(/\\./gi, \"_\") +\n \"_\" +\n secondTableName,\n )\n }\n\n joinTableColumnDuplicationPrefix(\n columnName: string,\n index: number,\n ): string {\n return columnName + \"_\" + index\n }\n\n joinTableColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string {\n return camelCase(\n tableName + \"_\" + (columnName ? columnName : propertyName),\n )\n }\n\n joinTableInverseColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string {\n return this.joinTableColumnName(tableName, propertyName, columnName)\n }\n\n /**\n * Adds globally set prefix to the table name.\n * This method is executed no matter if prefix was set or not.\n * Table name is either user's given table name, either name generated from entity target.\n * Note that table name comes here already normalized by #tableName method.\n */\n prefixTableName(prefix: string, tableName: string): string {\n return prefix + tableName\n }\n\n nestedSetColumnNames = { left: \"nsleft\", right: \"nsright\" }\n materializedPathColumnName = \"mpath\"\n}\n"],"sourceRoot":".."}
|
|
@@ -99,10 +99,6 @@ export interface NamingStrategyInterface {
|
|
|
99
99
|
* Note that table name comes here already normalized by #tableName method.
|
|
100
100
|
*/
|
|
101
101
|
prefixTableName(prefix: string, tableName: string): string;
|
|
102
|
-
/**
|
|
103
|
-
* Gets the name of the alias used for relation joins.
|
|
104
|
-
*/
|
|
105
|
-
eagerJoinRelationAlias(alias: string, propertyPath: string): string;
|
|
106
102
|
/**
|
|
107
103
|
* Column names for nested sets.
|
|
108
104
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/naming-strategy/NamingStrategyInterface.ts"],"names":[],"mappings":"","file":"NamingStrategyInterface.js","sourcesContent":["import { Table } from \"../schema-builder/table/Table\"\nimport { View } from \"../schema-builder/view/View\"\n\n/**\n * Naming strategy defines how auto-generated names for such things like table name, or table column gonna be\n * generated.\n */\nexport interface NamingStrategyInterface {\n /**\n * Naming strategy name.\n */\n name?: string\n\n /**\n * Normalizes table name.\n *\n * @param targetName Name of the target entity that can be used to generate a table name.\n * @param userSpecifiedName For example if user specified a table name in a decorator, e.g. @Entity(\"name\")\n */\n tableName(targetName: string, userSpecifiedName: string | undefined): string\n\n /**\n * Creates a table name for a junction table of a closure table.\n *\n * @param originalClosureTableName Name of the closure table which owns this junction table.\n */\n closureJunctionTableName(originalClosureTableName: string): string\n\n /**\n * Gets the table's column name from the given property name.\n */\n columnName(\n propertyName: string,\n customName: string | undefined,\n embeddedPrefixes: string[],\n ): string\n\n /**\n * Gets the table's relation name from the given property name.\n */\n relationName(propertyName: string): string\n\n /**\n * Gets the table's primary key name from the given table name and column names.\n */\n primaryKeyName(tableOrName: Table | string, columnNames: string[]): string\n\n /**\n * Gets the table's unique constraint name from the given table name and column names.\n */\n uniqueConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n ): string\n\n /**\n * Gets the relation constraint (UNIQUE or UNIQUE INDEX) name from the given table name, column names\n * and WHERE condition, if UNIQUE INDEX used.\n */\n relationConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string\n\n /**\n * Gets the table's default constraint name from the given table name and column name.\n */\n defaultConstraintName(\n tableOrName: Table | string,\n columnName: string,\n ): string\n\n /**\n * Gets the name of the foreign key.\n */\n foreignKeyName(\n tableOrName: Table | string,\n columnNames: string[],\n referencedTablePath?: string,\n referencedColumnNames?: string[],\n ): string\n\n /**\n * Gets the name of the index - simple and compose index.\n */\n indexName(\n tableOrName: Table | View | string,\n columns: string[],\n where?: string,\n ): string\n\n /**\n * Gets the name of the check constraint.\n *\n * \"isEnum\" parameter is used to indicate if this check constraint used\n * to handle \"simple-enum\" type for databases that are not supporting \"enum\"\n * type out of the box. If \"true\", constraint is ignored during CHECK constraints\n * synchronization.\n */\n checkConstraintName(\n tableOrName: Table | string,\n expression: string,\n isEnum?: boolean,\n ): string\n\n /**\n * Gets the name of the exclusion constraint.\n */\n exclusionConstraintName(\n tableOrName: Table | string,\n expression: string,\n ): string\n\n /**\n * Gets the name of the join column used in the one-to-one and many-to-one relations.\n */\n joinColumnName(relationName: string, referencedColumnName: string): string\n\n /**\n * Gets the name of the join table used in the many-to-many relations.\n */\n joinTableName(\n firstTableName: string,\n secondTableName: string,\n firstPropertyName: string,\n secondPropertyName: string,\n ): string\n\n /**\n * Columns in join tables can have duplicate names in case of self-referencing.\n * This method provide a resolution for such column names.\n */\n joinTableColumnDuplicationPrefix(columnName: string, index: number): string\n\n /**\n * Gets the name of the column used for columns in the junction tables.\n *\n * The reverse?:boolean parameter denotes if the joinTableColumnName is called for the junctionColumn (false)\n * or the inverseJunctionColumns (true)\n */\n joinTableColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string\n\n /**\n * Gets the name of the column used for columns in the junction tables from the invers side of the relationship.\n */\n joinTableInverseColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string\n\n /**\n * Adds globally set prefix to the table name.\n * This method is executed no matter if prefix was set or not.\n * Table name is either user's given table name, either name generated from entity target.\n * Note that table name comes here already normalized by #tableName method.\n */\n prefixTableName(prefix: string, tableName: string): string\n\n /**\n *
|
|
1
|
+
{"version":3,"sources":["../../src/naming-strategy/NamingStrategyInterface.ts"],"names":[],"mappings":"","file":"NamingStrategyInterface.js","sourcesContent":["import { Table } from \"../schema-builder/table/Table\"\nimport { View } from \"../schema-builder/view/View\"\n\n/**\n * Naming strategy defines how auto-generated names for such things like table name, or table column gonna be\n * generated.\n */\nexport interface NamingStrategyInterface {\n /**\n * Naming strategy name.\n */\n name?: string\n\n /**\n * Normalizes table name.\n *\n * @param targetName Name of the target entity that can be used to generate a table name.\n * @param userSpecifiedName For example if user specified a table name in a decorator, e.g. @Entity(\"name\")\n */\n tableName(targetName: string, userSpecifiedName: string | undefined): string\n\n /**\n * Creates a table name for a junction table of a closure table.\n *\n * @param originalClosureTableName Name of the closure table which owns this junction table.\n */\n closureJunctionTableName(originalClosureTableName: string): string\n\n /**\n * Gets the table's column name from the given property name.\n */\n columnName(\n propertyName: string,\n customName: string | undefined,\n embeddedPrefixes: string[],\n ): string\n\n /**\n * Gets the table's relation name from the given property name.\n */\n relationName(propertyName: string): string\n\n /**\n * Gets the table's primary key name from the given table name and column names.\n */\n primaryKeyName(tableOrName: Table | string, columnNames: string[]): string\n\n /**\n * Gets the table's unique constraint name from the given table name and column names.\n */\n uniqueConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n ): string\n\n /**\n * Gets the relation constraint (UNIQUE or UNIQUE INDEX) name from the given table name, column names\n * and WHERE condition, if UNIQUE INDEX used.\n */\n relationConstraintName(\n tableOrName: Table | string,\n columnNames: string[],\n where?: string,\n ): string\n\n /**\n * Gets the table's default constraint name from the given table name and column name.\n */\n defaultConstraintName(\n tableOrName: Table | string,\n columnName: string,\n ): string\n\n /**\n * Gets the name of the foreign key.\n */\n foreignKeyName(\n tableOrName: Table | string,\n columnNames: string[],\n referencedTablePath?: string,\n referencedColumnNames?: string[],\n ): string\n\n /**\n * Gets the name of the index - simple and compose index.\n */\n indexName(\n tableOrName: Table | View | string,\n columns: string[],\n where?: string,\n ): string\n\n /**\n * Gets the name of the check constraint.\n *\n * \"isEnum\" parameter is used to indicate if this check constraint used\n * to handle \"simple-enum\" type for databases that are not supporting \"enum\"\n * type out of the box. If \"true\", constraint is ignored during CHECK constraints\n * synchronization.\n */\n checkConstraintName(\n tableOrName: Table | string,\n expression: string,\n isEnum?: boolean,\n ): string\n\n /**\n * Gets the name of the exclusion constraint.\n */\n exclusionConstraintName(\n tableOrName: Table | string,\n expression: string,\n ): string\n\n /**\n * Gets the name of the join column used in the one-to-one and many-to-one relations.\n */\n joinColumnName(relationName: string, referencedColumnName: string): string\n\n /**\n * Gets the name of the join table used in the many-to-many relations.\n */\n joinTableName(\n firstTableName: string,\n secondTableName: string,\n firstPropertyName: string,\n secondPropertyName: string,\n ): string\n\n /**\n * Columns in join tables can have duplicate names in case of self-referencing.\n * This method provide a resolution for such column names.\n */\n joinTableColumnDuplicationPrefix(columnName: string, index: number): string\n\n /**\n * Gets the name of the column used for columns in the junction tables.\n *\n * The reverse?:boolean parameter denotes if the joinTableColumnName is called for the junctionColumn (false)\n * or the inverseJunctionColumns (true)\n */\n joinTableColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string\n\n /**\n * Gets the name of the column used for columns in the junction tables from the invers side of the relationship.\n */\n joinTableInverseColumnName(\n tableName: string,\n propertyName: string,\n columnName?: string,\n ): string\n\n /**\n * Adds globally set prefix to the table name.\n * This method is executed no matter if prefix was set or not.\n * Table name is either user's given table name, either name generated from entity target.\n * Note that table name comes here already normalized by #tableName method.\n */\n prefixTableName(prefix: string, tableName: string): string\n\n /**\n * Column names for nested sets.\n */\n nestedSetColumnNames: { left: string; right: string }\n\n /**\n * Column name for materialized paths.\n */\n materializedPathColumnName: string\n}\n"],"sourceRoot":".."}
|
package/package.json
CHANGED
|
@@ -1,271 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "typeorm",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "0.3.17",
|
|
5
|
-
"description": "Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"readmeFilename": "README.md",
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Umed Khudoiberdiev",
|
|
10
|
-
"email": "pleerock.me@gmail.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">= 12.9.0"
|
|
14
|
-
},
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./index.d.ts",
|
|
18
|
-
"node": {
|
|
19
|
-
"import": "./index.mjs",
|
|
20
|
-
"require": "./index.js",
|
|
21
|
-
"types": "./index.d.ts"
|
|
22
|
-
},
|
|
23
|
-
"browser": {
|
|
24
|
-
"require": "./index.js",
|
|
25
|
-
"import": "./browser/index.js",
|
|
26
|
-
"default": "./index.js"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"./browser": {
|
|
30
|
-
"types": "./index.d.ts",
|
|
31
|
-
"default": "./browser/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./*.js": "./*.js",
|
|
34
|
-
"./*": {
|
|
35
|
-
"require": "./*.js",
|
|
36
|
-
"import": "./*"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"main": "./index.js",
|
|
40
|
-
"module": "./index.mjs",
|
|
41
|
-
"types": "./index.d.ts",
|
|
42
|
-
"browser": {
|
|
43
|
-
"./browser/connection/ConnectionOptionsReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js",
|
|
44
|
-
"./browser/connection/options-reader/ConnectionOptionsXmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js",
|
|
45
|
-
"./browser/connection/options-reader/ConnectionOptionsYmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js",
|
|
46
|
-
"./browser/driver/aurora-data-api/AuroraDataApiDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
47
|
-
"./browser/driver/better-sqlite3/BetterSqlite3Driver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
48
|
-
"./browser/driver/cockroachdb/CockroachDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
49
|
-
"./browser/driver/mongodb/MongoDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
50
|
-
"./browser/driver/mongodb/MongoQueryRunner.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
51
|
-
"./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
52
|
-
"./browser/driver/mongodb/bson.typings.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
53
|
-
"./browser/driver/mysql/MysqlDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
54
|
-
"./browser/driver/oracle/OracleDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
55
|
-
"./browser/driver/postgres/PostgresDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
56
|
-
"./browser/driver/sap/SapDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
57
|
-
"./browser/driver/sqlite/SqliteDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
58
|
-
"./browser/driver/sqlserver/SqlServerDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
59
|
-
"./browser/entity-manager/MongoEntityManager.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
60
|
-
"./browser/logger/FileLogger.js": "./browser/platform/BrowserFileLoggerDummy.js",
|
|
61
|
-
"./browser/platform/PlatformTools.js": "./browser/platform/BrowserPlatformTools.js",
|
|
62
|
-
"./browser/repository/MongoRepository.js": "./browser/platform/BrowserDisabledDriversDummy.js",
|
|
63
|
-
"./browser/util/DirectoryExportedClassesLoader.js": "./browser/platform/BrowserDirectoryExportedClassesLoader.js",
|
|
64
|
-
"./index.js": "./browser/index.js",
|
|
65
|
-
"./index.mjs": "./browser/index.js"
|
|
66
|
-
},
|
|
67
|
-
"repository": {
|
|
68
|
-
"type": "git",
|
|
69
|
-
"url": "https://github.com/typeorm/typeorm.git"
|
|
70
|
-
},
|
|
71
|
-
"bugs": {
|
|
72
|
-
"url": "https://github.com/typeorm/typeorm/issues"
|
|
73
|
-
},
|
|
74
|
-
"homepage": "https://typeorm.io",
|
|
75
|
-
"tags": [
|
|
76
|
-
"orm",
|
|
77
|
-
"typescript",
|
|
78
|
-
"typescript-orm",
|
|
79
|
-
"mysql",
|
|
80
|
-
"mysql-orm",
|
|
81
|
-
"postgresql",
|
|
82
|
-
"postgresql-orm",
|
|
83
|
-
"mariadb",
|
|
84
|
-
"mariadb-orm",
|
|
85
|
-
"spanner",
|
|
86
|
-
"sqlite",
|
|
87
|
-
"sqlite-orm",
|
|
88
|
-
"sql-server",
|
|
89
|
-
"sql-server-orm",
|
|
90
|
-
"oracle",
|
|
91
|
-
"oracle-orm",
|
|
92
|
-
"cloud-spanner",
|
|
93
|
-
"cloud-spanner-orm"
|
|
94
|
-
],
|
|
95
|
-
"devDependencies": {
|
|
96
|
-
"@types/app-root-path": "^1.2.4",
|
|
97
|
-
"@types/chai": "^4.3.4",
|
|
98
|
-
"@types/chai-as-promised": "^7.1.5",
|
|
99
|
-
"@types/debug": "^4.1.7",
|
|
100
|
-
"@types/mkdirp": "^1.0.2",
|
|
101
|
-
"@types/mocha": "^10.0.1",
|
|
102
|
-
"@types/node": "^18.13.0",
|
|
103
|
-
"@types/sha.js": "^2.4.0",
|
|
104
|
-
"@types/sinon": "^10.0.13",
|
|
105
|
-
"@types/source-map-support": "^0.5.6",
|
|
106
|
-
"@types/uuid": "^9.0.0",
|
|
107
|
-
"@types/yargs": "^17.0.22",
|
|
108
|
-
"better-sqlite3": "^8.1.0",
|
|
109
|
-
"chai": "^4.3.7",
|
|
110
|
-
"chai-as-promised": "^7.1.1",
|
|
111
|
-
"class-transformer": "^0.5.1",
|
|
112
|
-
"conventional-changelog-angular": "^5.0.13",
|
|
113
|
-
"conventional-changelog-cli": "^2.2.2",
|
|
114
|
-
"del": "6.1.1",
|
|
115
|
-
"gulp": "^4.0.2",
|
|
116
|
-
"gulp-istanbul": "^1.1.3",
|
|
117
|
-
"gulp-mocha": "^8.0.0",
|
|
118
|
-
"gulp-rename": "^2.0.0",
|
|
119
|
-
"gulp-replace": "^1.1.4",
|
|
120
|
-
"gulp-shell": "^0.8.0",
|
|
121
|
-
"gulp-sourcemaps": "^3.0.0",
|
|
122
|
-
"gulp-typescript": "^6.0.0-alpha.1",
|
|
123
|
-
"gulpclass": "^0.2.0",
|
|
124
|
-
"husky": "^8.0.3",
|
|
125
|
-
"mocha": "^10.2.0",
|
|
126
|
-
"mongodb": "^5.2.0",
|
|
127
|
-
"mssql": "^9.1.1",
|
|
128
|
-
"mysql": "^2.18.1",
|
|
129
|
-
"mysql2": "^3.1.1",
|
|
130
|
-
"pg": "^8.9.0",
|
|
131
|
-
"pg-query-stream": "^4.3.0",
|
|
132
|
-
"prettier": "^2.8.3",
|
|
133
|
-
"redis": "^4.6.4",
|
|
134
|
-
"remap-istanbul": "^0.13.0",
|
|
135
|
-
"rimraf": "^4.1.2",
|
|
136
|
-
"sinon": "^15.0.1",
|
|
137
|
-
"sinon-chai": "^3.7.0",
|
|
138
|
-
"source-map-support": "^0.5.21",
|
|
139
|
-
"sql.js": "^1.8.0",
|
|
140
|
-
"sqlite3": "^5.1.4",
|
|
141
|
-
"ts-node": "^10.9.1",
|
|
142
|
-
"typeorm-aurora-data-api-driver": "^2.4.4",
|
|
143
|
-
"typescript": "^4.9.5"
|
|
144
|
-
},
|
|
145
|
-
"peerDependencies": {
|
|
146
|
-
"@google-cloud/spanner": "^5.18.0",
|
|
147
|
-
"@sap/hana-client": "^2.12.25",
|
|
148
|
-
"better-sqlite3": "^7.1.2 || ^8.0.0",
|
|
149
|
-
"hdb-pool": "^0.1.6",
|
|
150
|
-
"ioredis": "^5.0.4",
|
|
151
|
-
"mongodb": "^5.2.0",
|
|
152
|
-
"mssql": "^9.1.1",
|
|
153
|
-
"mysql2": "^2.2.5 || ^3.0.1",
|
|
154
|
-
"oracledb": "^5.1.0",
|
|
155
|
-
"pg": "^8.5.1",
|
|
156
|
-
"pg-native": "^3.0.0",
|
|
157
|
-
"pg-query-stream": "^4.0.0",
|
|
158
|
-
"redis": "^3.1.1 || ^4.0.0",
|
|
159
|
-
"sql.js": "^1.4.0",
|
|
160
|
-
"sqlite3": "^5.0.3",
|
|
161
|
-
"ts-node": "^10.7.0",
|
|
162
|
-
"typeorm-aurora-data-api-driver": "^2.0.0"
|
|
163
|
-
},
|
|
164
|
-
"peerDependenciesMeta": {
|
|
165
|
-
"@google-cloud/spanner": {
|
|
166
|
-
"optional": true
|
|
167
|
-
},
|
|
168
|
-
"@sap/hana-client": {
|
|
169
|
-
"optional": true
|
|
170
|
-
},
|
|
171
|
-
"better-sqlite3": {
|
|
172
|
-
"optional": true
|
|
173
|
-
},
|
|
174
|
-
"hdb-pool": {
|
|
175
|
-
"optional": true
|
|
176
|
-
},
|
|
177
|
-
"ioredis": {
|
|
178
|
-
"optional": true
|
|
179
|
-
},
|
|
180
|
-
"mongodb": {
|
|
181
|
-
"optional": true
|
|
182
|
-
},
|
|
183
|
-
"mssql": {
|
|
184
|
-
"optional": true
|
|
185
|
-
},
|
|
186
|
-
"mysql2": {
|
|
187
|
-
"optional": true
|
|
188
|
-
},
|
|
189
|
-
"oracledb": {
|
|
190
|
-
"optional": true
|
|
191
|
-
},
|
|
192
|
-
"pg": {
|
|
193
|
-
"optional": true
|
|
194
|
-
},
|
|
195
|
-
"pg-native": {
|
|
196
|
-
"optional": true
|
|
197
|
-
},
|
|
198
|
-
"pg-query-stream": {
|
|
199
|
-
"optional": true
|
|
200
|
-
},
|
|
201
|
-
"redis": {
|
|
202
|
-
"optional": true
|
|
203
|
-
},
|
|
204
|
-
"sql.js": {
|
|
205
|
-
"optional": true
|
|
206
|
-
},
|
|
207
|
-
"sqlite3": {
|
|
208
|
-
"optional": true
|
|
209
|
-
},
|
|
210
|
-
"ts-node": {
|
|
211
|
-
"optional": true
|
|
212
|
-
},
|
|
213
|
-
"typeorm-aurora-data-api-driver": {
|
|
214
|
-
"optional": true
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"dependencies": {
|
|
218
|
-
"@sqltools/formatter": "^1.2.5",
|
|
219
|
-
"app-root-path": "^3.1.0",
|
|
220
|
-
"buffer": "^6.0.3",
|
|
221
|
-
"chalk": "^4.1.2",
|
|
222
|
-
"cli-highlight": "^2.1.11",
|
|
223
|
-
"date-fns": "^2.29.3",
|
|
224
|
-
"debug": "^4.3.4",
|
|
225
|
-
"dotenv": "^16.0.3",
|
|
226
|
-
"glob": "^8.1.0",
|
|
227
|
-
"mkdirp": "^2.1.3",
|
|
228
|
-
"reflect-metadata": "^0.1.13",
|
|
229
|
-
"sha.js": "^2.4.11",
|
|
230
|
-
"tslib": "^2.5.0",
|
|
231
|
-
"uuid": "^9.0.0",
|
|
232
|
-
"yargs": "^17.6.2"
|
|
233
|
-
},
|
|
234
|
-
"scripts": {
|
|
235
|
-
"test": "rimraf ./build && tsc && mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test",
|
|
236
|
-
"test-fast": "mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test",
|
|
237
|
-
"compile": "rimraf ./build && tsc",
|
|
238
|
-
"watch": "./node_modules/.bin/tsc -w",
|
|
239
|
-
"package": "gulp package",
|
|
240
|
-
"pack": "gulp pack",
|
|
241
|
-
"lint": "prettier --check \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"",
|
|
242
|
-
"format": "prettier --write --end-of-line auto \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"",
|
|
243
|
-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2"
|
|
244
|
-
},
|
|
245
|
-
"bin": {
|
|
246
|
-
"typeorm": "./cli.js",
|
|
247
|
-
"typeorm-ts-node-commonjs": "./cli-ts-node-commonjs.js",
|
|
248
|
-
"typeorm-ts-node-esm": "./cli-ts-node-esm.js"
|
|
249
|
-
},
|
|
250
|
-
"funding": "https://opencollective.com/typeorm",
|
|
251
|
-
"collective": {
|
|
252
|
-
"type": "opencollective",
|
|
253
|
-
"url": "https://opencollective.com/typeorm",
|
|
254
|
-
"logo": "https://opencollective.com/opencollective/logo.txt"
|
|
255
|
-
},
|
|
256
|
-
"nyc": {
|
|
257
|
-
"all": true,
|
|
258
|
-
"cache": false,
|
|
259
|
-
"exclude": [
|
|
260
|
-
"**/*.d.ts"
|
|
261
|
-
],
|
|
262
|
-
"extension": [
|
|
263
|
-
".ts"
|
|
264
|
-
],
|
|
265
|
-
"include": [
|
|
266
|
-
"build/compiled/src/**",
|
|
267
|
-
"src/**"
|
|
268
|
-
],
|
|
269
|
-
"reporter": "json"
|
|
270
|
-
}
|
|
271
|
-
}
|
|
1
|
+
{ "name": "typeorm", "private": false, "version": "0.3.18-dev.022d2b5", "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": ">= 12.9.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": { "@types/app-root-path": "^1.2.4", "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/debug": "^4.1.7", "@types/mkdirp": "^1.0.2", "@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", "del": "6.1.1", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", "gulp-mocha": "^8.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.2.0", "mongodb": "^5.2.0", "mssql": "^9.1.1", "mysql": "^2.18.1", "mysql2": "^3.1.1", "pg": "^8.9.0", "pg-query-stream": "^4.3.0", "prettier": "^2.8.3", "redis": "^4.6.4", "remap-istanbul": "^0.13.0", "rimraf": "^4.1.2", "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.1", "typeorm-aurora-data-api-driver": "^2.4.4", "typescript": "^4.9.5" }, "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", "better-sqlite3": "^7.1.2 || ^8.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", "mongodb": "^5.2.0", "mssql": "^9.1.1", "mysql2": "^2.2.5 || ^3.0.1", "oracledb": "^5.1.0", "pg": "^8.5.1", "pg-native": "^3.0.0", "pg-query-stream": "^4.0.0", "redis": "^3.1.1 || ^4.0.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", "date-fns": "^2.29.3", "debug": "^4.3.4", "dotenv": "^16.0.3", "glob": "^8.1.0", "mkdirp": "^2.1.3", "reflect-metadata": "^0.1.13", "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": "prettier --check \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", "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" } }
|
package/persistence/Subject.js
CHANGED
|
@@ -118,7 +118,8 @@ class Subject {
|
|
|
118
118
|
(this.databaseEntityLoaded === false ||
|
|
119
119
|
(this.databaseEntityLoaded && this.databaseEntity)) &&
|
|
120
120
|
// ((this.entity && this.databaseEntity) || (!this.entity && !this.databaseEntity)) &&
|
|
121
|
-
|
|
121
|
+
// ensure there are one or more changes for updatable columns
|
|
122
|
+
this.changeMaps.some((change) => !change.column || change.column.isUpdate));
|
|
122
123
|
}
|
|
123
124
|
/**
|
|
124
125
|
* Checks if this subject must be soft-removed into the database.
|