Skip to main content
Version: 4.4

Class: QueryBuilder<TRecord, TResult>#

knex.Knex.QueryBuilder

Type parameters#

NameTypeDefault
TRecord{}any
TResult-any

Hierarchy#

Constructors#

constructor#

+ new QueryBuilder<TRecord, TResult>(): QueryBuilder<TRecord, TResult>

Type parameters:#

NameTypeDefault
TRecord{}any
TResult-any

Returns: QueryBuilder<TRecord, TResult>

Properties#

[Symbol.toStringTag]#

Readonly [Symbol.toStringTag]: string

Inherited from: ChainableInterface.[Symbol.toStringTag]

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


and#

and: QueryBuilder<TRecord, TResult>

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


andHaving#

andHaving: Having<TRecord, TResult>

Inherited from: QueryInterface.andHaving

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


andWhere#

andWhere: Where<TRecord, TResult>

Inherited from: QueryInterface.andWhere

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


andWhereBetween#

andWhereBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.andWhereBetween

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


andWhereNot#

andWhereNot: Where<TRecord, TResult>

Inherited from: QueryInterface.andWhereNot

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


andWhereNotBetween#

andWhereNotBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.andWhereNotBetween

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


andWhereRaw#

andWhereRaw: WhereRaw<TRecord, TResult>

Inherited from: QueryInterface.andWhereRaw

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


as#

as: As<TRecord, TResult>

Inherited from: QueryInterface.as

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


avg#

avg: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.avg

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


avgDistinct#

avgDistinct: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.avgDistinct

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


client#

client: Client

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


column#

column: Select<TRecord, TResult>

Inherited from: QueryInterface.column

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


columns#

columns: Select<TRecord, TResult>

Inherited from: QueryInterface.columns

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


count#

count: AsymmetricAggregation<TRecord, TResult, string | number>

Inherited from: QueryInterface.count

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


countDistinct#

countDistinct: AsymmetricAggregation<TRecord, TResult, string | number>

Inherited from: QueryInterface.countDistinct

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


crossJoin#

crossJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.crossJoin

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


distinct#

distinct: Distinct<TRecord, TResult>

Inherited from: QueryInterface.distinct

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


distinctOn#

distinctOn: DistinctOn<TRecord, TResult>

Inherited from: QueryInterface.distinctOn

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


first#

first: Select<TRecord, AddUnionMember<UnwrapArrayMember<TResult>, undefined>>

Inherited from: QueryInterface.first

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


from#

from: Table<TRecord, TResult>

Inherited from: QueryInterface.from

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


fullOuterJoin#

fullOuterJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.fullOuterJoin

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


groupBy#

groupBy: GroupBy<TRecord, TResult>

Inherited from: QueryInterface.groupBy

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


groupByRaw#

groupByRaw: RawQueryBuilder<TRecord, TResult>

Inherited from: QueryInterface.groupByRaw

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


having#

having: Having<TRecord, TResult>

Inherited from: QueryInterface.having

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


havingBetween#

havingBetween: HavingRange<TRecord, TResult>

Inherited from: QueryInterface.havingBetween

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


havingIn#

havingIn: HavingRange<TRecord, TResult>

Inherited from: QueryInterface.havingIn

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


havingNotBetween#

havingNotBetween: HavingRange<TRecord, TResult>

Inherited from: QueryInterface.havingNotBetween

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


havingRaw#

havingRaw: RawQueryBuilder<TRecord, TResult>

Inherited from: QueryInterface.havingRaw

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


havingWrapped#

havingWrapped: WhereWrapped<TRecord, TResult>

Inherited from: QueryInterface.havingWrapped

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


innerJoin#

innerJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.innerJoin

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


intersect#

intersect: Intersect<TRecord, TResult>

Inherited from: QueryInterface.intersect

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


into#

into: Table<TRecord, TResult>

Inherited from: QueryInterface.into

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


join#

join: Join<TRecord, TResult>

