Skip to main content

Class: CustomEntityRepository

backend.CustomEntityRepository

Hierarchy#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

• new CustomEntityRepository()

Overrides#

BaseRepository.constructor

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:16

Properties#

dbType#

• dbType: "mysql" | "mariadb" | "postgres" | "cockroachdb" | "sqlite" | "mssql" | "sap" | "oracle" | "cordova" | "nativescript" | "react-native" | "sqljs" | "mongodb" | "aurora-data-api" | "aurora-data-api-pg" | "expo" | "better-sqlite3" | "capacitor"

Inherited from#

BaseRepository.dbType

Defined in#

system/core/backend/src/repositories/base.repository.ts:24

Methods#

applyBaseFilter#

â–¸ applyBaseFilter<EntityType>(qb, filter?): SelectQueryBuilder<EntityType>

Type parameters#

NameType
EntityTypeTBasePageEntity

Parameters#

NameType
qbSelectQueryBuilder<EntityType>
filter?BaseFilterInput

Returns#

SelectQueryBuilder<EntityType>

Inherited from#

BaseRepository.applyBaseFilter

Defined in#

system/core/backend/src/repositories/base.repository.ts:155


applyCustomEntityFilter#

â–¸ applyCustomEntityFilter(qb, filterParams?): void

Parameters#

NameType
qbSelectQueryBuilder<CustomEntity>
filterParams?CustomEntityFilterInput

Returns#

void

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:82


applyDeleteMany#

â–¸ applyDeleteMany(qb, input): Promise<void>

Parameters#

NameType
qbSelectQueryBuilder<CustomEntity> | DeleteQueryBuilder<CustomEntity>
inputTDeleteManyInput

Returns#

Promise<void>

Inherited from#

BaseRepository.applyDeleteMany

Defined in#

system/core/backend/src/repositories/base.repository.ts:108


applyGetEntityViews#

â–¸ applyGetEntityViews(qb, entityType): SelectQueryBuilder<TBasePageEntity>

Parameters#

NameType
qbSelectQueryBuilder<TBasePageEntity>
entityTypeEDBEntity

Returns#

SelectQueryBuilder<TBasePageEntity>

Inherited from#

BaseRepository.applyGetEntityViews

Defined in#

system/core/backend/src/repositories/base.repository.ts:133


createCustomEntity#

â–¸ createCustomEntity(inputData, id?): Promise<CustomEntity>

Parameters#

NameType
inputDataTCustomEntityInput
id?null | number

Returns#

Promise<CustomEntity>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:51


createEntity#

â–¸ createEntity(input, id?): Promise<CustomEntity>

Parameters#

NameType
inputCustomEntity
id?null | number

Returns#

Promise<CustomEntity>

Inherited from#

BaseRepository.createEntity

Defined in#

system/core/backend/src/repositories/base.repository.ts:70


deleteCustomEntity#

â–¸ deleteCustomEntity(id): Promise<boolean>

Parameters#

NameType
idnumber

Returns#

Promise<boolean>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:70


deleteEntity#

â–¸ deleteEntity(id): Promise<boolean>

Parameters#

NameType
idnumber

Returns#

Promise<boolean>

Inherited from#

BaseRepository.deleteEntity

Defined in#

system/core/backend/src/repositories/base.repository.ts:97


deleteMany#

â–¸ deleteMany(input): Promise<boolean>

Parameters#

NameType
inputTDeleteManyInput

Returns#

Promise<boolean>

Inherited from#

BaseRepository.deleteMany

Defined in#

system/core/backend/src/repositories/base.repository.ts:125


deleteManyFilteredCustomEntities#

â–¸ deleteManyFilteredCustomEntities(input, filterParams?): Promise<undefined | boolean>

Parameters#

NameType
inputTDeleteManyInput
filterParams?CustomEntityFilterInput

Returns#

Promise<undefined | boolean>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:109


getAll#

â–¸ getAll(): Promise<CustomEntity[]>

Returns#

Promise<CustomEntity[]>

Inherited from#

BaseRepository.getAll

Defined in#

system/core/backend/src/repositories/base.repository.ts:44


getById#

â–¸ getById(id, relations?): Promise<CustomEntity>

Parameters#

NameType
idnumber
relations?string[]

Returns#

