sqlite
Module[Sqlite]: the SQLite schema.
Contents
use utopia_query::schema::sqlite::Sqlite;Rust
pub struct SqliteThe SQLite schema: backtick quoting, INTEGER PRIMARY KEY AUTOINCREMENT
inline, TEXT for most types, DELETE FROM for truncation.
Rust
use utopia_query::schema::{Schema, Sqlite};
let mut table = Sqlite::new().table("notes");
table.id("id");
table.text("body");
assert_eq!(
table.create()?.query,
"CREATE TABLE `notes` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `body` TEXT NOT NULL)"
);Also implements
Debug.