Skip to main content
Version: 4.4

Interface: Transaction<TRecord, TResult>#

knex.Knex.Transaction

Type parameters#

NameTypeDefault
TRecord{}any
TResult-any

Hierarchy#

  • Knex<TRecord, TResult>

    Transaction

Callable#

Transaction<TTable>(tableName: TTable, options?: PgTableOptions): QueryBuilder<TableType<TTable>, DeferredKeySelection<ResolveTableType<TableType<TTable>, base>, never, false, {}, false, {}, never>[]>

Type parameters:#

NameType
TTablenever

Parameters:#

NameType
tableNameTTable
options?PgTableOptions

Returns: QueryBuilder<TableType<TTable>, DeferredKeySelection<ResolveTableType<TableType<TTable>, base>, never, false, {}, false, {}, never>[]>

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

Transaction<TRecord2, TResult2>(tableName?: string | Raw<any> | QueryBuilder<any, any> | AliasDict, options?: PgTableOptions): QueryBuilder<TRecord2, TResult2>

Type parameters:#

NameDefault
TRecord2TRecord
TResult2DeferredKeySelection<TRecord2, never, false, {}, false, {}, never\>[]

Parameters:#

NameType
tableName?string | Raw<any> | QueryBuilder<any, any> | AliasDict
options?PgTableOptions

Returns: QueryBuilder<TRecord2, TResult2>

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

Properties#

VERSION#

VERSION: string

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


__knex__#

__knex__: string

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


andHaving#

andHaving: Having<TRecord, TResult>

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


andWhere#

andWhere: Where<TRecord, TResult>

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


andWhereBetween#

andWhereBetween: WhereBetween<TRecord, TResult>

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


andWhereNot#

andWhereNot: Where<TRecord, TResult>

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


andWhereNotBetween#

andWhereNotBetween: WhereBetween<TRecord, TResult>

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


andWhereRaw#

andWhereRaw: WhereRaw<TRecord, TResult>

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


as#

as: As<TRecord, TResult>

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


avg#

avg: TypePreservingAggregation<TRecord, TResult, any>

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


avgDistinct#

avgDistinct: TypePreservingAggregation<TRecord, TResult, any>

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


client#

client: any

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


column#

column: Select<TRecord, TResult>

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


columns#

columns: Select<TRecord, TResult>

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


count#

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

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


countDistinct#

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

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


crossJoin#

crossJoin: Join<TRecord, TResult>

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


distinct#

distinct: Distinct<TRecord, TResult>

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


distinctOn#

distinctOn: DistinctOn<TRecord, TResult>

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


executionPromise#

executionPromise: Promise<TResult>

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


first#

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

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


fn#

fn: FunctionHelper

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


from#

from: Table<TRecord, TResult>

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


fullOuterJoin#

fullOuterJoin: Join<TRecord, TResult>

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


groupBy#

groupBy: GroupBy<TRecord, TResult>

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


groupByRaw#

groupByRaw: RawQueryBuilder<TRecord, TResult>

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


having#

having: Having<TRecord, TResult>

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


havingBetween#

havingBetween: HavingRange<TRecord, TResult>

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


havingIn#

havingIn: HavingRange<TRecord, TResult>

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


havingNotBetween#

havingNotBetween: HavingRange<TRecord, TResult>

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


havingRaw#

havingRaw: RawQueryBuilder<TRecord, TResult>

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


havingWrapped#

havingWrapped: WhereWrapped<TRecord, TResult>

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


innerJoin#

innerJoin: Join<TRecord, TResult>

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


intersect#

intersect: Intersect<TRecord, TResult>

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


into#

into: Table<TRecord, TResult>

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


isCompleted#

isCompleted: () => boolean

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


join#

join: Join<TRecord, TResult>

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


joinRaw#

joinRaw: JoinRaw<TRecord, TResult>

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


leftJoin#

leftJoin: Join<TRecord, TResult>

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


leftOuterJoin#

leftOuterJoin: Join<TRecord, TResult>

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


max#

max: TypePreservingAggregation<TRecord, TResult, any>

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


migrate#

migrate: Migrator

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


min#

min: TypePreservingAggregation<TRecord, TResult, any>

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


orHaving#

orHaving: Having<TRecord, TResult>

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


orHavingBetween#

orHavingBetween: HavingRange<TRecord, TResult>

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


orHavingNotBetween#

orHavingNotBetween: HavingRange<TRecord, TResult>

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


orHavingRaw#

orHavingRaw: RawQueryBuilder<TRecord, TResult>

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


orWhere#

orWhere: Where<TRecord, TResult>

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


orWhereBetween#

orWhereBetween: WhereBetween<TRecord, TResult>

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


orWhereExists#

orWhereExists: WhereExists<TRecord, TResult>

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


