Linux | `$XDG_DATA_HOME`/`{exe_name}` or `$HOME`/.local/share/`{exe_name}` _/home/alice/.local/share/fooapp/fooapp.sqlite_ |
macOS | `$HOME`/Library/Application Support/`{exe_name}` _/Users/Alice/Library/Application Support/org.fooapp.fooapp/fooapp.sqlite_ |
Windows | `{FOLDERID_LocalAppData}`\\`{exe_name}`\\data _C:\Users\Alice\AppData\Local\fooapp\fooapp\data\fooapp.sqlite_ |
Primitive type | ```rust,ignore let result = select!(String "SELECT name FROM person")?; ``` Returns one value cast to specified type, returns `Error` if no rows available. ```rust,ignore let result = select!(String "name FROM person WHERE rowid = ?", rowid)?; ``` `SELECT` keyword is **always optional** when using `select!`; it's added automatically as needed. Parameter binding is straightforward. |
Vec<_> | ```rust,ignore let result = select!(Vec |
Option<_> | ```rust,ignore let result = select!(Option |
Your struct | ```rust,ignore let result = select!(Person "WHERE name = ?", name)?; ``` Column list and table name are optional if type is a `#[derive(Turbosql)]` struct. ```rust,ignore let result = select!(Vec Implement `Default` to avoid specifying unused column names. (And, of course, you can put it all in a `Vec` or `Option` as well.) ```rust,ignore let result = select!(Vec |