Skip to main content

Class: ProductCategoryRepository

backend.ProductCategoryRepository

Hierarchy#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

• new ProductCategoryRepository()

Overrides#

TreeRepository<ProductCategory\>.constructor

Defined in#

system/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 in#

system/core/backend/src/repositories/product-category.repository.ts:49

Methods#

applyBaseFilter#

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

Parameters#

NameType
qbSelectQueryBuilder<TBasePageEntity>
filter?BaseFilterInput

Returns#

SelectQueryBuilder<TBasePageEntity>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:218


applyCategoryFilter#

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

Parameters#

NameType
qbSelectQueryBuilder<ProductCategory>
filterParams?ProductCategoryFilterInput

Returns#

void

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:225


applyGetEntityViews#

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

Parameters#

NameType
qbSelectQueryBuilder<TBasePageEntity>
entityTypeEDBEntity

Returns#

SelectQueryBuilder<TBasePageEntity>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:252


createProductCategory#

â–¸ createProductCategory(createProductCategory, id?): Promise<ProductCategory>

Parameters#

NameType
createProductCategoryCreateProductCategory
id?null | number

Returns#

Promise<ProductCategory>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:115


deleteManyCategories#

â–¸ deleteManyCategories(input, filterParams?): Promise<boolean>

Parameters#

NameType
inputTDeleteManyInput
filterParams?ProductCategoryFilterInput

Returns#

Promise<boolean>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:152


deleteProductCategory#

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

Parameters#

NameType
idnumber

Returns#

Promise<boolean>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:135


getCategoriesOfProduct#

â–¸ getCategoriesOfProduct(productId, params?): Promise<TProductCategory[]>

Parameters#

NameType
productIdnumber
params?TPagedParams<TProductCategory>

Returns#

Promise<TProductCategory[]>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:178


getChildCategories#

â–¸ getChildCategories(category): Promise<ProductCategory[]>

Parameters#

NameType
categoryProductCategory

Returns#

Promise<ProductCategory[]>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:188


getEntityViews#

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

Parameters#

NameType
entityIdnumber
entityTypeEDBEntity

Returns#

Promise<any>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:256


getFilteredCategories#

â–¸ getFilteredCategories(pagedParams?, filterParams?): Promise<TPagedList<TProductCategory>>

Parameters#

NameType
pagedParams?PagedParamsInput<ProductCategory>
filterParams?ProductCategoryFilterInput

Returns#

Promise<TPagedList<TProductCategory>>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:244


getNestedLevel#

â–¸ getNestedLevel(category): Promise<number>

Parameters#

NameType
categoryProductCategory

Returns#

Promise<number>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:260


getParentCategory#

â–¸ getParentCategory(category): Promise<undefined | null | ProductCategory>

Parameters#

NameType
categoryProductCategory

Returns#

Promise<undefined | null | ProductCategory>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:193


getProductCategories#

â–¸ getProductCategories(params): Promise<TPagedList<TProductCategory>>

Parameters#

NameType
paramsTPagedParams<TProductCategory>

Returns#

Promise<TPagedList<TProductCategory>>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:61


getProductCategoriesById#

â–¸ getProductCategoriesById(ids): Promise<ProductCategory[]>

Parameters#

NameType
idsnumber[]

Returns#

Promise<ProductCategory[]>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:68


getProductCategoryById#

â–¸ getProductCategoryById(id): Promise<ProductCategory>

Parameters#

NameType
idnumber

Returns#

Promise<ProductCategory>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:73


getProductCategoryBySlug#

â–¸ getProductCategoryBySlug(slug): Promise<ProductCategory>

Parameters#

NameType
slugstring

Returns#

Promise<ProductCategory>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:82


getRootCategories#

â–¸ getRootCategories(): Promise<TPagedList<ProductCategory>>

Returns#

Promise<TPagedList<ProductCategory>>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:198


getSqlBoolStr#

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

Parameters#

NameType
bboolean

Returns#

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

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:57


getSqlLike#

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

Returns#

"ILIKE" | "LIKE"

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:58


handleProductCategoryInput#

â–¸ handleProductCategoryInput(productCategory, input, action): Promise<void>

Parameters#

NameType
productCategoryProductCategory
inputTProductCategoryInput
action"update" | "create"

Returns#

Promise<void>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:91


quote#

â–¸ quote(str): string

Parameters#

NameType
strstring

Returns#

string

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:59


updateProductCategory#

â–¸ updateProductCategory(id, updateProductCategory): Promise<ProductCategory>

Parameters#

NameType
idnumber
updateProductCategoryUpdateProductCategory

Returns#

Promise<ProductCategory>

Defined in#

system/core/backend/src/repositories/product-category.repository.ts:125