import type { SQL } from '../db/types.js'; import type { DefinedTable, FieldRecord } from '../domain/types.js'; export type WriteVerb = 'insert' | 'update' | 'delete' | 'upsert'; /** * What the caller asked the write to return. * * - `null` (default) — no `RETURNING` clause; the executor resolves to `void`. * - `'all'` — `RETURNING *`; the executor resolves to every column on the row. * - `Record` — a per-field projection, as accepted by * drizzle's `.returning(...)` (column references, sql expressions, etc.). */ export type ReturningShape = Record | 'all' | null; export interface WriteState { readonly verb: WriteVerb; readonly table: DefinedTable; /** `set` clause for `update` / `upsert`. */ readonly set?: Record; /** Row values for `insert` / `upsert`. */ readonly values?: ReadonlyArray>; /** `where` clause for `update` / `delete`. */ readonly where?: SQL; /** Conflict-target columns for `upsert`. */ readonly onConflictColumns?: readonly string[]; /** What `RETURNING` should produce. `null` (default) emits no RETURNING. */ readonly returning?: ReturningShape; } /** Carrier type used by the builders' chain methods to mutate `WriteState` immutably. */ export type FieldRecordTable = DefinedTable; //# sourceMappingURL=state.d.ts.map