Class: ProductCategoryRepository
backend.ProductCategoryRepository
#
HierarchyTreeRepository
<ProductCategory
>↳
ProductCategoryRepository
#
Table of contents#
Constructors#
Properties#
Methods- applyBaseFilter
- applyCategoryFilter
- applyGetEntityViews
- createProductCategory
- deleteManyCategories
- deleteProductCategory
- getCategoriesOfProduct
- getChildCategories
- getEntityViews
- getFilteredCategories
- getNestedLevel
- getParentCategory
- getProductCategories
- getProductCategoriesById
- getProductCategoryById
- getProductCategoryBySlug
- getRootCategories
- getSqlBoolStr
- getSqlLike
- handleProductCategoryInput
- quote
- updateProductCategory
#
Constructors#
constructor• new ProductCategoryRepository()
#
OverridesTreeRepository<ProductCategory\>.constructor
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:51
#
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"
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:49
#
Methods#
applyBaseFilterâ–¸ applyBaseFilter(qb
, filter?
): SelectQueryBuilder
<TBasePageEntity
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TBasePageEntity > |
filter? | BaseFilterInput |
#
ReturnsSelectQueryBuilder
<TBasePageEntity
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:218
#
applyCategoryFilterâ–¸ applyCategoryFilter(qb
, filterParams?
): void
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <ProductCategory > |
filterParams? | ProductCategoryFilterInput |
#
Returnsvoid
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:225
#
applyGetEntityViewsâ–¸ applyGetEntityViews(qb
, entityType
): SelectQueryBuilder
<TBasePageEntity
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TBasePageEntity > |
entityType | EDBEntity |
#
ReturnsSelectQueryBuilder
<TBasePageEntity
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:252
#
createProductCategoryâ–¸ createProductCategory(createProductCategory
, id?
): Promise
<ProductCategory
>
#
ParametersName | Type |
---|---|
createProductCategory | CreateProductCategory |
id? | null | number |
#
ReturnsPromise
<ProductCategory
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:115
#
deleteManyCategoriesâ–¸ deleteManyCategories(input
, filterParams?
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
filterParams? | ProductCategoryFilterInput |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:152
#
deleteProductCategoryâ–¸ deleteProductCategory(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:135
#
getCategoriesOfProductâ–¸ getCategoriesOfProduct(productId
, params?
): Promise
<TProductCategory
[]>
#
ParametersName | Type |
---|---|
productId | number |
params? | TPagedParams <TProductCategory > |
#
ReturnsPromise
<TProductCategory
[]>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:178
#
getChildCategoriesâ–¸ getChildCategories(category
): Promise
<ProductCategory
[]>
#
ParametersName | Type |
---|---|
category | ProductCategory |
#
ReturnsPromise
<ProductCategory
[]>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:188
#
getEntityViewsâ–¸ getEntityViews(entityId
, entityType
): Promise
<any
>
#
ParametersName | Type |
---|---|
entityId | number |
entityType | EDBEntity |
#
ReturnsPromise
<any
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:256
#
getFilteredCategoriesâ–¸ getFilteredCategories(pagedParams?
, filterParams?
): Promise
<TPagedList
<TProductCategory
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <ProductCategory > |
filterParams? | ProductCategoryFilterInput |
#
ReturnsPromise
<TPagedList
<TProductCategory
>>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:244
#
getNestedLevelâ–¸ getNestedLevel(category
): Promise
<number
>
#
ParametersName | Type |
---|---|
category | ProductCategory |
#
ReturnsPromise
<number
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:260
#
getParentCategoryâ–¸ getParentCategory(category
): Promise
<undefined
| null
| ProductCategory
>
#
ParametersName | Type |
---|---|
category | ProductCategory |
#
ReturnsPromise
<undefined
| null
| ProductCategory
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:193
#
getProductCategoriesâ–¸ getProductCategories(params
): Promise
<TPagedList
<TProductCategory
>>
#
ParametersName | Type |
---|---|
params | TPagedParams <TProductCategory > |
#
ReturnsPromise
<TPagedList
<TProductCategory
>>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:61
#
getProductCategoriesByIdâ–¸ getProductCategoriesById(ids
): Promise
<ProductCategory
[]>
#
ParametersName | Type |
---|---|
ids | number [] |
#
ReturnsPromise
<ProductCategory
[]>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:68
#
getProductCategoryByIdâ–¸ getProductCategoryById(id
): Promise
<ProductCategory
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<ProductCategory
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:73
#
getProductCategoryBySlugâ–¸ getProductCategoryBySlug(slug
): Promise
<ProductCategory
>
#
ParametersName | Type |
---|---|
slug | string |
#
ReturnsPromise
<ProductCategory
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:82
#
getRootCategoriesâ–¸ getRootCategories(): Promise
<TPagedList
<ProductCategory
>>
#
ReturnsPromise
<TPagedList
<ProductCategory
>>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:198
#
getSqlBoolStrâ–¸ getSqlBoolStr(b
): "true"
| "false"
| "1"
| "0"
#
ParametersName | Type |
---|---|
b | boolean |
#
Returns"true"
| "false"
| "1"
| "0"
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:57
#
getSqlLikeâ–¸ getSqlLike(): "ILIKE"
| "LIKE"
#
Returns"ILIKE"
| "LIKE"
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:58
#
handleProductCategoryInputâ–¸ handleProductCategoryInput(productCategory
, input
, action
): Promise
<void
>
#
ParametersName | Type |
---|---|
productCategory | ProductCategory |
input | TProductCategoryInput |
action | "update" | "create" |
#
ReturnsPromise
<void
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:91
#
quoteâ–¸ quote(str
): string
#
ParametersName | Type |
---|---|
str | string |
#
Returnsstring
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:59
#
updateProductCategoryâ–¸ updateProductCategory(id
, updateProductCategory
): Promise
<ProductCategory
>
#
ParametersName | Type |
---|---|
id | number |
updateProductCategory | UpdateProductCategory |
#
ReturnsPromise
<ProductCategory
>
#
Defined insystem/core/backend/src/repositories/product-category.repository.ts:125