Version: 4.3

Class: QueryHelper

Hierarchy

  • QueryHelper

Properties

SUPPORTED_OPERATORS

Static Readonly SUPPORTED_OPERATORS: string[] = ['>', '<', '<=', '>=', '!', '!=', ':in', ':nin', ':gt', ':gte', ':lt', ':lte', ':ne', ':not']

Defined in packages/core/src/utils/QueryHelper.ts:10

Methods

getActiveFilters

StaticgetActiveFilters(entityName: string, options: Dictionary<boolean | Dictionary> | string[] | boolean, filters: Dictionary<FilterDef<any>>): FilterDef<any>[]

Defined in packages/core/src/utils/QueryHelper.ts:144

Parameters:

NameType
entityNamestring
optionsDictionary<boolean | Dictionary> | string[] | boolean
filtersDictionary<FilterDef<any>>

Returns: FilterDef<any>[]


inlinePrimaryKeyObjects

StaticinlinePrimaryKeyObjects<T>(where: Dictionary, meta: EntityMetadata<T>, metadata: MetadataStorage, key?: string): boolean

Defined in packages/core/src/utils/QueryHelper.ts:44

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
whereDictionary
metaEntityMetadata<T>
metadataMetadataStorage
key?string

Returns: boolean


isFilterActive

StaticisFilterActive(entityName: string, filterName: string, filter: FilterDef<any>, options: Dictionary<boolean | Dictionary>): boolean

Defined in packages/core/src/utils/QueryHelper.ts:165

Parameters:

NameType
entityNamestring
filterNamestring
filterFilterDef<any>
optionsDictionary<boolean | Dictionary>

Returns: boolean


isSupportedOperator

Static PrivateisSupportedOperator(key: string): boolean

Defined in packages/core/src/utils/QueryHelper.ts:219

Parameters:

NameType
keystring

Returns: boolean


processCustomType

StaticprocessCustomType<T>(prop: EntityProperty<T>, cond: FilterQuery<T>, platform: Platform, key?: string, fromQuery?: boolean): FilterQuery<T>

Defined in packages/core/src/utils/QueryHelper.ts:177

Type parameters:

Name
T

Parameters:

NameType
propEntityProperty<T>
condFilterQuery<T>
platformPlatform
key?string
fromQuery?boolean

Returns: FilterQuery<T>


processEntity

Static PrivateprocessEntity(entity: AnyEntity, root?: boolean): any

Defined in packages/core/src/utils/QueryHelper.ts:197

Parameters:

NameType
entityAnyEntity
root?boolean

Returns: any


processExpression

Static PrivateprocessExpression<T>(expr: string, value: T): Dictionary<T>

Defined in packages/core/src/utils/QueryHelper.ts:207

Type parameters:

Name
T

Parameters:

NameType
exprstring
valueT

Returns: Dictionary<T>


processObjectParams

StaticprocessObjectParams(params?: Dictionary): any

Defined in packages/core/src/utils/QueryHelper.ts:36

Parameters:

NameTypeDefault value
paramsDictionary{}

Returns: any


processParams

StaticprocessParams(params: any, root?: boolean): any

Defined in packages/core/src/utils/QueryHelper.ts:12

Parameters:

NameType
paramsany
root?boolean

Returns: any


processWhere

StaticprocessWhere<T>(where: FilterQuery<T>, entityName: string, metadata: MetadataStorage, platform: Platform, convertCustomTypes?: boolean, root?: boolean): FilterQuery<T>

Defined in packages/core/src/utils/QueryHelper.ts:72

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameTypeDefault value
whereFilterQuery<T>-
entityNamestring-
metadataMetadataStorage-
platformPlatform-
convertCustomTypesbooleantrue
rootbooleantrue

Returns: FilterQuery<T>

Last updated on by Martin Adámek