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