// TRYBUILD=overwrite cargo test -p turbosql --test ui use turbosql::{execute, select, Turbosql}; #[derive(Turbosql, Default)] struct NoOption { rowid: Option, e: u8, } #[derive(Turbosql, Default)] struct NoRowId { age: Option, } #[derive(Turbosql, Default)] struct U64 { rowid: Option, e: Option, } #[derive(Turbosql, Default)] struct Person { rowid: Option, name: Option, age: Option, } fn main() { select!(Person "WHERE age = " 24 " AND name = ?", "Bob").unwrap(); select!(Person "WHERE age = " 24 " AND name = $name").unwrap(); select!(Person "WHERE age = ?", 1, 2).unwrap(); select!(Person "WHERE age = ").unwrap(); select!("UPDATE person SET age = 1").unwrap(); execute!("SELECT 1").unwrap(); select!(Person "WHERE nonexistentcolumn = 1").unwrap(); select!(Nonexistenttable).unwrap(); select!(Vec).unwrap(); select!(Vec<"what">).unwrap(); }