- dumpToKnex
- knexFormatCreateTableSchema
- knexInspectCreateTableSchema
- knexInspectTableSchema
- newDBGateQuerySplitterStream
- pipeKnexInsertTextTransform
- queryKnex
- shardMd5LswSQL
- shardNumberSQL
- streamFromKnex
- streamToKnex
- streamToKnexRaw
• Const
batch2: any
Defined in: knex.ts:20
• Const
knexLogConfig: object
Name | Type |
---|---|
debug |
(_message : any) => void |
deprecate |
(_message : any) => void |
error |
(_message : any) => void |
warn |
(_message : any) => void |
Defined in: knex.ts:290
• Const
knexPoolConfig: object
Name | Type |
---|---|
acquireTimeoutMillis |
number |
createRetryIntervalMillis |
number |
createTimeoutMillis |
number |
idleTimeoutMillis |
number |
max |
number |
min |
number |
Defined in: knex.ts:305
▸ dumpToKnex(input
: ReadableStreamTree, db
: Knex, table
: string, options?
: { batchSize?
: number ; compoundInsert?
: boolean ; returning?
: string }): Promise<void>
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(outputKnex
: Knex, tableName
: string, columnsInfo
: Column[], columnType?
: Record<string, string>): string
Name | Type |
---|---|
outputKnex |
Knex |
tableName |
string |
columnsInfo |
Column[] |
columnType? |
Record<string, string> |
Returns: string
Defined in: knex.ts:197
▸ knexInspectCreateTableSchema(inputKnex
: Knex, outputKnex
: Knex, tableName
: string): Promise<string>
Name | Type |
---|---|
inputKnex |
Knex |
outputKnex |
Knex |
tableName |
string |
Returns: Promise<string>
Defined in: knex.ts:184
▸ knexInspectTableSchema(inputKnex
: Knex, tableName
: string): Promise<Column[]>
Name | Type |
---|---|
inputKnex |
Knex |
tableName |
string |
Returns: Promise<Column[]>
Defined in: knex.ts:193
▸ newDBGateQuerySplitterStream(type?
: any): SplitQueryStream
Name | Type |
---|---|
type? |
any |
Returns: SplitQueryStream
Defined in: knex.ts:250
▸ pipeKnexInsertTextTransform(output
: WritableStreamTree, knex?
: Knex, tableName?
: string): WritableStreamTree
Name | Type |
---|---|
output |
WritableStreamTree |
knex? |
Knex |
tableName? |
string |
Returns: WritableStreamTree
Defined in: knex.ts:158
▸ 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
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(client
: string, column
: string, modulus
: string | number): string
Name | Type |
---|---|
client |
string |
column |
string |
modulus |
string | number |
Returns: string
Defined in: knex.ts:277
▸ shardNumberSQL(client
: string, column
: string, modulus
: string | number): string
Name | Type |
---|---|
client |
string |
column |
string |
modulus |
string | number |
Returns: string
Defined in: knex.ts:265
▸ streamFromKnex(query
: Knex.QueryBuilder): ReadableStreamTree
Name | Type |
---|---|
query |
Knex.QueryBuilder |
Returns: ReadableStreamTree
Defined in: knex.ts:87
▸ streamToKnex(source
: { knex?
: Knex ; transaction?
: Knex.Transaction }, options
: { batchSize?
: number ; returning?
: string ; table
: string }): WritableStreamTree
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(source
: { knex?
: Knex ; transaction?
: Knex.Transaction }, options?
: { returning?
: boolean }): WritableStreamTree
Name | Type |
---|---|
source |
object |
source.knex? |
Knex |
source.transaction? |
Knex.Transaction |
options? |
object |
options.returning? |
boolean |
Returns: WritableStreamTree
Defined in: knex.ts:125