orWhereIn#

orWhereIn: WhereIn<TRecord, TResult>

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


orWhereNot#

orWhereNot: Where<TRecord, TResult>

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


orWhereNotBetween#

orWhereNotBetween: WhereBetween<TRecord, TResult>

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


orWhereNotExists#

orWhereNotExists: WhereExists<TRecord, TResult>

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


orWhereNotIn#

orWhereNotIn: WhereIn<TRecord, TResult>

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


orWhereNotNull#

orWhereNotNull: WhereNull<TRecord, TResult>

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


orWhereNull#

orWhereNull: WhereNull<TRecord, TResult>

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


orWhereRaw#

orWhereRaw: WhereRaw<TRecord, TResult>

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


orderBy#

orderBy: OrderBy<TRecord, TResult>

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


orderByRaw#

orderByRaw: RawQueryBuilder<TRecord, TResult>

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


outerJoin#

outerJoin: Join<TRecord, TResult>

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


raw#

raw: RawBuilder<TRecord, any>

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


ref#

ref: RefBuilder

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


rightJoin#

rightJoin: Join<TRecord, TResult>

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


rightOuterJoin#

rightOuterJoin: Join<TRecord, TResult>

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


schema#

schema: SchemaBuilder

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


seed#

seed: Seeder

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


select#

select: Select<TRecord, TResult>

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


sum#

sum: TypePreservingAggregation<TRecord, TResult, any>

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


sumDistinct#

sumDistinct: TypePreservingAggregation<TRecord, TResult, any>

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


table#

table: Table<TRecord, TResult>

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


union#

union: Union<TRecord, TResult>

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


unionAll#

unionAll: Union<TRecord, TResult>

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


userParams#

userParams: Record<string, any>

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


where#

where: Where<TRecord, TResult>

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


whereBetween#

whereBetween: WhereBetween<TRecord, TResult>

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


whereExists#

whereExists: WhereExists<TRecord, TResult>

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


whereIn#

whereIn: WhereIn<TRecord, TResult>

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


whereNot#

whereNot: Where<TRecord, TResult>

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


whereNotBetween#

whereNotBetween: WhereBetween<TRecord, TResult>

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


whereNotExists#

whereNotExists: WhereExists<TRecord, TResult>

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


whereNotIn#

whereNotIn: WhereIn<TRecord, TResult>

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


whereNotNull#

whereNotNull: WhereNull<TRecord, TResult>

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


whereNull#

whereNull: WhereNull<TRecord, TResult>

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


whereRaw#

whereRaw: WhereRaw<TRecord, TResult>

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


whereWrapped#

whereWrapped: WhereWrapped<TRecord, TResult>

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


with#

with: With<TRecord, TResult>

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


withRaw#

withRaw: WithRaw<TRecord, TResult>

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


withRecursive#

withRecursive: With<TRecord, TResult>

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


withSchema#

withSchema: WithSchema<TRecord, TResult>

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


withWrapped#

withWrapped: WithWrapped<TRecord, TResult>

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

Methods#

addListener#

addListener(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:57


batchInsert#

batchInsert<TRecord2, TResult2>(tableName: TableDescriptor, data: TRecord2 extends CompositeTableType<unknown, unknown, Partial<unknown>> ? readonly ResolveTableType<TRecord2, insert>[] : readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord2>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord2>, {}>>>[])[], chunkSize?: number): BatchInsertBuilder<TRecord2, TResult2>

Type parameters:#

NameDefault
TRecord2TRecord
TResult2number[]

Parameters:#

NameType
tableNameTableDescriptor
dataTRecord2 extends CompositeTableType<unknown, unknown, Partial<unknown>> ? readonly ResolveTableType<TRecord2, insert>[] : readonly (Readonly<Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord2>, {}>>>> | readonly Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<TRecord2>, {}>>>[])[]
chunkSize?number

Returns: BatchInsertBuilder<TRecord2, TResult2>

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


clear#

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

Parameters:#

NameType
statementClearStatements

Returns: QueryBuilder<TRecord, TResult>

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


clearCounters#

