Skip to main content

Module sqlite_helpers

Module sqlite_helpers 

Source
Expand description

Helper constants and functions for implementing Introspect on SQLite connections. No driver dependency — just SQL strings and type-mapping logic that any SQLite driver crate can use.

Constants§

FOREIGN_KEY_LIST
PRAGMA to get foreign key list for a table. Replace {table} with the actual table name.
INDEX_INFO
PRAGMA to get the columns of an index. Replace {index} with the actual index name.
INDEX_LIST
PRAGMA to get the index list for a table. Replace {table} with the actual table name.
LIST_TABLES
SQL to list all user tables (excludes internal SQLite tables).
TABLE_INFO
PRAGMA to get column info for a table. Replace {table} with the actual table name.

Functions§

column_from_pragma
Builds a ColumnSnapshot from raw PRAGMA table_info row data.
parse_sqlite_type
Maps a SQLite type affinity string to a DataType.