The table or database that owns the query.
The SQL statement to execute.
Query execution and diagnostic settings.
The caller's per-cell display limit, retained for compatibility.
The calling method used for diagnostics, or null.
OptionalnoClean?: booleanWhether to preserve the SQL text without cleaning it.
Arguments included in error diagnostics, or null.
Whether to convert and return the result rows.
The caller's row-display limit, retained for compatibility.
The table name used for diagnostics, or null.
Optionalvalues?: DuckDBValue[]DuckDB-native values bound to SQL placeholders, in order.
Converted rows when returnData is true, otherwise null.
import { mergeOptions, queryDB, quoteIdentifier } from "@nshiab/simple-data-analysis-core/helpers";
await table.loadArray([{ answer: 0 }]).run();
const query = `UPDATE ${quoteIdentifier(table.name)} SET answer = ?`;
await queryDB(table, query, mergeOptions(table, {
table: table.name,
method: "example()",
parameters: null,
values: [42],
}));
await table.log();
Executes SQL for a table or database after flushing all queued operations. Starts the database on first use and applies its SQL logging settings. Extension authors can construct
optionswithmergeOptions().