clearCounters(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


clearGroup#

clearGroup(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


clearHaving#

clearHaving(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


clearOrder#

clearOrder(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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>

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


clearWhere#

clearWhere(): QueryBuilder<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

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


commit#

commit(value?: any): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
value?any

Returns: QueryBuilder<TRecord, TResult>

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


decrement#

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

Parameters:#

NameType
columnNamekeyof TRecord
amount?number

Returns: QueryBuilder<TRecord, number>

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>

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>[]>

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>

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[]>

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>

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

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

Type parameters:#

NameDefault
TResult2number

Returns: QueryBuilder<TRecord, TResult2>

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>[]>

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>

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>

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>

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

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

Type parameters:#

NameDefault
TResult2number

Returns: QueryBuilder<TRecord, TResult2>

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


destroy#

destroy(callback: Function): void

Parameters:#

NameType
callbackFunction

Returns: void

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

destroy(): Promise<void>

Returns: Promise<void>

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


emit#

emit(event: string | symbol, ...args: any[]): boolean

Parameters:#

NameType
eventstring | symbol
...argsany[]

Returns: boolean

Defined in: node_modules/@types/node/events.d.ts:67


eventNames#

eventNames(): (string | symbol)[]

Returns: (string | symbol)[]

Defined in: node_modules/@types/node/events.d.ts:72


getMaxListeners#

getMaxListeners(): number

Returns: number

Defined in: node_modules/@types/node/events.d.ts:64


increment#

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

Parameters:#

NameType
columnNamekeyof TRecord
amount?number

Returns: QueryBuilder<TRecord, number>

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>

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


initialize#

initialize(config?: Config<any>): void

Parameters:#

NameType
config?Config<any>

Returns: void

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


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>[]>

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>

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>

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>

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>

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>

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


limit#

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

Parameters:#

NameType
limitnumber

Returns: QueryBuilder<TRecord, TResult>

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


listenerCount#

listenerCount(event: string | symbol): number

Parameters:#

NameType
eventstring | symbol

Returns: number

Defined in: node_modules/@types/node/events.d.ts:68


listeners#

listeners(event: string | symbol): Function[]

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Defined in: node_modules/@types/node/events.d.ts:65


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>

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


off#

off(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:61


offset#

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

Parameters:#

NameType
offsetnumber

Returns: QueryBuilder<TRecord, TResult>

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


on#

on(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:58


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>

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>

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


once#

once(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:59


pluck#

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

Type parameters:#

NameType
Kstring | number | symbol

Parameters:#

NameType
columnK

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

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>

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


prependListener#

prependListener(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:70


prependOnceListener#

prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:71


query#

query<TRecord, TResult>(conn: any, sql: any, status: any, value: any): QueryBuilder<TRecord, TResult>

Type parameters:#

NameTypeDefault
TRecord{}any
TResult-void

Parameters:#

NameType
connany
sqlany
statusany
valueany

Returns: QueryBuilder<TRecord, TResult>

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


queryBuilder#

queryBuilder<TRecord2, TResult2>(): QueryBuilder<TRecord2, TResult2>

Type parameters:#

NameDefault
TRecord2TRecord
TResult2TResult

Returns: QueryBuilder<TRecord2, TResult2>

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


rawListeners#

rawListeners(event: string | symbol): Function[]

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Defined in: node_modules/@types/node/events.d.ts:66


removeAllListeners#

removeAllListeners(event?: string | symbol): Transaction<TRecord, TResult>

Parameters:#

NameType
event?string | symbol

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:62


removeListener#

removeListener(event: string | symbol, listener: (...args: any[]) => void): Transaction<TRecord, TResult>

Parameters:#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:60


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>[]>

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>

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>

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>

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


rollback#

rollback(error?: any): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
error?any

Returns: QueryBuilder<TRecord, TResult>

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


savepoint#

savepoint<T>(transactionScope: (trx: Transaction<any, any>) => any): Promise<T>

Type parameters:#

NameDefault
Tany

Parameters:#

NameType
transactionScope(trx: Transaction<any, any>) => any

Returns: Promise<T>

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


setMaxListeners#

setMaxListeners(n: number): Transaction<TRecord, TResult>

Parameters:#

NameType
nnumber

Returns: Transaction<TRecord, TResult>

Defined in: node_modules/@types/node/events.d.ts:63


transaction#

transaction(transactionScope?: null, config?: any): Promise<Transaction<any, any>>

Parameters:#

NameType
transactionScope?null
config?any

Returns: Promise<Transaction<any, any>>

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

transaction<T>(transactionScope: (trx: Transaction<any, any>) => void | Promise<T>, config?: any): Promise<T>

Type parameters:#

Name
T

Parameters:#

NameType
transactionScope(trx: Transaction<any, any>) => void | Promise<T>
config?any

Returns: Promise<T>

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


transactionProvider#

transactionProvider(config?: any): function

Parameters:#

NameType
config?any

Returns: function

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


truncate#

truncate(): QueryBuilder<TRecord, void>

Returns: QueryBuilder<TRecord, void>

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>

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>

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>

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>

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>[]>

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>

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>

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>

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>

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>

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>

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


withUserParams#

withUserParams(params: Record<string, any>): Knex<any, unknown[]>

Parameters:#

NameType
paramsRecord<string, any>

Returns: Knex<any, unknown[]>

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

Last updated on by Martin Adámek