Generate an INSERT OR IGNORE statement.
SQLite: INSERT OR IGNORE INTO t (a, b) VALUES (?, ?)
Postgres: INSERT INTO t (a, b) VALUES ($1, $2) ON CONFLICT DO NOTHING
Generate an INSERT OR REPLACE (upsert) statement.
SQLite: INSERT OR REPLACE INTO t (a, b) VALUES (?, ?)
Postgres: INSERT INTO t (a, b) VALUES ($1, $2) ON CONFLICT (pk) DO UPDATE SET ...
Parameters
table: string
columns: string[]
placeholders: string[]
Optional_primaryKey: string
Returns string
jsonExtract
jsonExtract(column, jsonPath): string
Generate a JSON field extraction expression.
SQLite: json_extract(col, '$.key')
Postgres: (col::jsonb)->>'key'
Parameters
column: string
jsonPath: string
Returns string
ifnull
ifnull(expr, fallback): string
Generate a null-coalesce expression.
SQLite: ifnull(expr, fallback)
Postgres: COALESCE(expr, fallback)
Parameters
expr: string
fallback: string
Returns string
autoIncrementPrimaryKey
autoIncrementPrimaryKey(): string
Column definition for an auto-incrementing integer primary key.
SQLite: INTEGER PRIMARY KEY AUTOINCREMENT
Postgres: INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY
Returns string
pragma
pragma(key, value): null | string
Generate a PRAGMA statement or equivalent.
SQLite: PRAGMA key = value
Postgres: returns null (skip — Postgres enforces FKs by default, etc.)
Parameters
key: string
value: string
Returns null | string
placeholder
placeholder(_index): string
Parameter placeholder for the given 0-based index.
SQLite: ?
Postgres: $1, $2, etc.
SQLite dialect implementation.
Generates standard SQLite SQL syntax including
INSERT OR IGNORE,INSERT OR REPLACE,json_extract(),ifnull(),PRAGMA, and positional?placeholders.