Inherited from: QueryInterface.join

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


joinRaw#

joinRaw: JoinRaw<TRecord, TResult>

Inherited from: QueryInterface.joinRaw

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


leftJoin#

leftJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.leftJoin

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


leftOuterJoin#

leftOuterJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.leftOuterJoin

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


max#

max: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.max

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


min#

min: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.min

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


not#

not: QueryBuilder<TRecord, TResult>

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


or#

or: QueryBuilder<TRecord, TResult>

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


orHaving#

orHaving: Having<TRecord, TResult>

Inherited from: QueryInterface.orHaving

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


orHavingBetween#

orHavingBetween: HavingRange<TRecord, TResult>

Inherited from: QueryInterface.orHavingBetween

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


orHavingNotBetween#

orHavingNotBetween: HavingRange<TRecord, TResult>

Inherited from: QueryInterface.orHavingNotBetween

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


orHavingRaw#

orHavingRaw: RawQueryBuilder<TRecord, TResult>

Inherited from: QueryInterface.orHavingRaw

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


orWhere#

orWhere: Where<TRecord, TResult>

Inherited from: QueryInterface.orWhere

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


orWhereBetween#

orWhereBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.orWhereBetween

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


orWhereExists#

orWhereExists: WhereExists<TRecord, TResult>

Inherited from: QueryInterface.orWhereExists

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


orWhereIn#

orWhereIn: WhereIn<TRecord, TResult>

Inherited from: QueryInterface.orWhereIn

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


orWhereNot#

orWhereNot: Where<TRecord, TResult>

Inherited from: QueryInterface.orWhereNot

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


orWhereNotBetween#

orWhereNotBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.orWhereNotBetween

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


orWhereNotExists#

orWhereNotExists: WhereExists<TRecord, TResult>

Inherited from: QueryInterface.orWhereNotExists

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


orWhereNotIn#

orWhereNotIn: WhereIn<TRecord, TResult>

Inherited from: QueryInterface.orWhereNotIn

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


orWhereNotNull#

orWhereNotNull: WhereNull<TRecord, TResult>

Inherited from: QueryInterface.orWhereNotNull

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


orWhereNull#

orWhereNull: WhereNull<TRecord, TResult>

Inherited from: QueryInterface.orWhereNull

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


orWhereRaw#

orWhereRaw: WhereRaw<TRecord, TResult>

Inherited from: QueryInterface.orWhereRaw

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


orderBy#

orderBy: OrderBy<TRecord, TResult>

Inherited from: QueryInterface.orderBy

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


orderByRaw#

orderByRaw: RawQueryBuilder<TRecord, TResult>

Inherited from: QueryInterface.orderByRaw

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


outerJoin#

outerJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.outerJoin

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


rightJoin#

rightJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.rightJoin

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


rightOuterJoin#

rightOuterJoin: Join<TRecord, TResult>

Inherited from: QueryInterface.rightOuterJoin

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


select#

select: Select<TRecord, TResult>

Inherited from: QueryInterface.select

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


sum#

sum: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.sum

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


sumDistinct#

sumDistinct: TypePreservingAggregation<TRecord, TResult, any>

Inherited from: QueryInterface.sumDistinct

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


table#

table: Table<TRecord, TResult>

Inherited from: QueryInterface.table

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


union#

union: Union<TRecord, TResult>

Inherited from: QueryInterface.union

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


unionAll#

unionAll: Union<TRecord, TResult>

Inherited from: QueryInterface.unionAll

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


where#

where: Where<TRecord, TResult>

Inherited from: QueryInterface.where

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


whereBetween#

whereBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.whereBetween

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


whereExists#

whereExists: WhereExists<TRecord, TResult>

Inherited from: QueryInterface.whereExists

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


whereIn#

whereIn: WhereIn<TRecord, TResult>

Inherited from: QueryInterface.whereIn

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


whereNot#

whereNot: Where<TRecord, TResult>

