Skip to main content
Version: 4.4

Interface: Ref<TSrc, TMapping>#

knex.Knex.Ref

Type parameters#

NameType
TSrcstring
TMapping{}

Hierarchy#

  • Raw<string>

    Ref

Properties#

[Symbol.toStringTag]#

Readonly [Symbol.toStringTag]: string

Inherited from: Raw.[Symbol.toStringTag]

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


__@RefMemberTag@52085#

__@RefMemberTag@52085: { mapping: TMapping ; src: TSrc }

Type declaration:#

NameType
mappingTMapping
srcTSrc

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

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


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


asCallback#

asCallback(callback: Function): Promise<string>

Parameters:#

NameType
callbackFunction

Returns: Promise<string>

Inherited from: Raw

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


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


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


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


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


eventNames#

eventNames(): (string | symbol)[]

Returns: (string | symbol)[]

Inherited from: Raw

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


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


listenerCount#

listenerCount(event: string | symbol): number

Parameters:#

NameType
eventstring | symbol

Returns: number

Inherited from: Raw

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


listeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: Raw

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


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


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


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


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

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


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


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


queryContext#

queryContext(context: any): Raw<string>

Parameters:#

NameType
contextany

Returns: Raw<string>

Inherited from: Raw

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

queryContext(): any

Returns: any

Inherited from: Raw

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


rawListeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: Raw

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


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


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


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


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

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

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


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


timeout#

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

Parameters:#

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

Returns: Raw<string>

Inherited from: Raw

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


toQuery#

toQuery(): string

Returns: string

Inherited from: Raw

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


toSQL#

toSQL(): Sql

Returns: Sql

Inherited from: Raw

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


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


withSchema#

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

Parameters:#

NameType
schemastring

Returns: Ref<TSrc, TMapping>

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


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

Last updated on by Martin Adámek