Class: ProductVariantRepository
backend.ProductVariantRepository
#
HierarchyBaseRepository
<ProductVariant
>↳
ProductVariantRepository
#
Table of contents#
Constructors#
Properties#
Methods- applyBaseFilter
- applyDeleteMany
- applyGetEntityViews
- applyProductVariantFilter
- createEntity
- createProductVariant
- deleteEntity
- deleteMany
- deleteManyFilteredProductVariants
- deleteProductVariant
- getAll
- getById
- getBySlug
- getEntityViews
- getFilteredEntities
- getFilteredProductVariants
- getPaged
- getProductVariant
- getProductVariants
- getSqlBoolStr
- getSqlLike
- handleProductVariantInput
- handleVariantsInputForProduct
- quote
- updateEntity
- updateProductVariant
#
Constructors#
constructor• new ProductVariantRepository()
#
Overrides#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:21
#
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 <ProductVariant > | DeleteQueryBuilder <ProductVariant > |
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
#
applyProductVariantFilterâ–¸ applyProductVariantFilter(qb
, filterParams?
): void
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TProductVariant > |
filterParams? | BaseFilterInput |
#
Returnsvoid
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:90
#
createEntityâ–¸ createEntity(input
, id?
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
input | ProductVariant |
id? | null | number |
#
ReturnsPromise
<ProductVariant
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:70
#
createProductVariantâ–¸ createProductVariant(createProductVariant
, id?
, product?
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
createProductVariant | TProductVariantInput |
id? | null | number |
product? | Product |
#
ReturnsPromise
<ProductVariant
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:59
#
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
#
deleteManyFilteredProductVariantsâ–¸ deleteManyFilteredProductVariants(input
, filterParams?
): Promise
<undefined
| boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<undefined
| boolean
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:102
#
deleteProductVariantâ–¸ deleteProductVariant(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:79
#
getAllâ–¸ getAll(): Promise
<ProductVariant
[]>
#
ReturnsPromise
<ProductVariant
[]>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:44
#
getByIdâ–¸ getById(id
, relations?
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
id | number |
relations? | string [] |
#
ReturnsPromise
<ProductVariant
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:49
#
getBySlugâ–¸ getBySlug(slug
, relations?
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
slug | string |
relations? | string [] |
#
ReturnsPromise
<ProductVariant
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:60
#
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
<ProductVariant
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <ProductVariant > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<ProductVariant
>>
#
Inherited fromBaseRepository.getFilteredEntities
#
Defined insystem/core/backend/src/repositories/base.repository.ts:164
#
getFilteredProductVariantsâ–¸ getFilteredProductVariants(pagedParams?
, filterParams?
): Promise
<TPagedList
<TProductVariant
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <TProductVariant > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<TProductVariant
>>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:94
#
getPagedâ–¸ getPaged(params?
): Promise
<TPagedList
<ProductVariant
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <ProductVariant > |
#
ReturnsPromise
<TPagedList
<ProductVariant
>>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:38
#
getProductVariantâ–¸ getProductVariant(id
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<ProductVariant
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:29
#
getProductVariantsâ–¸ getProductVariants(params
): Promise
<TPagedList
<TProductVariant
>>
#
ParametersName | Type |
---|---|
params | TPagedParams <TProductVariant > |
#
ReturnsPromise
<TPagedList
<TProductVariant
>>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:25
#
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
#
handleProductVariantInputâ–¸ handleProductVariantInput(productVariant
, input
, action
, product?
): Promise
<void
>
#
ParametersName | Type |
---|---|
productVariant | ProductVariant |
input | TProductVariantInput |
action | "update" | "create" |
product? | null | Product |
#
ReturnsPromise
<void
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:34
#
handleVariantsInputForProductâ–¸ handleVariantsInputForProduct(product
, variants
): Promise
<ProductVariant
[]>
#
ParametersName | Type |
---|---|
product | Product |
variants | TProductVariantInput [] |
#
ReturnsPromise
<ProductVariant
[]>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:115
#
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
<ProductVariant
>
#
ParametersName | Type |
---|---|
id | number |
input | ProductVariant |
#
ReturnsPromise
<ProductVariant
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:82
#
updateProductVariantâ–¸ updateProductVariant(id
, updateProductVariant
, product?
): Promise
<ProductVariant
>
#
ParametersName | Type |
---|---|
id | number |
updateProductVariant | TProductVariantInput |
product? | Product |
#
ReturnsPromise
<ProductVariant
>
#
Defined insystem/core/backend/src/repositories/product-variant.repository.ts:70