Skip to main content
Version: 4.4

Interface: GroupBy<TRecord, TResult>#

knex.Knex.GroupBy

Type parameters#

NameDefault
TRecordany
TResultunknown[]

Hierarchy#

Callable#

GroupBy<TResult2>(sql: string, bindings?: null | string | number | boolean | Date | Buffer | string[] | number[] | Date[] | boolean[] | Raw<any> | ValueDict | QueryBuilder<any, any> | readonly RawBinding[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2TResult

Parameters:#

NameType
sqlstring
bindings?null | string | number | boolean | Date | Buffer | string[] | number[] | Date[] | boolean[] | Raw<any> | ValueDict | QueryBuilder<any, any> | readonly RawBinding[]

Returns: QueryBuilder<TRecord, TResult2>

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

GroupBy<TResult2>(raw: Raw<TResult2>): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2TResult

Parameters:#

NameType
rawRaw<TResult2>

Returns: QueryBuilder<TRecord, TResult2>

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

GroupBy(columnName: **): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, ArrayIfAlready<TResult, DeferredKeySelection<TRecord, string, false, {}, false, {}, never*>>>

Parameters:#

NameType
columnName***

Returns: QueryBuilder<TRecord, ArrayIfAlready<TResult, DeferredKeySelection<TRecord, string, false, {}, false, {}, never>>>

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

GroupBy<ColNameUT, TResult2>(...columnNames: readonly ColNameUT[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
ColNameUTstring | number | symbol-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, ColNameUT & string\>, {}\>[]

Parameters:#

NameType
...columnNamesreadonly ColNameUT[]

Returns: QueryBuilder<TRecord, TResult2>

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

GroupBy<ColNameUT, TResult2>(columnNames: readonly ColNameUT[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
ColNameUTstring | number | symbol-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, ColNameUT & string\>, {}\>[]

Parameters:#

NameType
columnNamesreadonly ColNameUT[]

Returns: QueryBuilder<TRecord, TResult2>

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

GroupBy<TResult2>(...columnNames: readonly ColumnDescriptor<TRecord, TResult>[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, Partial<AnyOrUnknownToOther<TRecord, {}\>\>\>, keyof TRecord & string\>, {}\>[]

Parameters:#

NameType
...columnNamesreadonly ColumnDescriptor<TRecord, TResult>[]

Returns: QueryBuilder<TRecord, TResult2>

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

GroupBy<TResult2>(columnNames: readonly ColumnDescriptor<TRecord, TResult>[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, Partial<AnyOrUnknownToOther<TRecord, {}\>\>\>, keyof TRecord & string\>, {}\>[]

Parameters:#

NameType
columnNamesreadonly ColumnDescriptor<TRecord, TResult>[]

Returns: QueryBuilder<TRecord, TResult2>

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

Last updated on by renovate[bot]