Generate an upsert on the primary key that updates the existing row in
place, on both engines:
INSERT INTO t (a, b) VALUES (?, ?) ON CONFLICT (a) DO UPDATE SET b = excluded.b.
The row keeps the columns the statement does not name, and its dependents.
When every column is the key, the statement does nothing on a conflict.
OptionalprimaryKey: stringThe conflict target. Defaults to the first column.
An upsert with an explicit conflict target that updates the existing row
in place on both engines (SQLite 3.24 and later):
INSERT INTO t (a, b, c) VALUES (?, ?, ?) ON CONFLICT (a) DO UPDATE SET b = excluded.b, c = excluded.c.
The unique or primary-key columns of the conflict target.
OptionalupdateColumns: string[]The columns to update; by default every column outside the target. None left: DO NOTHING.
A value at jsonPath ($.a.b, $.a[0]) read as text, an integer or a
real, with the same result on both engines; json reads the JSON value
itself (jsonb on PostgreSQL, JSON text on SQLite), for use inside another
expression such as jsonArrayContains. A path outside that form is refused.
Column definition for an auto-incrementing integer primary key.
SQLite: INTEGER PRIMARY KEY AUTOINCREMENT, which takes an id an insert
gives as well. Postgres: INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, which refuses one; with acceptExplicitIds, GENERATED BY DEFAULT,
which takes it. After inserting ids, run syncIdentitySequence.
Statements that make every write to table, from any session, send a
notification on channel: one per statement, its payload JSON
{"schema", "table", "operation"} with the operation insert,
update or delete (TRUNCATE too). Postgres: a trigger function and a
statement-level trigger, which PostgresAdapter.listen hears. SQLite:
null, since SQLite has no notifications between connections.
A statement that moves an identity or serial column's sequence past the
largest value in the table, so the next generated id does not collide
with ids inserted explicitly. Postgres: SELECT setval(...). SQLite:
null, since a rowid and AUTOINCREMENT follow the largest id by themselves.
The table may be schema-qualified; names are SQL identifiers.
Optional for existing custom dialects; callers may fall back to no statement.
A column type for DDL. PostgreSQL: TEXT, INTEGER, BIGINT, DOUBLE
PRECISION, BOOLEAN, TIMESTAMPTZ, JSONB, UUID, BYTEA. SQLite: TEXT,
INTEGER, INTEGER, REAL, INTEGER, TEXT, TEXT, TEXT, BLOB. The values a
column returns follow each engine (a PostgreSQL boolean is true, a
SQLite one 1); typeParsers and the bound-value conversions narrow that.
expr cast to a type both engines read the same way. timestamp is
timestamptz on PostgreSQL and ISO 8601 UTC text on SQLite.
The time expr moved by amount units (negative moves back), as an
exact number of seconds on both engines. PostgreSQL: timestamptz.
SQLite: ISO 8601 UTC text.
The start of the minute, hour, day, month or year that holds expr, in
UTC, as ISO 8601 text (2026-10-15T00:00:00.000Z) on both engines.
A statement that takes a transaction-scoped advisory lock on an integer
key, released at COMMIT or ROLLBACK. PostgreSQL:
SELECT pg_advisory_xact_lock(key). SQLite: null, to skip, since its
write transactions already run one at a time.
PostgreSQL dialect implementation.
Generates Postgres-compatible SQL syntax including
ON CONFLICT DO NOTHING,ON CONFLICT ... DO UPDATE SET,jsonbextraction operators,COALESCE(),GENERATED ALWAYS AS IDENTITY, and$Npositional placeholders.