Skip to main content
Version: 4.4

Interface: ChainableInterface<T>#

knex.Knex.ChainableInterface

Type parameters#

NameDefault
Tany

Hierarchy#

Properties#

[Symbol.toStringTag]#

Readonly [Symbol.toStringTag]: string

Inherited from: StringTagSupport.[Symbol.toStringTag]

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

Methods#

asCallback#

asCallback(callback: Function): Promise<T>

Parameters:#

NameType
callbackFunction

Returns: Promise<T>

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


catch#

catch<TResult>(onrejected?: null | (reason: any) => TResult | PromiseLike<TResult>): Promise<T | 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<T | TResult>

A Promise for the completion of the callback.

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


connection#

connection(connection: any): ChainableInterface<T>

Parameters:#

NameType
connectionany

Returns: ChainableInterface<T>

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


debug#

debug(enabled: boolean): ChainableInterface<T>

Parameters:#

NameType
enabledboolean

Returns: ChainableInterface<T>

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


finally#

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

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

A Promise for the completion of the callback.

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


options#

options(options: Readonly<{ [key: string]: any; }>): ChainableInterface<T>

Parameters:#

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

Returns: ChainableInterface<T>

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

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


stream#

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

Parameters:#

NameType
handler(readable: PassThrough) => any

Returns: Promise<any>

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>

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

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


then#

then<TResult1, TResult2>(onfulfilled?: null | (value: T) => 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
TResult1T
TResult2never

Parameters:#

NameTypeDescription
onfulfilled?null | (value: T) => 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.

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


toQuery#

toQuery(): string

Returns: string

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


transacting#

transacting(trx: Transaction<any, any>): ChainableInterface<T>

Parameters:#

NameType
trxTransaction<any, any>

Returns: ChainableInterface<T>

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

Last updated on by Martin Adámek