Builds the values and SQL fragments used to insert/update rows.
Extracted from AshClickhouse.DataLayer so all persistence value encoding
(attribute ordering, UUID/decimal/date/time handling, autogenerated primary
keys) lives in one module and can be reused by the single- and bulk-insert
paths.
Summary
Functions
Encodes a single record's attrs into a row map (string keys → encoded values) suitable for the single-insert path.
Builds a (fields, rows) pair for bulk insert: quoted column names in the
resource's attribute declaration order, and each row as a value list aligned
to that order.
Builds column = ? SET clauses and their values (for ALTER TABLE ... UPDATE).
Builds an AND-joined col = ? WHERE clause and its values from a pk map.
Returns a changeset's attributes map with autogenerated values filled in
for missing primary keys.
Merges attributes and changes from a changeset into a single map for the
SET clause builder.
Encodes a single attribute value for a parameterized query.
Builds a map of primary-key column → value from a changeset's current data.
Builds the options forwarded to a bulk insert (async_insert etc.).
Builds a fully-formed INSERT INTO <table> (...) FORMAT JSONCompactEachRow
statement from already-built fields.
Functions
Encodes a single record's attrs into a row map (string keys → encoded values) suitable for the single-insert path.
Builds a (fields, rows) pair for bulk insert: quoted column names in the
resource's attribute declaration order, and each row as a value list aligned
to that order.
Builds column = ? SET clauses and their values (for ALTER TABLE ... UPDATE).
Builds an AND-joined col = ? WHERE clause and its values from a pk map.
Returns a changeset's attributes map with autogenerated values filled in
for missing primary keys.
Merges attributes and changes from a changeset into a single map for the
SET clause builder.
Encodes a single attribute value for a parameterized query.
Builds a map of primary-key column → value from a changeset's current data.
Builds the options forwarded to a bulk insert (async_insert etc.).
Builds a fully-formed INSERT INTO <table> (...) FORMAT JSONCompactEachRow
statement from already-built fields.