Skip to main content
Version: 4.4

Interface: Select<TRecord, TResult>#

knex.Knex.Select

Type parameters#

NameTypeDefault
TRecord{}any
TResult-unknown[]

Hierarchy#

Callable#

Select(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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

Select<TResult2, TInnerRecord, TInnerResult>(...subQueryBuilders: readonly QueryBuilder<TInnerRecord, TInnerResult>[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2ArrayIfAlready<TResult, any\>
TInnerRecordany
TInnerResultany

Parameters:#

NameType
...subQueryBuildersreadonly QueryBuilder<TInnerRecord, TInnerResult>[]

Returns: QueryBuilder<TRecord, TResult2>

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

Select<TResult2, TInnerRecord, TInnerResult>(subQueryBuilders: readonly QueryBuilder<TInnerRecord, TInnerResult>[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2ArrayIfAlready<TResult, any\>
TInnerRecordany
TInnerResultany

Parameters:#

NameType
subQueryBuildersreadonly QueryBuilder<TInnerRecord, TInnerResult>[]

Returns: QueryBuilder<TRecord, TResult2>

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

Select<AliasUT, TResult2>(...aliases: AliasUT): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
AliasUTInferrableColumnDescriptor<ResolveTableType<TRecord, base>>[]-
TResult2-ArrayIfAlready<TResult, AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, IncompatibleToAlt<ArrayMember<AliasUT\>, string, never\>\>, UnionToIntersection<IncompatibleToAlt<AliasUT extends I[] ? I extends Ref<any, TMapping\> ? TMapping : I : never, Dict<any\>, {}\>\>\>\>

Parameters:#

NameType
...aliasesAliasUT

Returns: QueryBuilder<TRecord, TResult2>

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

Select<AliasUT, TResult2>(aliases: AliasUT): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
AliasUTInferrableColumnDescriptor<ResolveTableType<TRecord, base>>[]-
TResult2-ArrayIfAlready<TResult, AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, IncompatibleToAlt<ArrayMember<AliasUT\>, string, never\>\>, UnionToIntersection<IncompatibleToAlt<AliasUT extends I[] ? I extends Ref<any, TMapping\> ? TMapping : I : never, Dict<any\>, {}\>\>\>\>

Parameters:#

NameType
aliasesAliasUT

Returns: QueryBuilder<TRecord, TResult2>

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

Select<AliasUT, TResult2>(...aliases: AliasUT): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
AliasUT(string | Dict<any>)[]-
TResult2-ArrayIfAlready<TResult, AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, IncompatibleToAlt<ArrayMember<AliasUT\>, string, never\>\>, UnionToIntersection<IncompatibleToAlt<AliasUT extends I[] ? I extends Ref<any, TMapping\> ? TMapping : I : never, Dict<any\>, {}\>\>\>\>

Parameters:#

NameType
...aliasesAliasUT

Returns: QueryBuilder<TRecord, TResult2>

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

Select<AliasUT, TResult2>(aliases: AliasUT): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
AliasUT(string | Dict<any>)[]-
TResult2-ArrayIfAlready<TResult, AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, IncompatibleToAlt<ArrayMember<AliasUT\>, string, never\>\>, UnionToIntersection<IncompatibleToAlt<AliasUT extends I[] ? I extends Ref<any, TMapping\> ? TMapping : I : never, Dict<any\>, {}\>\>\>\>

Parameters:#

NameType
aliasesAliasUT

Returns: QueryBuilder<TRecord, TResult2>

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

Select(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

Select<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

Select<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

Select<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

Select<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 Martin Adámek