Skip to content

Latest commit

 

History

History
302 lines (196 loc) · 7.8 KB

knex.md

File metadata and controls

302 lines (196 loc) · 7.8 KB

dbcp / Exports / knex

Module: knex

Table of contents

Variables

Functions

Variables

batch2

Const batch2: any

Defined in: knex.ts:20


knexLogConfig

Const knexLogConfig: object

Type declaration

Name Type
debug (_message: any) => void
deprecate (_message: any) => void
error (_message: any) => void
warn (_message: any) => void

Defined in: knex.ts:290


knexPoolConfig

Const knexPoolConfig: object

Type declaration

Name Type
acquireTimeoutMillis number
createRetryIntervalMillis number
createTimeoutMillis number
idleTimeoutMillis number
max number
min number

Defined in: knex.ts:305

Functions

dumpToKnex

dumpToKnex(input: ReadableStreamTree, db: Knex, table: string, options?: { batchSize?: number ; compoundInsert?: boolean ; returning?: string }): Promise<void>

Parameters

Name Type
input ReadableStreamTree
db Knex
table string
options? object
options.batchSize? number
options.compoundInsert? boolean
options.returning? string

Returns: Promise<void>

Defined in: knex.ts:22


knexFormatCreateTableSchema

knexFormatCreateTableSchema(outputKnex: Knex, tableName: string, columnsInfo: Column[], columnType?: Record<string, string>): string

Parameters

Name Type
outputKnex Knex
tableName string
columnsInfo Column[]
columnType? Record<string, string>

Returns: string

Defined in: knex.ts:197


knexInspectCreateTableSchema

knexInspectCreateTableSchema(inputKnex: Knex, outputKnex: Knex, tableName: string): Promise<string>

Parameters

Name Type
inputKnex Knex
outputKnex Knex
tableName string

Returns: Promise<string>

Defined in: knex.ts:184


knexInspectTableSchema

knexInspectTableSchema(inputKnex: Knex, tableName: string): Promise<Column[]>

Parameters

Name Type
inputKnex Knex
tableName string

Returns: Promise<Column[]>

Defined in: knex.ts:193


newDBGateQuerySplitterStream

newDBGateQuerySplitterStream(type?: any): SplitQueryStream

Parameters

Name Type
type? any

Returns: SplitQueryStream

Defined in: knex.ts:250


pipeKnexInsertTextTransform

pipeKnexInsertTextTransform(output: WritableStreamTree, knex?: Knex, tableName?: string): WritableStreamTree

Parameters

Name Type
output WritableStreamTree
knex? Knex
tableName? string

Returns: WritableStreamTree

Defined in: knex.ts:158


queryKnex

queryKnex(db: Knex, table: string, options: { inputShardBy?: string ; inputShardFunction?: DatabaseCopyShardFunction ; inputShardIndex?: number ; inputShards?: number ; limit?: number ; orderBy?: string[] ; query?: string ; transformObject?: (x: unknown) => unknown ; transformObjectStream?: DatabaseCopyTransformFactory ; where?: (string | any[])[] }): ReadableStreamTree

Parameters

Name Type
db Knex
table string
options object
options.inputShardBy? string
options.inputShardFunction? DatabaseCopyShardFunction
options.inputShardIndex? number
options.inputShards? number
options.limit? number
options.orderBy? string[]
options.query? string
options.transformObject? (x: unknown) => unknown
options.transformObjectStream? DatabaseCopyTransformFactory
options.where? (string | any[])[]

Returns: ReadableStreamTree

Defined in: knex.ts:40


shardMd5LswSQL

shardMd5LswSQL(client: string, column: string, modulus: string | number): string

Parameters

Name Type
client string
column string
modulus string | number

Returns: string

Defined in: knex.ts:277


shardNumberSQL

shardNumberSQL(client: string, column: string, modulus: string | number): string

Parameters

Name Type
client string
column string
modulus string | number

Returns: string

Defined in: knex.ts:265


streamFromKnex

streamFromKnex(query: Knex.QueryBuilder): ReadableStreamTree

Parameters

Name Type
query Knex.QueryBuilder

Returns: ReadableStreamTree

Defined in: knex.ts:87


streamToKnex

streamToKnex(source: { knex?: Knex ; transaction?: Knex.Transaction }, options: { batchSize?: number ; returning?: string ; table: string }): WritableStreamTree

Parameters

Name Type
source object
source.knex? Knex
source.transaction? Knex.Transaction
options object
options.batchSize? number
options.returning? string
options.table string

Returns: WritableStreamTree

Defined in: knex.ts:91


streamToKnexRaw

streamToKnexRaw(source: { knex?: Knex ; transaction?: Knex.Transaction }, options?: { returning?: boolean }): WritableStreamTree

Parameters

Name Type
source object
source.knex? Knex
source.transaction? Knex.Transaction
options? object
options.returning? boolean

Returns: WritableStreamTree

Defined in: knex.ts:125