Skip to main content
Version: 4.5

Class: Client#

knex.Knex.Client

Hierarchy#

  • EventEmitter

    Client

Constructors#

constructor#

+ new Client(config: Config<any>): Client

Parameters:#

NameType
configConfig<any>

Returns: Client

Overrides: void

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

Properties#

canCancelQuery#

canCancelQuery: boolean

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


config#

config: Config<any>

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


connectionConfigExpirationChecker#

connectionConfigExpirationChecker: null | () => boolean

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


connectionConfigProvider#

connectionConfigProvider: any

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


connectionSettings#

connectionSettings: object

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


dialect#

dialect: string

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


driver#

driver: any

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


driverName#

driverName: string

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


logger#

logger: Logger

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


pool#

pool: undefined | Pool<any>

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


valueForUndefined#

valueForUndefined: any

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


version#

Optional version: string

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


captureRejectionSymbol#

Readonly Static captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from: void

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


captureRejections#

Static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Inherited from: void

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


defaultMaxListeners#

Static defaultMaxListeners: number

Inherited from: void

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


errorMonitor#

Readonly Static errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Inherited from: void

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

Methods#

acquireConnection#

acquireConnection(): any

Returns: any

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


acquireRawConnection#

acquireRawConnection(): Promise<any>

Returns: Promise<any>

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


addListener#

addListener(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


assertCanCancelQuery#

assertCanCancelQuery(): void

Returns: void

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


cancelQuery#

cancelQuery(): void

Returns: void

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


columnBuilder#

columnBuilder(tableBuilder: any, type: any, args: any): ColumnBuilder

Parameters:#

NameType
tableBuilderany
typeany
argsany

Returns: ColumnBuilder

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


columnCompiler#

columnCompiler(tableBuilder: any, columnBuilder: any): any

Parameters:#

NameType
tableBuilderany
columnBuilderany

Returns: any

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


customWrapIdentifier#

customWrapIdentifier(value: any, origImpl: any, queryContext: any): any

Parameters:#

NameType
valueany
origImplany
queryContextany

Returns: any

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


database#

database(): any

Returns: any

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


destroy#

destroy(callback: any): any

Parameters:#

NameType
callbackany

Returns: any

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


destroyRawConnection#

destroyRawConnection(connection: any): Promise<void>

Parameters:#

NameType
connectionany

Returns: Promise<void>

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


emit#

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

Parameters:#

NameType
eventstring | symbol
...argsany[]

Returns: boolean

Inherited from: void

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


eventNames#

eventNames(): (string | symbol)[]

Returns: (string | symbol)[]

Inherited from: void

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


formatter#

formatter(builder: any): any

Parameters:#

NameType
builderany

Returns: any

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


getMaxListeners#

getMaxListeners(): number

Returns: number

Inherited from: void

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


getPoolSettings#

getPoolSettings(poolConfig: any): any

Parameters:#

NameType
poolConfigany

Returns: any

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


initializeDriver#

initializeDriver(): void

Returns: void

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


initializePool#

initializePool(config?: {}): void

Parameters:#

NameType
config?object

Returns: void

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


listenerCount#

listenerCount(event: string | symbol): number

Parameters:#

NameType
eventstring | symbol

Returns: number

Inherited from: void

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


listeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: void

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


off#

off(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


on#

on(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


once#

once(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


poolDefaults#

poolDefaults(): object

Returns: object

NameType
maxnumber
minnumber
propagateCreateErrorboolean

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


positionBindings#

positionBindings(sql: any): any

Parameters:#

NameType
sqlany

Returns: any

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


postProcessResponse#

postProcessResponse(resp: any, queryContext: any): any

Parameters:#

NameType
respany
queryContextany

Returns: any

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


prepBindings#

prepBindings(bindings: any): any

Parameters:#

NameType
bindingsany

Returns: any

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


prependListener#

prependListener(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


prependOnceListener#

prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


query#

query(connection: any, obj: any): any

Parameters:#

NameType
connectionany
objany

Returns: any

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


queryBuilder#

queryBuilder(): QueryBuilder<any, any>

Returns: QueryBuilder<any, any>

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


queryCompiler#

queryCompiler(builder: any): any

Parameters:#

NameType
builderany

Returns: any

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


raw#

raw(...args: any[]): any

Parameters:#

NameType
...argsany[]

Returns: any

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


rawListeners#

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

Parameters:#

NameType
eventstring | symbol

Returns: Function[]

Inherited from: void

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


ref#

ref(...args: any[]): Ref<any, any>

Parameters:#

NameType
...argsany[]

Returns: Ref<any, any>

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


releaseConnection#

releaseConnection(connection: any): any

Parameters:#

NameType
connectionany

Returns: any

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


removeAllListeners#

removeAllListeners(event?: string | symbol): Client

Parameters:#

NameType
event?string | symbol

Returns: Client

Inherited from: void

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


removeListener#

removeListener(event: string | symbol, listener: (...args: any[]) => void): Client

Parameters:#

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

Returns: Client

Inherited from: void

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


runner#

runner(builder: any): any

Parameters:#

NameType
builderany

Returns: any

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


schemaBuilder#

schemaBuilder(): SchemaBuilder

Returns: SchemaBuilder

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


schemaCompiler#

schemaCompiler(builder: SchemaBuilder): any

Parameters:#

NameType
builderSchemaBuilder

Returns: any

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


setMaxListeners#

setMaxListeners(n: number): Client

Parameters:#

NameType
nnumber

Returns: Client

Inherited from: void

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


stream#

stream(connection: any, obj: any, stream: any, options: any): any

Parameters:#

NameType
connectionany
objany
streamany
optionsany

Returns: any

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


tableBuilder#

tableBuilder(type: any, tableName: any, fn: any): TableBuilder

Parameters:#

NameType
typeany
tableNameany
fnany

Returns: TableBuilder

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


tableCompiler#

tableCompiler(tableBuilder: any): any

Parameters:#

NameType
tableBuilderany

Returns: any

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


transaction#

transaction(container: any, config: any, outerTx: any): Transaction<any, any>

Parameters:#

NameType
containerany
configany
outerTxany

Returns: Transaction<any, any>

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


validateConnection#

validateConnection(connection: any): Promise<boolean>

Parameters:#

NameType
connectionany

Returns: Promise<boolean>

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


wrapIdentifier#

wrapIdentifier(value: any, queryContext: any): any

Parameters:#

NameType
valueany
queryContextany

Returns: any

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


wrapIdentifierImpl#

wrapIdentifierImpl(value: any): string

Parameters:#

NameType
valueany

Returns: string

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


listenerCount#

StaticlistenerCount(emitter: EventEmitter, event: string | symbol): number

deprecated since v4.0.0

Parameters:#

NameType
emitterEventEmitter
eventstring | symbol

Returns: number

Inherited from: void

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


on#

Staticon(emitter: EventEmitter, event: string): AsyncIterableIterator<any>

Parameters:#

NameType
emitterEventEmitter
eventstring

Returns: AsyncIterableIterator<any>

Inherited from: void

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


once#

Staticonce(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>

Parameters:#

NameType
emitterNodeEventTarget
eventstring | symbol

Returns: Promise<any[]>

Inherited from: void

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

Staticonce(emitter: DOMEventTarget, event: string): Promise<any[]>

Parameters:#

NameType
emitterDOMEventTarget
eventstring

Returns: Promise<any[]>

Inherited from: void

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

Last updated on by Renovate Bot