|
|
2 days ago | |
|---|---|---|
| .. | ||
| showcase | 2 days ago | |
| tests | 2 days ago | |
| .gitignore | 3 days ago | |
| README.md | 2 days ago | |
| SQLite.def | 2 days ago | |
| run.sh | 2 days ago | |
This is the first end-to-end V3 C binding test, not a replacement for
the full m2SQLITE binding.
Current surface:
sqlite3_open
sqlite3_exec
sqlite3_close
sqlite3_prepare_v2
sqlite3_bind_int
sqlite3_bind_text
sqlite3_step
sqlite3_column_int
sqlite3_column_text
sqlite3_finalize
SQLiteOk
SQLiteRow
SQLiteDone
The smoke tests open an in-memory database, execute SQL, bind
parameters, read a row and close the handle. The showcase
(showcase/SQLiteShowcase.mod) exercises the complete current surface
and prints:
1: Ada
2: Grace
./run.sh
The script uses pkg-config --libs sqlite3 when available; otherwise it
links the versioned runtime library directly:
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
That fallback matters on systems with the SQLite runtime installed but
without libsqlite3-dev.
sqlite3_open, sqlite3_exec, prepare and bind_text exercise the
C string ABI.VAR db : ADDRESS / VAR stmt : ADDRESS exercise opaque C handles.sqlite3_column_text returns CStr.CString, converted with
CStr.Copy.SQLiteTransient() supplies the SQLITE_TRANSIENT sentinel so SQLite
copies bound text; passing NIL means SQLITE_STATIC and requires the
caller's buffer to remain alive.SQLitePrepared.mod.showcase/SQLiteShowcase.mod.m2SQLITE definition remains the source for later API
coverage; error strings, column types, resets and callbacks are next.