Skip to main content

Module sql

Module sql 

Source
Expand description

SQLite DDL generation from the schema model. Kept dialect-shaped (every statement goes through this module) so a second backend is a new module, not a rewrite.

Functionsยง

column_sql
One column definition line. auto_pk says whether this table uses the conventional id: i64 surrogate key (rendered inline as INTEGER PRIMARY KEY AUTOINCREMENT); composite keys are rendered as a table constraint by create_table_sql instead.
create_table_sql
index_name
index_sqls
CREATE INDEX statements for every #[orm(index)] column.