Inherited from: QueryInterface.whereNot

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


whereNotBetween#

whereNotBetween: WhereBetween<TRecord, TResult>

Inherited from: QueryInterface.whereNotBetween

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


whereNotExists#

whereNotExists: WhereExists<TRecord, TResult>

Inherited from: QueryInterface.whereNotExists

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


whereNotIn#

whereNotIn: WhereIn<TRecord, TResult>

Inherited from: QueryInterface.whereNotIn

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


whereNotNull#

whereNotNull: WhereNull<TRecord, TResult>

Inherited from: QueryInterface.whereNotNull

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


whereNull#

whereNull: WhereNull<TRecord, TResult>

Inherited from: QueryInterface.whereNull

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


whereRaw#

whereRaw: WhereRaw<TRecord, TResult>

Inherited from: QueryInterface.whereRaw

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


whereWrapped#

whereWrapped: WhereWrapped<TRecord, TResult>

Inherited from: QueryInterface.whereWrapped

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


with#

with: With<TRecord, TResult>

Inherited from: QueryInterface.with

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


withRaw#

withRaw: WithRaw<TRecord, TResult>

Inherited from: QueryInterface.withRaw

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


withRecursive#

withRecursive: With<TRecord, TResult>

Inherited from: QueryInterface.withRecursive

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


withSchema#

withSchema: WithSchema<TRecord, TResult>

Inherited from: QueryInterface.withSchema

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


withWrapped#

withWrapped: WithWrapped<TRecord, TResult>

Inherited from: QueryInterface.withWrapped

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

Methods#

asCallback#

asCallback(callback: Function): Promise<Resolve<TResult>>

Parameters:#

NameType
callbackFunction

Returns: Promise<Resolve<TResult>>

Inherited from: ChainableInterface

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


catch#

catch<TResult>(onrejected?: null | (reason: any) => TResult | PromiseLike<TResult>): Promise<Resolve<TResult> | TResult>

Attaches a callback for only the rejection of the Promise.

Type parameters:#

NameDefault
TResultnever

Parameters:#

NameTypeDescription
onrejected?null | (reason: any) => TResult | PromiseLike<TResult>The callback to execute when the Promise is rejected.

Returns: Promise<Resolve<TResult> | TResult>

A Promise for the completion of the callback.

Inherited from: ChainableInterface

Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:1448


clear#

clear(statement: ClearStatements): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
statementClearStatements

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clearCounters#

