Skip to content

@sqlrooms/duckdb / loadObjects

Function: loadObjects()

loadObjects(tableName, data, options?): string

Load JavaScript objects directly into a DuckDB table

Parameters

ParameterTypeDescription
tableNamestringName of the table to create
dataRecord<string, unknown>[]Array of objects to load
options?{ [key: string]: unknown; schema: string; select: string[]; where: string; view: boolean; temp: boolean; replace: boolean; }Load options
options.schema?string-
options.select?string[]-
options.where?string-
options.view?boolean-
options.temp?boolean-
options.replace?boolean-

Returns

string

SQL query string to create the table