Promise<CustomEntity>

Inherited from#

BaseRepository.getById

Defined in#

system/core/backend/src/repositories/base.repository.ts:49


getBySlug#

â–¸ getBySlug(slug, relations?): Promise<CustomEntity>

Parameters#

NameType
slugstring
relations?string[]

Returns#

Promise<CustomEntity>

Inherited from#

BaseRepository.getBySlug

Defined in#

system/core/backend/src/repositories/base.repository.ts:60


getCustomEntities#

â–¸ getCustomEntities(params?): Promise<TPagedList<CustomEntity>>

Parameters#

NameType
params?TPagedParams<TCustomEntity>

Returns#

Promise<TPagedList<CustomEntity>>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:20


getCustomEntitiesByIds#

â–¸ getCustomEntitiesByIds(ids): Promise<CustomEntity[]>

Parameters#

NameType
idsnumber[]

Returns#

Promise<CustomEntity[]>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:30


getCustomEntityById#

â–¸ getCustomEntityById(id): Promise<undefined | CustomEntity>

Parameters#

NameType
idnumber

Returns#

Promise<undefined | CustomEntity>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:25


getCustomEntityBySlug#

â–¸ getCustomEntityBySlug(slug): Promise<undefined | CustomEntity>

Parameters#

NameType
slugstring

Returns#

Promise<undefined | CustomEntity>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:35


getEntityViews#

â–¸ getEntityViews(entityId, entityType): Promise<any>

Parameters#

NameType
entityIdnumber
entityTypeEDBEntity

Returns#

Promise<any>

Inherited from#

BaseRepository.getEntityViews

Defined in#

system/core/backend/src/repositories/base.repository.ts:144


getFilteredCustomEntities#

â–¸ getFilteredCustomEntities(pagedParams?, filterParams?): Promise<TPagedList<TCustomEntity>>

Parameters#

NameType
pagedParams?PagedParamsInput<CustomEntity>
filterParams?CustomEntityFilterInput

Returns#

Promise<TPagedList<TCustomEntity>>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:100


getFilteredEntities#

â–¸ getFilteredEntities(pagedParams?, filterParams?): Promise<TPagedList<CustomEntity>>

Parameters#

NameType
pagedParams?PagedParamsInput<CustomEntity>
filterParams?BaseFilterInput

Returns#

Promise<TPagedList<CustomEntity>>

Inherited from#

BaseRepository.getFilteredEntities

Defined in#

system/core/backend/src/repositories/base.repository.ts:164


getPaged#

â–¸ getPaged(params?): Promise<TPagedList<CustomEntity>>

Parameters#

NameType
params?TPagedParams<CustomEntity>

Returns#

Promise<TPagedList<CustomEntity>>

Inherited from#

BaseRepository.getPaged

Defined in#

system/core/backend/src/repositories/base.repository.ts:38


getSqlBoolStr#

â–¸ getSqlBoolStr(b): "true" | "false" | "1" | "0"

Parameters#

NameType
bboolean

Returns#

"true" | "false" | "1" | "0"

Inherited from#

BaseRepository.getSqlBoolStr

Defined in#

system/core/backend/src/repositories/base.repository.ts:34


getSqlLike#

â–¸ getSqlLike(): "ILIKE" | "LIKE"

Returns#

"ILIKE" | "LIKE"

Inherited from#

BaseRepository.getSqlLike

Defined in#

system/core/backend/src/repositories/base.repository.ts:35


quote#

â–¸ quote(str): string

Parameters#

NameType
strstring

Returns#

string

Inherited from#

BaseRepository.quote

Defined in#

system/core/backend/src/repositories/base.repository.ts:36


updateCustomEntity#

â–¸ updateCustomEntity(id, inputData): Promise<CustomEntity>

Parameters#

NameType
idnumber
inputDataTCustomEntityInput

Returns#

Promise<CustomEntity>

Defined in#

system/core/backend/src/repositories/custom-entity.repository.ts:61


updateEntity#

â–¸ updateEntity(id, input): Promise<CustomEntity>

Parameters#

NameType
idnumber
inputCustomEntity

Returns#

Promise<CustomEntity>

Inherited from#

BaseRepository.updateEntity

Defined in#

system/core/backend/src/repositories/base.repository.ts:82