arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Sql.Insert

Description

INSERT fragments derived from a profunctor Codec. The column list, the placeholders, and the parameters all come from one value.

Synopsis

Documentation

Source #insertFrag :: Codec s a -> s -> Query ()

A single row: (c1, c2, ...) VALUES (?, ?, ...) with one scalar parameter per column, from cScalar.

Source #batchFrag :: Codec s a -> [s] -> Query ()

A batch source: (c1, ...) SELECT c1, ... FROM (SELECT unnest(?::t1[]) AS c1, ...) src with one array parameter per column, from cArray.