Skip to main content
Version: 4.5

Interface: TypePreservingAggregation<TRecord, TResult, TValue>#

knex.Knex.TypePreservingAggregation

Type parameters#

NameDefault
TRecordany
TResultunknown[]
TValueany

Callable#

TypePreservingAggregation<TKey, TResult2>(...columnNames: readonly TKey[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring | number | symbol-
TResult2-ArrayIfAlready<TResult, UnwrapArrayMember<TResult> extends DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps, TUnionProps> ? true extends THasSelect ? DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps & Dict<ResolveTableType<TRecord, base>[TKey]>, TUnionProps> : DeferredKeySelection<{}, never, true, {}, false, Dict<ResolveTableType<TRecord, base>[TKey]>, never> : Dict<ResolveTableType<TRecord, base>[TKey]>>

Parameters:#

NameType
...columnNamesreadonly TKey[]

Returns: QueryBuilder<TRecord, TResult2>

Defined in: node_modules/knex/types/index.d.ts:1343

TypePreservingAggregation<TAliases, TResult2>(aliases: TAliases): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TAliasesobjectReadonly<Record<string, string | string[] | Raw<any>>>
TResult2-ArrayIfAlready<TResult, UnwrapArrayMember<TResult> extends DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps, TUnionProps> ? true extends THasSelect ? DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps & { [K in string | number | symbol]?: K extends keyof TRecord ? TRecord[K] : TValue}, TUnionProps> : DeferredKeySelection<{}, never, true, {}, false, { [K in string | number | symbol]?: K extends keyof TRecord ? TRecord[K] : TValue}, never> : { [K in string | number | symbol]?: K extends keyof TRecord ? TRecord[K] : TValue}>

Parameters:#

NameType
aliasesTAliases

Returns: QueryBuilder<TRecord, TResult2>

Defined in: node_modules/knex/types/index.d.ts:1349

TypePreservingAggregation<TResult2>(...columnNames: readonly (string | Raw<any> | Readonly<Record<string, string | readonly string[] | Raw<any>>>)[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2ArrayIfAlready<TResult, UnwrapArrayMember<TResult> extends DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps, TUnionProps> ? true extends THasSelect ? DeferredKeySelection<TBase, TKeys, THasSelect, TAliasMapping, TSingle, TIntersectProps & Dict<TValue>, TUnionProps> : DeferredKeySelection<{}, never, true, {}, false, Dict<TValue>, never> : Dict<TValue>>

Parameters:#

NameType
...columnNamesreadonly (string | Raw<any> | Readonly<Record<string, string | readonly string[] | Raw<any>>>)[]

Returns: QueryBuilder<TRecord, TResult2>

Defined in: node_modules/knex/types/index.d.ts:1359

Last updated on by Renovate Bot