Skip to main content

Class: OrderRepository

backend.OrderRepository

Hierarchy#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

• new OrderRepository()

Overrides#

BaseRepository.constructor

Defined in#

system/core/backend/src/repositories/order.repository.ts:22

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


applyDeleteMany#

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

Parameters#

NameType
qbSelectQueryBuilder<Order> | DeleteQueryBuilder<Order>
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


applyOrderFilter#

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

Parameters#

NameType
qbSelectQueryBuilder<TOrder>
filterParams?OrderFilterInput

Returns#

void

Defined in#

system/core/backend/src/repositories/order.repository.ts:106


createEntity#

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

Parameters#

NameType
inputOrder
id?null | number

Returns#

Promise<Order>

Inherited from#

BaseRepository.createEntity

Defined in#

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


createOrder#

â–¸ createOrder(inputData, id?): Promise<Order>

Parameters#

NameType
inputDataTOrderInput
id?null | number

Returns#

Promise<Order>

Defined in#

system/core/backend/src/repositories/order.repository.ts:75


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


deleteManyFilteredOrders#

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

Parameters#

NameType
inputTDeleteManyInput
filterParams?OrderFilterInput

Returns#

Promise<undefined | boolean>

Defined in#

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


deleteOrder#

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

Parameters#

NameType
idnumber

Returns#

Promise<boolean>

Defined in#

system/core/backend/src/repositories/order.repository.ts:94


getAll#

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

Returns#

Promise<Order[]>

Inherited from#

BaseRepository.getAll

Defined in#

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


getById#

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

Parameters#

NameType
idnumber
relations?string[]

Returns#

Promise<Order>

Inherited from#

BaseRepository.getById

Defined in#

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


getBySlug#

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

Parameters#

NameType
slugstring
relations?string[]

Returns#

Promise<Order>

Inherited from#

BaseRepository.getBySlug

Defined in#

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


getCouponsOfOrder#

â–¸ getCouponsOfOrder(id): Promise<undefined | null | Coupon[]>

Parameters#

NameType
idnumber

Returns#

Promise<undefined | null | Coupon[]>

Defined in#

system/core/backend/src/repositories/order.repository.ts:186


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


getFilteredEntities#

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

Parameters#

NameType
pagedParams?PagedParamsInput<Order>
filterParams?BaseFilterInput

Returns#

Promise<TPagedList<Order>>

Inherited from#

BaseRepository.getFilteredEntities

Defined in#

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


getFilteredOrders#

â–¸ getFilteredOrders(pagedParams?, filterParams?): Promise<TPagedList<TOrder>>

Parameters#

NameType
pagedParams?PagedParamsInput<TOrder>
filterParams?OrderFilterInput

Returns#

Promise<TPagedList<TOrder>>

Defined in#

system/core/backend/src/repositories/order.repository.ts:156


getOrderById#

â–¸ getOrderById(id): Promise<undefined | Order>

Parameters#

NameType
idnumber

Returns#

Promise<undefined | Order>

Defined in#

system/core/backend/src/repositories/order.repository.ts:31


getOrderBySlug#

â–¸ getOrderBySlug(slug): Promise<undefined | Order>

Parameters#

NameType
slugstring

Returns#

Promise<undefined | Order>

Defined in#

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


getOrders#

â–¸ getOrders(params?): Promise<TPagedList<Order>>

Parameters#

NameType
params?TPagedParams<TOrder>

Returns#

Promise<TPagedList<Order>>

Defined in#

system/core/backend/src/repositories/order.repository.ts:26


getOrdersOfUser#

â–¸ getOrdersOfUser(userId, pagedParams?): Promise<TPagedList<TOrder>>

Parameters#

NameType
userIdnumber
pagedParams?PagedParamsInput<TOrder>

Returns#

Promise<TPagedList<TOrder>>

Defined in#

system/core/backend/src/repositories/order.repository.ts:177


getPaged#

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

Parameters#

NameType
params?TPagedParams<Order>

Returns#

Promise<TPagedList<Order>>

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


updateEntity#

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

Parameters#

NameType
idnumber
inputOrder

Returns#

Promise<Order>

Inherited from#

BaseRepository.updateEntity

Defined in#

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


updateOrder#

â–¸ updateOrder(id, inputData): Promise<undefined | Order>

Parameters#

NameType
idnumber
inputDataTOrderInput

Returns#

Promise<undefined | Order>

Defined in#

system/core/backend/src/repositories/order.repository.ts:85