Class: abstract
BaseTrackedEntityHelper
typeorm/src.BaseTrackedEntityHelper
Extends
Implements
Constructors
new BaseTrackedEntityHelper()
new BaseTrackedEntityHelper():
BaseTrackedEntityHelper
Returns
Inherited from
Properties
createdAt
createdAt:
Date
Implementation of
Source
libs/typeorm/src/lib/entity/entity-helper.ts:28
deletedAt
deletedAt?:
Date
Implementation of
Source
libs/typeorm/src/lib/entity/entity-helper.ts:48
updatedAt
updatedAt:
Date
Implementation of
Source
libs/typeorm/src/lib/entity/entity-helper.ts:38
Accessors
target
get
static
target():EntityTarget
<any
>
Returns object that is managed by this repository. If this repository manages entity from schema, then it returns a name of that schema instead.
Returns
EntityTarget
<any
>
Source
node_modules/typeorm/repository/BaseEntity.d.ts:67
Methods
hasId
hasId():
boolean
Checks if entity has an id. If entity composite compose ids, it will check them all.
Returns
boolean
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:30
recover
recover(
options
?):Promise
<BaseTrackedEntityHelper
>
Recovers a given entity in the database.
Parameters
▪ options?: SaveOptions
Returns
Promise
<BaseTrackedEntityHelper
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:47
reload
reload():
Promise
<void
>
Reloads entity data from the database.
Returns
Promise
<void
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:51
remove
remove(
options
?):Promise
<BaseTrackedEntityHelper
>
Removes current entity from the database.
Parameters
▪ options?: RemoveOptions
Returns
Promise
<BaseTrackedEntityHelper
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:39
save
save(
options
?):Promise
<BaseTrackedEntityHelper
>
Saves current entity in the database. If entity does not exist in the database then inserts, otherwise updates.
Parameters
▪ options?: SaveOptions
Returns
Promise
<BaseTrackedEntityHelper
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:35
softRemove
softRemove(
options
?):Promise
<BaseTrackedEntityHelper
>
Records the delete date of current entity.
Parameters
▪ options?: SaveOptions
Returns
Promise
<BaseTrackedEntityHelper
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:43
average
static
average<T
>(this
,columnName
,where
):Promise
<number
>
Return the AVG of a column
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ columnName: PickKeysByType
<T
, number
>
▪ where: FindOptionsWhere
<T
>
Returns
Promise
<number
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:217
clear
static
clear<T
>(this
):Promise
<void
>
Clears all the data from the given table/collection (truncates/drops it).
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
Returns
Promise
<void
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:319
count
static
count<T
>(this
,options
?):Promise
<number
>
Counts entities that match given options.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ options?: FindManyOptions
<T
>
Returns
Promise
<number
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:199
countBy
static
countBy<T
>(this
,where
):Promise
<number
>
Counts entities that match given WHERE conditions.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ where: FindOptionsWhere
<T
>
Returns
Promise
<number
>
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:205
create
create(this)
static
create<T
>(this
):T
Creates a new entity instance.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
Returns
T
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:88
create(this, entityLikeArray)
static
create<T
>(this
,entityLikeArray
):T
[]
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.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ entityLikeArray: DeepPartial
<T
>[]
Returns
T
[]
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:95
create(this, entityLike)
static
create<T
>(this
,entityLike
):T
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.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ entityLike: DeepPartial
<T
>
Returns
T
Inherited from
Source
node_modules/typeorm/repository/BaseEntity.d.ts:102
createQueryBuilder
static
createQueryBuilder<T
>(this
,alias
?):SelectQueryBuilder
<T
>
Creates a new query builder that can be used to build a SQL query.
Type parameters
▪ T extends BaseEntity
Parameters
▪ this: () => T
& typeof BaseEntity
▪ alias?: string