Skip to main content

Schema Utilities

getTableConfig()

Extracts the complete configuration of a SQLite table including columns, indexes, foreign keys, checks, primary keys, and unique constraints.

getViewConfig()

Extracts the configuration of a SQLite view.

Column Builders

getSQLiteColumnBuilders()

Returns an object containing all SQLite column builder functions. Used internally by the table builder when using function syntax.

Conflict Resolution

OnConflict Type

Defines SQLite’s conflict resolution strategies.
string
Aborts the current SQL statement and rolls back the transaction
string
Aborts the current SQL statement (default if not specified)
string
Aborts the current SQL statement but does not back out prior changes
string
Skips the row that contains the constraint violation
string
Deletes pre-existing rows that cause the constraint violation

Foreign Key Actions

UpdateDeleteAction Type

Defines actions for foreign key constraints on UPDATE and DELETE operations.
string
Propagate the change (update/delete) to all referencing rows
string
Prevent the change if any referencing rows exist
string
No action (SQLite default, defers check until end of transaction)
string
Set the foreign key column to NULL in referencing rows
string
Set the foreign key column to its default value in referencing rows

Helper Functions

extractUsedTable()

Extracts the table names used in a query expression. Useful for dependency analysis.

Type Utilities

AnySQLiteTable

A utility type representing any SQLite table with optional partial configuration.

SQLiteTableWithColumns

A utility type that combines a table with its column accessors.

Alias Utilities

Create table aliases for self-joins and complex queries.

SQL Template Helpers

SQLite-specific SQL template utilities.

sql Template Tag

Create raw SQL expressions.

Common SQLite Functions

Placeholder

Create named placeholders for prepared statements.

InlineForeignKeys Symbol

Internal symbol used to access inline foreign key definitions.