QuackDB.DML (quackdb v0.4.0)

Copy Markdown View Source

Small DuckDB DML SQL builders.

These helpers return SQL iodata for setup and example insert statements while still allowing DuckDB expressions where needed. For large batches, prefer QuackDB.insert_rows/4, QuackDB.insert_columns/4, or QuackDB.Explorer.insert_dataframe/4.

Summary

Functions

Builds an INSERT INTO ... VALUES ... statement.

Types

row()

@type row() :: keyword(value()) | %{required(atom() | String.t()) => value()}

value()

@type value() :: QuackDB.SQL.parameter() | {:expr, iodata()}

Functions

insert_into(table, rows)

@spec insert_into(String.t() | atom(), [row()] | row()) :: iodata()

Builds an INSERT INTO ... VALUES ... statement.