clearCounters(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clearGroup#

clearGroup(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clearHaving#

clearHaving(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clearOrder#

clearOrder(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clearSelect#

clearSelect(): QueryBuilder<TRecord, UnwrapArrayMember<TResult> extends DeferredKeySelection<TBase, TKeys, true, any, any, any, any> ? DeferredKeySelection<TBase, never, false, {}, false, {}, never>[] : TResult>

Returns: QueryBuilder<TRecord, UnwrapArrayMember<TResult> extends DeferredKeySelection<TBase, TKeys, true, any, any, any, any> ? DeferredKeySelection<TBase, never, false, {}, false, {}, never>[] : TResult>

Inherited from: QueryInterface

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


clearWhere#

clearWhere(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


clone#

clone(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


columnInfo#

columnInfo(column?: keyof TRecord): Promise<ColumnInfo>

Parameters:#

NameType
column?keyof TRecord

Returns: Promise<ColumnInfo>

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


connection#

connection(connection: any): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
connectionany

Returns: QueryBuilder<TRecord, TResult>

Inherited from: ChainableInterface

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


debug#

debug(enabled: boolean): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
enabledboolean

Returns: QueryBuilder<TRecord, TResult>

Inherited from: ChainableInterface

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


decrement#

decrement(columnName: keyof TRecord, amount?: number): QueryBuilder<TRecord, number>

Parameters:#

NameType
columnNamekeyof TRecord
amount?number

Returns: QueryBuilder<TRecord, number>

Inherited from: QueryInterface

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

decrement(columnName: string, amount?: number): QueryBuilder<TRecord, number>

Parameters:#

NameType
columnNamestring
amount?number

Returns: QueryBuilder<TRecord, number>

Inherited from: QueryInterface

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


del#

del(returning: **, options?: DMLOptions): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
returning***
options?DMLOptions

Returns: QueryBuilder<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never>[]>

Inherited from: QueryInterface

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

del<TKey, TResult2>(returning: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, true\>[]

Parameters:#

NameType
returningTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

del<TKey, TResult2>(returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2[]>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, {}\>[]

Parameters:#

NameType
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2[]>

Inherited from: QueryInterface

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

del<TResult2>(returning: string | readonly string[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2Partial<AnyOrUnknownToOther<TRecord, {}\>\>[]

Parameters:#

NameType
returningstring | readonly string[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

del<TResult2>(): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2number

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


delete#

delete(returning: **, options?: DMLOptions): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
returning***
options?DMLOptions

Returns: QueryBuilder<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never>[]>

Inherited from: QueryInterface

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

delete<TKey, TResult2>(returning: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, true\>[]

Parameters:#

NameType
returningTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

delete<TKey, TResult2>(returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, {}\>[]

Parameters:#

NameType
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

delete<TResult2>(returning: string | readonly string[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2any

Parameters:#

NameType
returningstring | readonly string[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

delete<TResult2>(): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2number

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


finally#

finally(onfinally?: null | () => void): Promise<Resolve<TResult>>

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

Parameters:#

NameTypeDescription
onfinally?null | () => voidThe callback to execute when the Promise is settled (fulfilled or rejected).

Returns: Promise<Resolve<TResult>>

A Promise for the completion of the callback.

Inherited from: ChainableInterface

Defined in: docs/node_modules/typescript/lib/lib.es2018.promise.d.ts:31


forShare#

forShare(...tableNames: string[]): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
...tableNamesstring[]

Returns: QueryBuilder<TRecord, TResult>

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

forShare(tableNames: readonly string[]): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
tableNamesreadonly string[]

Returns: QueryBuilder<TRecord, TResult>

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


forUpdate#

forUpdate(...tableNames: string[]): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
...tableNamesstring[]

Returns: QueryBuilder<TRecord, TResult>

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

forUpdate(tableNames: readonly string[]): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
tableNamesreadonly string[]

Returns: QueryBuilder<TRecord, TResult>

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


increment#

increment(columnName: keyof TRecord, amount?: number): QueryBuilder<TRecord, number>

Parameters:#

NameType
columnNamekeyof TRecord
amount?number

Returns: QueryBuilder<TRecord, number>

Inherited from: QueryInterface

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

increment(columnName: string, amount?: number): QueryBuilder<TRecord, number>

Parameters:#

NameType
columnNamestring
amount?number

Returns: QueryBuilder<TRecord, number>

Inherited from: QueryInterface

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


insert#

insert(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[], returning: **, options?: DMLOptions): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]
returning***
options?DMLOptions

Returns: QueryBuilder<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never>[]>

Inherited from: QueryInterface

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

insert<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[], returning: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, true\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]
returningTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

insert<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[], returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, {}\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

insert<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[], returning: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, true\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]
returningTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

insert<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[], returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, true\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

insert<TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2number[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, insert> | readonly ResolveTableType<TRecord, insert>[] : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[] | readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[])[]

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


limit#

limit(limit: number): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
limitnumber

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


modify#

modify<TRecord2, TResult2>(callback: QueryCallbackWithArgs<TRecord, any>, ...args: any[]): QueryBuilder<TRecord2, TResult2>

Type parameters:#

NameTypeDefault
TRecord2{}any
TResult2{}any

Parameters:#

NameType
callbackQueryCallbackWithArgs<TRecord, any>
...argsany[]

Returns: QueryBuilder<TRecord2, TResult2>

Inherited from: QueryInterface

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


noWait#

noWait(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


offset#

offset(offset: number): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
offsetnumber

Returns: QueryBuilder<TRecord, TResult>

Inherited from: QueryInterface

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


on#

on(event: string, callback: Function): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
eventstring
callbackFunction

Returns: QueryBuilder<TRecord, TResult>

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


onConflict#

onConflict<TKey, TResult2>(column: TKey): OnConflictQueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, true\>[]

Parameters:#

NameType
columnTKey

Returns: OnConflictQueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

onConflict<TKey, TResult2>(columns: readonly TKey[]): OnConflictQueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, {}\>, false\>[]

Parameters:#

NameType
columnsreadonly TKey[]

Returns: OnConflictQueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


options#

options(options: Readonly<{ [key: string]: any; }>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
optionsReadonly<{ [key: string]: any; }>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: ChainableInterface

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


pipe#

pipe<T>(writable: T, options?: Readonly<{ [key: string]: any; }>): PassThrough

Type parameters:#

NameType
TWritableStream<T>

Parameters:#

NameType
writableT
options?Readonly<{ [key: string]: any; }>

Returns: PassThrough

Inherited from: ChainableInterface

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


pluck#

pluck<K>(column: K): QueryBuilder<TRecord, TRecord[K][]>

Type parameters:#

NameType
Kstring | number | symbol

Parameters:#

NameType
columnK

Returns: QueryBuilder<TRecord, TRecord[K][]>

Inherited from: QueryInterface

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

pluck<TResult2>(column: string): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameType
TResult2{}

Parameters:#

NameType
columnstring

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


queryContext#

queryContext(context: any): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
contextany

Returns: QueryBuilder<TRecord, TResult>

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

queryContext(): any

Returns: any

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


returning#

returning(column: **, options?: DMLOptions): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
column***
options?DMLOptions

Returns: QueryBuilder<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never>[]>

Inherited from: QueryInterface

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

returning<TKey, TResult2>(column: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, true\>[]

Parameters:#

NameType
columnTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

returning<TKey, TResult2>(columns: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, {}\>, false\>[]

Parameters:#

NameType
columnsreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

returning<TResult2>(column: string | readonly string[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2Partial<AnyOrUnknownToOther<TRecord, {}\>\>[]

Parameters:#

NameType
columnstring | readonly string[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


skipLocked#

skipLocked(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


stream#

stream(handler: (readable: PassThrough) => any): Promise<any>

Parameters:#

NameType
handler(readable: PassThrough) => any

Returns: Promise<any>

Inherited from: ChainableInterface

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

stream(options: Readonly<{ [key: string]: any; }>, handler: (readable: PassThrough) => any): Promise<any>

Parameters:#

NameType
optionsReadonly<{ [key: string]: any; }>
handler(readable: PassThrough) => any

Returns: Promise<any>

Inherited from: ChainableInterface

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

stream(options?: Readonly<{ [key: string]: any; }>): PassThrough

Parameters:#

NameType
options?Readonly<{ [key: string]: any; }>

Returns: PassThrough

Inherited from: ChainableInterface

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


then#

then<TResult1, TResult2>(onfulfilled?: null | (value: Resolve<TResult>) => TResult1 | PromiseLike<TResult1>, onrejected?: null | (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>

Attaches callbacks for the resolution and/or rejection of the Promise.

Type parameters:#

NameDefault
TResult1Resolve<TResult\>
TResult2never

Parameters:#

NameTypeDescription
onfulfilled?null | (value: Resolve<TResult>) => TResult1 | PromiseLike<TResult1>The callback to execute when the Promise is resolved.
onrejected?null | (reason: any) => TResult2 | PromiseLike<TResult2>The callback to execute when the Promise is rejected.

Returns: Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited from: ChainableInterface

Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:1441


timeout#

timeout(ms: number, options?: { cancel?: undefined | boolean }): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
msnumber
options?{ cancel?: undefined | boolean }

Returns: QueryBuilder<TRecord, TResult>

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


toQuery#

toQuery(): string

Returns: string

Inherited from: ChainableInterface

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


toSQL#

toSQL(): Sql

Returns: Sql

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


transacting#

transacting(trx: Transaction<any, any>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
trxTransaction<any, any>

Returns: QueryBuilder<TRecord, TResult>

Inherited from: ChainableInterface

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


truncate#

truncate(): QueryBuilder<TRecord, void>

Returns: QueryBuilder<TRecord, void>

Inherited from: QueryInterface

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


update#

update<K1, K2, TResult2>(columnName: K1, value: Readonly<ResolveTableType<TRecord, update>[K1]> | Readonly<Raw<ResolveTableType<TRecord, update>[K1]>>, returning: K2, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
K1string-
K2string-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, K2\>, true\>[]

Parameters:#

NameType
columnNameK1
valueReadonly<ResolveTableType<TRecord, update>[K1]> | Readonly<Raw<ResolveTableType<TRecord, update>[K1]>>
returningK2
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<K1, K2, TResult2>(columnName: K1, value: Readonly<ResolveTableType<TRecord, update>[K1]> | Readonly<Raw<ResolveTableType<TRecord, update>[K1]>>, returning: readonly K2[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
K1string-
K2string-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, K2\>, {}\>[]

Parameters:#

NameType
columnNameK1
valueReadonly<ResolveTableType<TRecord, update>[K1]> | Readonly<Raw<ResolveTableType<TRecord, update>[K1]>>
returningreadonly K2[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<K>(columnName: K, value: Readonly<TRecord[K]> | Readonly<Raw<TRecord[K]>>): QueryBuilder<TRecord, number>

Type parameters:#

NameType
Kstring | number | symbol

Parameters:#

NameType
columnNameK
valueReadonly<TRecord[K]> | Readonly<Raw<TRecord[K]>>

Returns: QueryBuilder<TRecord, number>

Inherited from: QueryInterface

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

update<TResult2>(columnName: string, value: Value, returning: string | readonly string[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2Partial<AnyOrUnknownToOther<TRecord, {}\>\>[]

Parameters:#

NameType
columnNamestring
valueValue
returningstring | readonly string[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update(data: Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[], returning: **, options?: DMLOptions): [QueryBuilder](/docs/api/classes/knex.knex.querybuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
dataReadonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]
returning***
options?DMLOptions

Returns: QueryBuilder<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never>[]>

Inherited from: QueryInterface

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

update<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[], returning: TKey, options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-SetSingle<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, true\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]
returningTKey
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[], returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2-AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, ResolveTableType<TRecord, base\>\>, TKey\>, {}\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[], returning: TKey | readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystringstring
TResult2{}[]AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, {}\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]
returningTKey | readonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<TKey, TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[], returning: readonly TKey[], options?: DMLOptions): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameTypeDefault
TKeystring-
TResult2{}[]AddAliases<AddKey<SetBase<UnwrapArrayMember<TResult\>, TRecord\>, TKey\>, {}\>[]

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]
returningreadonly TKey[]
options?DMLOptions

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<TResult2>(data: TRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2number

Parameters:#

NameType
dataTRecord extends CompositeTableType<unknown, unknown, Partial<unknown>> ? ResolveTableType<TRecord, update> : Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord>, {}>>>[]

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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

update<TResult2>(columnName: string, value: Value): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2number

Parameters:#

NameType
columnNamestring
valueValue

Returns: QueryBuilder<TRecord, TResult2>

Inherited from: QueryInterface

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


extend#

Staticextend(methodName: string, fn: <TRecord, TResult>(...args: any[]) => QueryBuilder<TRecord, TResult>): void

Parameters:#

NameType
methodNamestring
fn<TRecord, TResult>(...args: any[]) => QueryBuilder<TRecord, TResult>

Returns: void

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

Last updated on by renovate[bot]