v0.0.27 is a macOS / AppKit release.
That is the supported path. Other platforms are not recommended; wait for a later version.
sqlite
Idiomatic SQLite. Connection / Statement, Result errors, owned column text. Drop closes the connection and finalizes statements.
import "sqlite/sqlite" as sqlite;
import "stdlib/result" as result;
guard let result::Result[sqlite::Connection, sqlite::Error]::Ok(db) =
sqlite::Connection::open_memory() else {
return 1;
};
let _n: result::Result[i64, sqlite::Error] =
db.execute("create table t(id integer primary key, name text)");
Connection::open / open_memory, execute, prepare, 1-based bind, 0-based columns. For a call the idiomatic layer does not wrap, raw_handle() reaches the generated sqlite_ffi binding of sqlite3.h. sqlite_ffi is not an application API.
[dependencies]
sqlite = "*"