Client-side SQL parameter formatting for DuckDB Quack queries.
DuckDB's current Quack protocol request shape does not expose server-side bind
parameters. QuackDB therefore formats positional ? placeholders as DuckDB SQL
literals before sending a PrepareRequest.
The formatter scans SQL and ignores placeholders inside quoted strings and SQL
comments. It supports conservative scalar values and raises QuackDB.Error for
unsupported parameter shapes rather than producing lossy SQL.
Summary
Functions
Builds a CALL function(args..., option = value...); statement.
Builds an INSTALL extension; statement.
Builds a LOAD extension; statement.
Builds a SET name = value; statement.
Builds a SET GLOBAL name = value; statement.
Types
@type parameter() :: nil | boolean() | integer() | float() | String.t() | Decimal.t() | Date.t() | Time.t() | NaiveDateTime.t() | DateTime.t() | QuackDB.Interval.t() | {:blob, binary()} | {:interval, integer(), integer(), integer()} | [parameter()]
Functions
Builds a CALL function(args..., option = value...); statement.
@spec format(iodata(), [parameter()]) :: {:ok, String.t()} | {:error, QuackDB.Error.t()}
Builds an INSTALL extension; statement.
@spec literal(parameter()) :: {:ok, iodata()} | {:error, QuackDB.Error.t()}
Builds a LOAD extension; statement.
Builds a SET name = value; statement.
Builds a SET GLOBAL name = value; statement.