Skip to main content
Version: 4.4

Interface: BatchInsertBuilder<TRecord, TResult>#

knex.Knex.BatchInsertBuilder

Type parameters#

NameTypeDefault
TRecord{}any
TResult-number[]

Hierarchy#

  • Promise<ResolveResult<TResult>>

    BatchInsertBuilder

Properties#

[Symbol.toStringTag]#

Readonly [Symbol.toStringTag]: string

Defined in: docs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:174

Methods#

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.

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


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.

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


returning#

returning(column: **): [BatchInsertBuilder](/docs/api/interfaces/knex.knex.batchinsertbuilder)<TRecord, DeferredKeySelection<TRecord, never, false, {}, false, {}, never*>[]>

Parameters:#

NameType
column***

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

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

returning<TKey, TResult2>(column: TKey): BatchInsertBuilder<TRecord, TResult2>

Type parameters:#

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

Parameters:#

NameType
columnTKey

Returns: BatchInsertBuilder<TRecord, TResult2>

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

returning<TKey, TResult2>(columns: readonly TKey[]): BatchInsertBuilder<TRecord, TResult2>

Type parameters:#

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

Parameters:#

NameType
columnsreadonly TKey[]

Returns: BatchInsertBuilder<TRecord, TResult2>

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

returning<TResult2>(column: unknown extends TRecord ? string | readonly string[] : never): BatchInsertBuilder<TRecord, TResult2>

Type parameters:#

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

Parameters:#

NameType
columnunknown extends TRecord ? string | readonly string[] : never

Returns: BatchInsertBuilder<TRecord, TResult2>

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


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.

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


transacting#

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

Parameters:#

NameType
trxTransaction<any, any>

Returns: BatchInsertBuilder<TRecord, TResult>

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

Last updated on by renovate[bot]