Class: OrderRepository
backend.OrderRepository
#
Hierarchy↳
OrderRepository
#
Table of contents#
Constructors#
Properties#
Methods- applyBaseFilter
- applyDeleteMany
- applyGetEntityViews
- applyOrderFilter
- createEntity
- createOrder
- deleteEntity
- deleteMany
- deleteManyFilteredOrders
- deleteOrder
- getAll
- getById
- getBySlug
- getCouponsOfOrder
- getEntityViews
- getFilteredEntities
- getFilteredOrders
- getOrderById
- getOrderBySlug
- getOrders
- getOrdersOfUser
- getPaged
- getSqlBoolStr
- getSqlLike
- quote
- updateEntity
- updateOrder
#
Constructors#
constructor• new OrderRepository()
#
Overrides#
Defined insystem/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#
Defined insystem/core/backend/src/repositories/base.repository.ts:24
#
Methods#
applyBaseFilterâ–¸ applyBaseFilter<EntityType
>(qb
, filter?
): SelectQueryBuilder
<EntityType
>
#
Type parametersName | Type |
---|---|
EntityType | TBasePageEntity |
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <EntityType > |
filter? | BaseFilterInput |
#
ReturnsSelectQueryBuilder
<EntityType
>
#
Inherited fromBaseRepository.applyBaseFilter
#
Defined insystem/core/backend/src/repositories/base.repository.ts:155
#
applyDeleteManyâ–¸ applyDeleteMany(qb
, input
): Promise
<void
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <Order > | DeleteQueryBuilder <Order > |
input | TDeleteManyInput |
#
ReturnsPromise
<void
>
#
Inherited fromBaseRepository.applyDeleteMany
#
Defined insystem/core/backend/src/repositories/base.repository.ts:108
#
applyGetEntityViewsâ–¸ applyGetEntityViews(qb
, entityType
): SelectQueryBuilder
<TBasePageEntity
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TBasePageEntity > |
entityType | EDBEntity |
#
ReturnsSelectQueryBuilder
<TBasePageEntity
>
#
Inherited fromBaseRepository.applyGetEntityViews
#
Defined insystem/core/backend/src/repositories/base.repository.ts:133
#
applyOrderFilterâ–¸ applyOrderFilter(qb
, filterParams?
): void
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TOrder > |
filterParams? | OrderFilterInput |
#
Returnsvoid
#
Defined insystem/core/backend/src/repositories/order.repository.ts:106
#
createEntityâ–¸ createEntity(input
, id?
): Promise
<Order
>
#
ParametersName | Type |
---|---|
input | Order |
id? | null | number |
#
ReturnsPromise
<Order
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:70
#
createOrderâ–¸ createOrder(inputData
, id?
): Promise
<Order
>
#
ParametersName | Type |
---|---|
inputData | TOrderInput |
id? | null | number |
#
ReturnsPromise
<Order
>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:75
#
deleteEntityâ–¸ deleteEntity(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:97
#
deleteManyâ–¸ deleteMany(input
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:125
#
deleteManyFilteredOrdersâ–¸ deleteManyFilteredOrders(input
, filterParams?
): Promise
<undefined
| boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
filterParams? | OrderFilterInput |
#
ReturnsPromise
<undefined
| boolean
>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:164
#
deleteOrderâ–¸ deleteOrder(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:94
#
getAllâ–¸ getAll(): Promise
<Order
[]>
#
ReturnsPromise
<Order
[]>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:44
#
getByIdâ–¸ getById(id
, relations?
): Promise
<Order
>
#
ParametersName | Type |
---|---|
id | number |
relations? | string [] |
#
ReturnsPromise
<Order
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:49
#
getBySlugâ–¸ getBySlug(slug
, relations?
): Promise
<Order
>
#
ParametersName | Type |
---|---|
slug | string |
relations? | string [] |
#
ReturnsPromise
<Order
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:60
#
getCouponsOfOrderâ–¸ getCouponsOfOrder(id
): Promise
<undefined
| null
| Coupon
[]>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<undefined
| null
| Coupon
[]>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:186
#
getEntityViewsâ–¸ getEntityViews(entityId
, entityType
): Promise
<any
>
#
ParametersName | Type |
---|---|
entityId | number |
entityType | EDBEntity |
#
ReturnsPromise
<any
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:144
#
getFilteredEntitiesâ–¸ getFilteredEntities(pagedParams?
, filterParams?
): Promise
<TPagedList
<Order
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <Order > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<Order
>>
#
Inherited fromBaseRepository.getFilteredEntities
#
Defined insystem/core/backend/src/repositories/base.repository.ts:164
#
getFilteredOrdersâ–¸ getFilteredOrders(pagedParams?
, filterParams?
): Promise
<TPagedList
<TOrder
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <TOrder > |
filterParams? | OrderFilterInput |
#
ReturnsPromise
<TPagedList
<TOrder
>>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:156
#
getOrderByIdâ–¸ getOrderById(id
): Promise
<undefined
| Order
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<undefined
| Order
>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:31
#
getOrderBySlugâ–¸ getOrderBySlug(slug
): Promise
<undefined
| Order
>
#
ParametersName | Type |
---|---|
slug | string |
#
ReturnsPromise
<undefined
| Order
>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:36
#
getOrdersâ–¸ getOrders(params?
): Promise
<TPagedList
<Order
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <TOrder > |
#
ReturnsPromise
<TPagedList
<Order
>>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:26
#
getOrdersOfUserâ–¸ getOrdersOfUser(userId
, pagedParams?
): Promise
<TPagedList
<TOrder
>>
#
ParametersName | Type |
---|---|
userId | number |
pagedParams? | PagedParamsInput <TOrder > |
#
ReturnsPromise
<TPagedList
<TOrder
>>
#
Defined insystem/core/backend/src/repositories/order.repository.ts:177
#
getPagedâ–¸ getPaged(params?
): Promise
<TPagedList
<Order
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <Order > |
#
ReturnsPromise
<TPagedList
<Order
>>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:38
#
getSqlBoolStrâ–¸ getSqlBoolStr(b
): "true"
| "false"
| "1"
| "0"
#
ParametersName | Type |
---|---|
b | boolean |
#
Returns"true"
| "false"
| "1"
| "0"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:34
#
getSqlLikeâ–¸ getSqlLike(): "ILIKE"
| "LIKE"
#
Returns"ILIKE"
| "LIKE"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:35
#
quoteâ–¸ quote(str
): string
#
ParametersName | Type |
---|---|
str | string |
#
Returnsstring
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:36
#
updateEntityâ–¸ updateEntity(id
, input
): Promise
<Order
>
#
ParametersName | Type |
---|---|
id | number |
input | Order |
#
ReturnsPromise
<Order
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:82
#
updateOrderâ–¸ updateOrder(id
, inputData
): Promise
<undefined
| Order
>
#
ParametersName | Type |
---|---|
id | number |
inputData | TOrderInput |
#
ReturnsPromise
<undefined
| Order
>