- DatabaseCopyFormat
- DatabaseCopyInputType
- DatabaseCopyOutputType
- DatabaseCopySchema
- DatabaseCopyShardFunction
- formatContentType
- formatHasSchema
- guessFormatFromFilename
- guessInputTypeFromFilename
- guessOutputTypeFromFilename
- inputHasDatabaseFile
- inputIsSqlDatabase
- nonCustomFormat
- outputHasDatabaseFile
- outputIsSqlDatabase
- pipeFromOutputFormatTransform
- pipeInputFormatTransform
Ƭ DatabaseCopyShardFunctionOverride: (value
: Record<string, any>, modulus
: number) => number
▸ (value
: Record<string, any>, modulus
: number): number
Name | Type |
---|---|
value |
Record<string, any> |
modulus |
number |
Returns: number
Defined in: format.ts:67
Ƭ DatabaseCopyTransformFactory: () => Duplex
▸ (): Duplex
Returns: Duplex
Defined in: format.ts:77
▸ formatContentType(format?
: DatabaseCopyFormat | null
): undefined | "application/x-ndjson"
| "application/json"
| "application/sql"
Name | Type |
---|---|
format? |
DatabaseCopyFormat | null |
Returns: undefined | "application/x-ndjson"
| "application/json"
| "application/sql"
Defined in: format.ts:183
▸ formatHasSchema(format?
: DatabaseCopyFormat | DatabaseCopyTransformFactory): boolean
Name | Type |
---|---|
format? |
DatabaseCopyFormat | DatabaseCopyTransformFactory |
Returns: boolean
Defined in: format.ts:241
▸ guessFormatFromFilename(filename?
: string): null
| csv | json | jsonl | parquet | tfrecord | sql
Name | Type |
---|---|
filename? |
string |
Returns: null
| csv | json | jsonl | parquet | tfrecord | sql
Defined in: format.ts:79
▸ guessInputTypeFromFilename(filename?
: string): null
| level | sqlite
Name | Type |
---|---|
filename? |
string |
Returns: null
| level | sqlite
Defined in: format.ts:92
▸ guessOutputTypeFromFilename(filename?
: string): null
| level | sqlite
Name | Type |
---|---|
filename? |
string |
Returns: null
| level | sqlite
Defined in: format.ts:100
▸ inputHasDatabaseFile(format?
: DatabaseCopyInputType | null
): boolean
Name | Type |
---|---|
format? |
DatabaseCopyInputType | null |
Returns: boolean
Defined in: format.ts:197
▸ inputIsSqlDatabase(format?
: DatabaseCopyInputType | null
): boolean
Name | Type |
---|---|
format? |
DatabaseCopyInputType | null |
Returns: boolean
Defined in: format.ts:217
▸ nonCustomFormat(format?
: DatabaseCopyFormat | DatabaseCopyTransformFactory | null
): DatabaseCopyFormat | undefined
Name | Type |
---|---|
format? |
DatabaseCopyFormat | DatabaseCopyTransformFactory | null |
Returns: DatabaseCopyFormat | undefined
Defined in: format.ts:251
▸ outputHasDatabaseFile(format?
: DatabaseCopyOutputType | null
): boolean
Name | Type |
---|---|
format? |
DatabaseCopyOutputType | null |
Returns: boolean
Defined in: format.ts:207
▸ outputIsSqlDatabase(format?
: DatabaseCopyOutputType | null
): boolean
Name | Type |
---|---|
format? |
DatabaseCopyOutputType | null |
Returns: boolean
Defined in: format.ts:229
▸ pipeFromOutputFormatTransform(output
: WritableStreamTree, format
: DatabaseCopyFormat | DatabaseCopyTransformFactory, db?
: Knex, tableName?
: string, options?
: { columnType?
: Record<string, string> ; schema?
: Column[] }): WritableStreamTree | Promise<WritableStreamTree>
Name | Type |
---|---|
output |
WritableStreamTree |
format |
DatabaseCopyFormat | DatabaseCopyTransformFactory |
db? |
Knex |
tableName? |
string |
options? |
object |
options.columnType? |
Record<string, string> |
options.schema? |
Column[] |
Returns: WritableStreamTree | Promise<WritableStreamTree>
Defined in: format.ts:145
▸ pipeInputFormatTransform(input
: ReadableStreamTree, format
: DatabaseCopyFormat | DatabaseCopyTransformFactory): ReadableStreamTree | Promise<ReadableStreamTree>
Name | Type |
---|---|
input |
ReadableStreamTree |
format |
DatabaseCopyFormat | DatabaseCopyTransformFactory |
Returns: ReadableStreamTree | Promise<ReadableStreamTree>
Defined in: format.ts:108