import { DuckDBType } from './DuckDBType'; import { JS } from './JS'; import { JSInputTypeFor } from './JSInputTypeForTypeId'; import { DuckDBValue } from './values'; /** * Converts a JS value into the `DuckDBValue` representation for a DuckDB type: * the inverse of `JSDuckDBValueConverter`. * * Pass this to `DuckDBDataChunk.setRowsConverted` and friends to fill a chunk * from JS values. `jsToDuckDBValue` below is the single-value form, and checks * its input against a statically known type. */ export declare const JSToDuckDBValueConverter: import("./ToDuckDBValueConverter").ToDuckDBValueConverter; /** * Converts a JS value into the `DuckDBValue` representation for `type`. * * The inverse of `JSDuckDBValueConverter`. Accepts what * `JSInputTypeForTypeId` declares for the type's id, plus `null` for any type. * Generic over the type, so a statically known one checks its input exactly: * `jsToDuckDBValue(new Date(), TIMESTAMP)` is accepted and * `jsToDuckDBValue(new Date(), INTEGER)` is not. Passing a `DuckDBType` that * is only known as the union widens the input to the union of every entry, * which is as precise as the type information allows. * * Pure TypeScript: it constructs no `duckdb_value` and needs no connection, so * it composes with every write entry point — `DuckDBAppender.appendValue`, * `DuckDBPreparedStatement.bindValue`, and `DuckDBDataChunk.setRows` all take * a `DuckDBValue`. */ export declare function jsToDuckDBValue(value: JSInputTypeFor | null, type: T): DuckDBValue;