Skip to main content
Version: 4.5

Interface: Ref<TSrc, TMapping>#

knex.Knex.Ref

Type parameters#

NameType
TSrcstring
TMappingobject

Hierarchy#

  • Raw<string>

    Ref

Properties#

[RefMemberTag]#

[RefMemberTag]: object

Type declaration:#

NameType
mappingTMapping
srcTSrc

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


[Symbol.toStringTag]#

Readonly [Symbol.toStringTag]: string

Inherited from: Raw.[Symbol.toStringTag]

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

Methods#

addListener#

addListener(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


as#

as<TAlias>(alias: TAlias): Ref<TSrc, { [K in string]: TSrc}>

Type parameters:#

NameType
TAliasstring

Parameters:#

NameType
aliasTAlias

Returns: Ref<TSrc, { [K in string]: TSrc}>

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


asCallback#

asCallback(callback: Function): Promise<string>

Parameters:#

NameType
callbackFunction

Returns: Promise<string>

Inherited from: Raw

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


catch#

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

A Promise for the completion of the callback.

Inherited from: Raw

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


connection#

connection(connection: any): Ref<TSrc, TMapping>

Parameters:#

NameType
connectionany

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


debug#

debug(enabled: boolean): Ref<TSrc, TMapping>

Parameters:#

NameType
enabledboolean

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


emit#

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

Parameters:#

NameType
eventstring | symbol
...argsany[]

Returns: boolean

Inherited from: Raw

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


eventNames#

eventNames(): (string | symbol)[]

Returns: (string | symbol)[]

Inherited from: Raw

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


finally#

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

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

A Promise for the completion of the callback.

Inherited from: Raw

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


getMaxListeners#

getMaxListeners(): number

Returns: number

Inherited from: Raw

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


listenerCount#

listenerCount(event: string | symbol): number

Parameters:#

NameType
eventstring | symbol

Returns: number

Inherited from: Raw

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


listeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: Raw

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


off#

off(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


on#

on(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


once#

once(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


options#

options(options: Readonly<{ [key: string]: any; }>): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


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: Raw

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


prependListener#

prependListener(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


prependOnceListener#

prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


queryContext#

queryContext(context: any): Raw<string>

Parameters:#

NameType
contextany

Returns: Raw<string>

Inherited from: Raw

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

queryContext(): any

Returns: any

Inherited from: Raw

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


rawListeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: Raw

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


removeAllListeners#

removeAllListeners(event?: string | symbol): Ref<TSrc, TMapping>

Parameters:#

NameType
event?string | symbol

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


removeListener#

removeListener(event: string | symbol, listener: (...args: any[]) => void): Ref<TSrc, TMapping>

Parameters:#

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

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


setMaxListeners#

setMaxListeners(n: number): Ref<TSrc, TMapping>

Parameters:#

NameType
nnumber

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


stream#

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

Parameters:#

NameType
handler(readable: PassThrough) => any

Returns: Promise<any>

Inherited from: Raw

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

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: Raw

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

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

Parameters:#

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

Returns: PassThrough

Inherited from: Raw

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


then#

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

Parameters:#

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

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


timeout#

timeout(ms: number, options?: { cancel?: boolean }): Raw<string>

Parameters:#

NameType
msnumber
options?object
options.cancel?boolean

Returns: Raw<string>

Inherited from: Raw

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


toQuery#

toQuery(): string

Returns: string

Inherited from: Raw

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


toSQL#

toSQL(): Sql

Returns: Sql

Inherited from: Raw

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


transacting#

transacting(trx: Transaction<any, any>): Ref<TSrc, TMapping>

Parameters:#

NameType
trxTransaction<any, any>

Returns: Ref<TSrc, TMapping>

Inherited from: Raw

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


withSchema#

withSchema(schema: string): Ref<TSrc, TMapping>

Parameters:#

NameType
schemastring

Returns: Ref<TSrc, TMapping>

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


wrap#

wrap<TResult2>(before: string, after: string): Raw<string>

Type parameters:#

NameDefault
TResult2string

Parameters:#

NameType
beforestring
afterstring

Returns: Raw<string>

Inherited from: Raw

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

Last updated on by Renovate Bot