The V3 SQLite binding under bindings/sqlite3 now covers the core
connection, statement, scalar, BLOB, callback and hook APIs.
Binding code is committed through:
9dd2a80 bindings: add SQLite connection hooks
9df09ae bindings: add SQLite callback support
0f235a1 bindings: add SQLite BLOB and connection APIs
5d5faa1 bindings: add SQLite scalar and error APIs
f40a026 bindings: add SQLite showcase
ae7ce54 bindings: add SQLite prepared statements
d3be70c bindings: add SQLite open/exec/close smoke test
The binding tests and showcase pass. The compiler gate is 323/323.
master is one commit ahead of origin/master at the time of writing.
sqlite3_open_v2, close_v2, open flagssqlite3_bind_int64, bind_double, bind_nullsqlite3_reset, clear_bindingssqlite3_column_count, data_count, column_type, column_bytessqlite3_column_int64, double, name, decltypesqlite3_exec VAR errmsgsqlite3_bind_blob, bind_zeroblobsqlite3_column_blobsqlite3_blob_open, blob_close, blob_read, blob_write,
blob_bytes, blob_reopensqlite3_changes, total_changes, last_insert_rowidsqlite3_exec row callbacks (char **argv / char **colNames)sqlite3_create_function_v2sqlite3_value_* and sqlite3_result_* scalar familiesSQLiteArrayAt to index C pointer arrayssqlite3_busy_timeout, busy_handler, interruptsqlite3_progress_handlersqlite3_trace_v2sqlite3_update_hooksqlite3_commit_hook, rollback_hooksqlite3_set_authorizersqlite3_db_handleSQLiteOp*, SQLiteAuth*, SQLiteTrace* constantsCurrent binding tests in bindings/sqlite3/tests:
SQLiteSmoke.mod — open/exec/closeSQLitePrepared.mod — prepared insert/selectSQLiteScalar.mod — scalar types and column metadataSQLiteErrors.mod — errcode/errmsg/extended codes/freeSQLiteBlob.mod — bind/column/incremental BLOB, zeroblobSQLiteConnection.mod — open_v2/close_v2/changes/rowid/read-onlySQLiteCallback.mod — exec callbacks and scalar UDFsSQLiteHooks.mod — busy/progress/trace/update/commit/rollback/authShowcase output remains:
1: Ada
2: Grace
ADDRESS; no by-value struct ABI.sqlite3_exec takes VAR errmsg : ADDRESS; non-NIL messages are
caller-owned and freed with sqlite3_free.SQLiteTransient() supplies SQLITE_TRANSIENT; bound text/BLOB data
is copied by SQLite.ADR(a[0]), not ADR(a).
ADR(a) points at the V3 array descriptor.sqlite3_update_hook / commit_hook return the previous hook
pointer; assign it to an ADDRESS.sqlite3_set_authorizer returns SQLiteAuthOk,
SQLiteAuthDeny or SQLiteAuthIgnore.The full analysis is saved at:
bindings/sqlite3/TEST-INVENTORY.md
Sources examined:
m2SQLITE/tests — 7 original GNU Modula-2 binding testsm2SQLITE/sqlite-master/test — 1,195 upstream SQLite testscompiler/tests — 806 compiler/ABI tests, not SQLite-specificHighest-value items identified:
m2SQLITE/tests/test_prepare.mod + upstream bind.test —
parameter count/name/index, unbound parameters as NULL, reset/reuse,
64-bit values.incrblob*.test + m2SQLITE/tests/test_blob.mod — read-only BLOB
writes, invalid opens, bounds, handle invalidation, backup.m2SQLITE/tests/test_codes.mod — not-null/foreign-key/check
extended codes, get_table.test_func.mod / upstream func*.test — aggregates, auxdata,
more result writers and error paths.auth.test, busy.test, progress.test, trace.test — deeper
hook semantics.Add:
sqlite3_bind_parameter_countsqlite3_bind_parameter_namesqlite3_bind_parameter_indexwith a new SQLiteParams.mod ported from test_prepare.mod and
bind.test. This is the smallest high-value gap in the current
binding.
Then extend BLOB and hook tests with the upstream error/abort cases.
cd bindings/sqlite3
./run.sh
cd ../../compiler
./run_tests.sh # expect 323/323
sqlite3_get_table / free_tablesql, expanded_sql, readonly, busy)