Repository navigation
@142vip.nest typeorm.类.BaseEntity
API 参考 / @142vip/nest-typeorm / BaseEntity
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:22
Base abstract entity for all entities, used in ActiveRecord patterns.
new BaseEntity():
BaseEntity
BaseEntity
get
statictarget():EntityTarget<any>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:68
Returns object that is managed by this repository. If this repository manages entity from schema, then it returns a name of that schema instead.
EntityTarget<any>
hasId():
boolean
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:31
Checks if entity has an id. If entity composite compose ids, it will check them all.
boolean
recover(
options?):Promise<BaseEntity>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:48
Recovers a given entity in the database.
Promise<BaseEntity>
reload():
Promise<void>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:52
Reloads entity data from the database.
Promise<void>
remove(
options?):Promise<BaseEntity>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:40
Removes current entity from the database.
Promise<BaseEntity>
save(
options?):Promise<BaseEntity>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:36
Saves current entity in the database. If entity does not exist in the database then inserts, otherwise updates.
Promise<BaseEntity>
softRemove(
options?):Promise<BaseEntity>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:44
Records the delete date of current entity.
Promise<BaseEntity>
staticaverage<T>(this,columnName,where):Promise<number|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:230
Return the AVG of a column
T extends BaseEntity
() => T & typeof BaseEntity
PickKeysByType<T, number>
Promise<number | null>
staticclear<T>(this):Promise<void>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:332
Clears all the data from the given table/collection (truncates/drops it).
T extends BaseEntity
() => T & typeof BaseEntity
Promise<void>
staticcount<T>(this,options?):Promise<number>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:212
Counts entities that match given options.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<number>
staticcountBy<T>(this,where):Promise<number>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:218
Counts entities that match given WHERE conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<number>
staticcreate<T>(this):T
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:89
Creates a new entity instance.
T extends BaseEntity
() => T & typeof BaseEntity
T
staticcreate<T>(this,entityLikeArray):T[]
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:96
Creates a new entities and copies all entity properties from given objects into their new entities. Note that it copies only properties that present in entity schema.
T extends BaseEntity
() => T & typeof BaseEntity
DeepPartial<T>[]
T[]
staticcreate<T>(this,entityLike):T
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:103
Creates a new entity instance and copies all entity properties from this object into a new entity. Note that it copies only properties that present in entity schema.
T extends BaseEntity
() => T & typeof BaseEntity
DeepPartial<T>
T
staticcreateQueryBuilder<T>(this,alias?):SelectQueryBuilder<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:83
Creates a new query builder that can be used to build a SQL query.
T extends BaseEntity
() => T & typeof BaseEntity
string
staticdelete<T>(this,criteria):Promise<DeleteResult>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:194
Deletes entities by a given criteria. Unlike remove method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient DELETE query. Does not check if entity exist in the database.
T extends BaseEntity
() => T & typeof BaseEntity
string | number | string[] | Date | ObjectId | number[] | Date[] | ObjectId[] | FindOptionsWhere<T>
Promise<DeleteResult>
staticexists<T>(this,options?):Promise<boolean>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:200
Checks whether any entity exists that matches the given options.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<boolean>
staticexistsBy<T>(this,where):Promise<boolean>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:206
Checks whether any entity exists that matches the given conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<boolean>
staticfind<T>(this,options?):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:248
Finds entities that match given options.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T[]>
staticfindAndCount<T>(this,options?):Promise<[T[],number]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:262
Finds entities that match given find options. Also counts all entities that match given conditions, but ignores pagination settings (from and take options).
T extends BaseEntity
() => T & typeof BaseEntity
Promise<[T[], number]>
staticfindAndCountBy<T>(this,where):Promise<[T[],number]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:270
Finds entities that match given WHERE conditions. Also counts all entities that match given conditions, but ignores pagination settings (from and take options).
T extends BaseEntity
() => T & typeof BaseEntity
Promise<[T[], number]>
staticfindBy<T>(this,where):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:254
Finds entities that match given WHERE conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T[]>
staticfindByIds<T>(this,ids):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:283
Finds entities by ids. Optionally find options can be applied.
T extends BaseEntity
() => T & typeof BaseEntity
any[]
Promise<T[]>
use findBy method instead in conjunction with In operator, for example:
.findBy({ id: In([1, 2, 3]) })
staticfindOne<T>(this,options):Promise<T|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:289
Finds first entity that matches given conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T | null>
staticfindOneBy<T>(this,where):Promise<T|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:295
Finds first entity that matches given conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T | null>
staticfindOneById<T>(this,id):Promise<T|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:307
Finds first entity that matches given options.
T extends BaseEntity
() => T & typeof BaseEntity
string | number | Date | ObjectId
Promise<T | null>
use findOneBy method instead in conjunction with In operator, for example:
.findOneBy({ id: 1 // where "id" is your primary column name })
staticfindOneByOrFail<T>(this,where):Promise<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:319
Finds first entity that matches given conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T>
staticfindOneOrFail<T>(this,options):Promise<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:313
Finds first entity that matches given conditions.
T extends BaseEntity
() => T & typeof BaseEntity
Promise<T>
staticgetId<T>(this,entity):any
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:77
Gets entity mixed id.
T extends BaseEntity
() => T & typeof BaseEntity
T
any
staticgetRepository<T>(this):Repository<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:60
Gets current entity's Repository.
T extends BaseEntity
() => T & typeof BaseEntity
Repository<T>
statichasId(entity):boolean
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:73
Checks entity has an id. If entity composite compose ids, it will check them all.
BaseEntity
boolean
staticinsert<T>(this,entity):Promise<InsertResult>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:168
Inserts a given entity into the database. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT query. Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
T extends BaseEntity
() => T & typeof BaseEntity
_QueryDeepPartialEntity<ObjectLiteral extends T ? unknown : T> | _QueryDeepPartialEntity<ObjectLiteral extends T ? unknown : T>[]
Promise<InsertResult>
staticmaximum<T>(this,columnName,where):Promise<number|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:242
Return the MAX of a column
T extends BaseEntity
() => T & typeof BaseEntity
PickKeysByType<T, number>
Promise<number | null>
staticmerge<T>(this,mergeIntoEntity, ...entityLikes):T
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:109
Merges multiple entities (or entity-like objects) into a given entity.
T extends BaseEntity
() => T & typeof BaseEntity
T
...DeepPartial<T>[]
T
staticminimum<T>(this,columnName,where):Promise<number|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:236
Return the MIN of a column
T extends BaseEntity
() => T & typeof BaseEntity
PickKeysByType<T, number>
Promise<number | null>
staticpreload<T>(this,entityLike):Promise<T|undefined>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:121
Creates a new entity from the given plain javascript object. If entity already exist in the database, then it loads it (and everything related to it), replaces all values with the new ones from the given object and returns this new entity. This new entity is actually a loaded from the db entity with all properties replaced from the new object.
Note that given entity-like object must have an entity id / primary key to find entity by. Returns undefined if entity with given id was not found.
T extends BaseEntity
() => T & typeof BaseEntity
DeepPartial<T>
Promise<T | undefined>
staticquery<T>(this,query,parameters?):Promise<any>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:326
Executes a raw SQL query and returns a raw database results. Raw query execution is supported only by relational databases (MongoDB is not supported).
T extends BaseEntity
() => T & typeof BaseEntity
string
any[]
Promise<any>
staticremove<T>(this,entities,options?):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:141
Removes a given entities from the database.
T extends BaseEntity
() => T & typeof BaseEntity
T[]
Promise<T[]>
staticremove<T>(this,entity,options?):Promise<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:147
Removes a given entity from the database.
T extends BaseEntity
() => T & typeof BaseEntity
T
Promise<T>
staticsave<T>(this,entities,options?):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:128
Saves all given entities in the database. If entities do not exist in the database then inserts, otherwise updates.
T extends BaseEntity
() => T & typeof BaseEntity
DeepPartial<T>[]
Promise<T[]>
staticsave<T>(this,entity,options?):Promise<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:135
Saves a given entity in the database. If entity does not exist in the database then inserts, otherwise updates.
T extends BaseEntity
() => T & typeof BaseEntity
DeepPartial<T>
Promise<T>
staticsoftRemove<T>(this,entities,options?):Promise<T[]>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:153
Records the delete date of all given entities.
T extends BaseEntity
() => T & typeof BaseEntity
T[]
Promise<T[]>
staticsoftRemove<T>(this,entity,options?):Promise<T>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:159
Records the delete date of a given entity.
T extends BaseEntity
() => T & typeof BaseEntity
T
Promise<T>
staticsum<T>(this,columnName,where):Promise<number|null>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:224
Return the SUM of a column
T extends BaseEntity
() => T & typeof BaseEntity
PickKeysByType<T, number>
Promise<number | null>
staticupdate<T>(this,criteria,partialEntity,options?):Promise<UpdateResult>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:177
Updates entity partially. Entity can be found by a given conditions. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient UPDATE query. Does not check if entity exist in the database.
T extends BaseEntity
() => T & typeof BaseEntity
string | number | string[] | Date | ObjectId | number[] | Date[] | ObjectId[] | FindOptionsWhere<T>
Promise<UpdateResult>
staticupsert<T>(this,entityOrEntities,conflictPathsOrOptions):Promise<InsertResult>
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:185
Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
T extends BaseEntity
() => T & typeof BaseEntity
_QueryDeepPartialEntity<ObjectLiteral extends T ? unknown : T> | _QueryDeepPartialEntity<ObjectLiteral extends T ? unknown : T>[]
string[] | UpsertOptions<T>
Promise<InsertResult>
staticuseDataSource(dataSource):void
定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/repository/BaseEntity.d.ts:56
Sets DataSource to be used by entity.
DataSource | null
void
- @142vip/axios
- @142vip/changelog
- @142vip/commit-linter
- @142vip/copyright
- @142vip/data-source
- @142vip/eslint-config
- @142vip/fairy-cli
- @142vip/grpc
- @142vip/nest
- @142vip/nest-redis
- @142vip/nest-typeorm
- @142vip/oauth2.0
- @142vip/open-source
- @142vip/redis
- @142vip/release-version
- @142vip/typeorm
- @142vip/utils