Class: AttributeRepository
backend.AttributeRepository
#
Hierarchy↳
AttributeRepository
#
Table of contents#
Constructors#
Properties#
Methods- addAttributeValueToProduct
- applyBaseFilter
- applyDeleteMany
- applyGetEntityViews
- createAttribute
- createEntity
- deleteAttribute
- deleteEntity
- deleteMany
- getAll
- getAttribute
- getAttributeByKey
- getAttributeInstancesOfProduct
- getAttributes
- getById
- getBySlug
- getEntityViews
- getFilteredEntities
- getPaged
- getSqlBoolStr
- getSqlLike
- handleAttributeInput
- quote
- updateAttribute
- updateEntity
#
Constructors#
constructor• new AttributeRepository()
#
Overrides#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:18
#
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#
addAttributeValueToProductâ–¸ addAttributeValueToProduct(product
, value
): Promise
<undefined
| AttributeToProduct
>
#
ParametersName | Type |
---|---|
product | Product |
value | AttributeValue |
#
ReturnsPromise
<undefined
| AttributeToProduct
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:48
#
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 <Attribute > | DeleteQueryBuilder <Attribute > |
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
#
createAttributeâ–¸ createAttribute(createAttribute
, id?
): Promise
<TAttribute
>
#
ParametersName | Type |
---|---|
createAttribute | TAttributeInput |
id? | null | number |
#
ReturnsPromise
<TAttribute
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:103
#
createEntityâ–¸ createEntity(input
, id?
): Promise
<Attribute
>
#
ParametersName | Type |
---|---|
input | Attribute |
id? | null | number |
#
ReturnsPromise
<Attribute
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:70
#
deleteAttributeâ–¸ deleteAttribute(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:124
#
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
#
getAllâ–¸ getAll(): Promise
<Attribute
[]>
#
ReturnsPromise
<Attribute
[]>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:44
#
getAttributeâ–¸ getAttribute(id
): Promise
<undefined
| Attribute
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<undefined
| Attribute
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:27
#
getAttributeByKeyâ–¸ getAttributeByKey(key
): Promise
<undefined
| Attribute
>
#
ParametersName | Type |
---|---|
key | string |
#
ReturnsPromise
<undefined
| Attribute
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:32
#
getAttributeInstancesOfProductâ–¸ getAttributeInstancesOfProduct(productId
): Promise
<undefined
| AttributeToProduct
[]>
#
ParametersName | Type |
---|---|
productId | number |
#
ReturnsPromise
<undefined
| AttributeToProduct
[]>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:40
#
getAttributesâ–¸ getAttributes(): Promise
<Attribute
[]>
#
ReturnsPromise
<Attribute
[]>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:22
#
getByIdâ–¸ getById(id
, relations?
): Promise
<Attribute
>
#
ParametersName | Type |
---|---|
id | number |
relations? | string [] |
#
ReturnsPromise
<Attribute
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:49
#
getBySlugâ–¸ getBySlug(slug
, relations?
): Promise
<Attribute
>
#
ParametersName | Type |
---|---|
slug | string |
relations? | string [] |
#
ReturnsPromise
<Attribute
>
#
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
<Attribute
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <Attribute > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<Attribute
>>
#
Inherited fromBaseRepository.getFilteredEntities
#
Defined insystem/core/backend/src/repositories/base.repository.ts:164
#
getPagedâ–¸ getPaged(params?
): Promise
<TPagedList
<Attribute
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <Attribute > |
#
ReturnsPromise
<TPagedList
<Attribute
>>
#
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
#
handleAttributeInputâ–¸ handleAttributeInput(attribute
, input
, action
): Promise
<void
>
#
ParametersName | Type |
---|---|
attribute | Attribute |
input | TAttributeInput |
action | "update" | "create" |
#
ReturnsPromise
<void
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:61
#
quoteâ–¸ quote(str
): string
#
ParametersName | Type |
---|---|
str | string |
#
Returnsstring
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:36
#
updateAttributeâ–¸ updateAttribute(id
, updateAttribute
): Promise
<Attribute
>
#
ParametersName | Type |
---|---|
id | number |
updateAttribute | TAttributeInput |
#
ReturnsPromise
<Attribute
>
#
Defined insystem/core/backend/src/repositories/attribute.repository.ts:113
#
updateEntityâ–¸ updateEntity(id
, input
): Promise
<Attribute
>
#
ParametersName | Type |
---|---|
id | number |
input | Attribute |
#
ReturnsPromise
<Attribute
>