|
@@ -6,8 +6,8 @@ Status update 2026-10-27: parameter introspection
|
|
|
(`sqlite3_bind_parameter_count/name/index`), statement
|
|
(`sqlite3_bind_parameter_count/name/index`), statement
|
|
|
metadata/diagnostics, BLOB error handling and extended constraint
|
|
metadata/diagnostics, BLOB error handling and extended constraint
|
|
|
codes are implemented. Covered by `tests/SQLiteParams.mod`,
|
|
codes are implemented. Covered by `tests/SQLiteParams.mod`,
|
|
|
-`tests/SQLiteIntrospection.mod`, `tests/SQLiteBlobErrors.mod` and
|
|
|
|
|
-`tests/SQLiteConstraints.mod`.
|
|
|
|
|
|
|
+`tests/SQLiteIntrospection.mod`, `tests/SQLiteBlobErrors.mod`,
|
|
|
|
|
+`tests/SQLiteConstraints.mod` and `tests/SQLiteBackup.mod`.
|
|
|
|
|
|
|
|
This note records which existing tests are useful for hardening the V3
|
|
This note records which existing tests are useful for hardening the V3
|
|
|
SQLite binding under `bindings/sqlite3`, and which APIs they would drive.
|
|
SQLite binding under `bindings/sqlite3`, and which APIs they would drive.
|
|
@@ -16,7 +16,7 @@ SQLite binding under `bindings/sqlite3`, and which APIs they would drive.
|
|
|
|
|
|
|
|
| Source | Count | Notes |
|
|
| Source | Count | Notes |
|
|
|
|---|---:|---|
|
|
|---|---:|---|
|
|
|
-| `bindings/sqlite3/tests` | 8 | Current V3 tests: smoke, prepared, scalar, errors, BLOB, connection, callback, hooks |
|
|
|
|
|
|
|
+| `bindings/sqlite3/tests` | 13 | Current V3 tests: smoke, prepared, params, introspection, scalar, errors, BLOB, BLOB errors, constraints, backup, connection, callback, hooks |
|
|
|
| sibling `m2SQLITE/tests` | 7 | Original GNU Modula-2 binding tests; closest existing coverage |
|
|
| sibling `m2SQLITE/tests` | 7 | Original GNU Modula-2 binding tests; closest existing coverage |
|
|
|
| sibling `m2SQLITE/sqlite-master/test` | 1,195 `.test` files | Upstream SQLite TCL regression suite; useful as a specification |
|
|
| sibling `m2SQLITE/sqlite-master/test` | 1,195 `.test` files | Upstream SQLite TCL regression suite; useful as a specification |
|
|
|
| `compiler/tests` | 806 files | Compiler/ABI tests; not SQLite-specific, but several guard binding prerequisites |
|
|
| `compiler/tests` | 806 files | Compiler/ABI tests; not SQLite-specific, but several guard binding prerequisites |
|
|
@@ -29,9 +29,14 @@ harness.
|
|
|
|
|
|
|
|
- `SQLiteSmoke.mod`
|
|
- `SQLiteSmoke.mod`
|
|
|
- `SQLitePrepared.mod`
|
|
- `SQLitePrepared.mod`
|
|
|
|
|
+- `SQLiteParams.mod`
|
|
|
|
|
+- `SQLiteIntrospection.mod`
|
|
|
- `SQLiteScalar.mod`
|
|
- `SQLiteScalar.mod`
|
|
|
- `SQLiteErrors.mod`
|
|
- `SQLiteErrors.mod`
|
|
|
- `SQLiteBlob.mod`
|
|
- `SQLiteBlob.mod`
|
|
|
|
|
+- `SQLiteBlobErrors.mod`
|
|
|
|
|
+- `SQLiteConstraints.mod`
|
|
|
|
|
+- `SQLiteBackup.mod`
|
|
|
- `SQLiteConnection.mod`
|
|
- `SQLiteConnection.mod`
|
|
|
- `SQLiteCallback.mod`
|
|
- `SQLiteCallback.mod`
|
|
|
- `SQLiteHooks.mod`
|
|
- `SQLiteHooks.mod`
|
|
@@ -42,11 +47,11 @@ harness.
|
|
|
|---|---|---|
|
|
|---|---|---|
|
|
|
| `test_prepare.mod` | `bind_parameter_count/index`, named parameters, 64-bit bind, scalar round trip | Implemented in `SQLiteParams.mod` |
|
|
| `test_prepare.mod` | `bind_parameter_count/index`, named parameters, 64-bit bind, scalar round trip | Implemented in `SQLiteParams.mod` |
|
|
|
| `test_func.mod` | scalar/aggregate UDFs, auxdata, numeric type, `result_value`, 64-bit text/blob, zeroblob, error paths | Missing several callback/result APIs |
|
|
| `test_func.mod` | scalar/aggregate UDFs, auxdata, numeric type, `result_value`, 64-bit text/blob, zeroblob, error paths | Missing several callback/result APIs |
|
|
|
-| `test_blob.mod` | read-only BLOB write error, reopen, backup API, backup to file | Read-only/bounds/expiry covered; backup remains |
|
|
|
|
|
|
|
+| `test_blob.mod` | read-only BLOB write error, reopen, backup API, backup to file | Read-only/bounds/expiry and memory backup covered; file backup remains |
|
|
|
| `test_codes.mod` | extended constraint codes (unique/not-null/PK/FK), `get_table` | Extended codes implemented; `get_table` remains |
|
|
| `test_codes.mod` | extended constraint codes (unique/not-null/PK/FK), `get_table` | Extended codes implemented; `get_table` remains |
|
|
|
| `test_exec.mod` | exec, change counters, rowid, error capture | Already covered by current V3 tests |
|
|
| `test_exec.mod` | exec, change counters, rowid, error capture | Already covered by current V3 tests |
|
|
|
| `test_open.mod` | `open` / `open_v2` / close and `errcode` | Already covered by current V3 tests |
|
|
| `test_open.mod` | `open` / `open_v2` / close and `errcode` | Already covered by current V3 tests |
|
|
|
-| `test_version.mod` | `sqlite3_libversion*` | Missing version APIs |
|
|
|
|
|
|
|
+| `test_version.mod` | `sqlite3_libversion*` | Implemented in `SQLiteIntrospection.mod` |
|
|
|
|
|
|
|
|
## Upstream SQLite tests worth mining
|
|
## Upstream SQLite tests worth mining
|
|
|
|
|
|
|
@@ -69,11 +74,11 @@ harness.
|
|
|
|---|---|---|
|
|
|---|---|---|
|
|
|
| `func.test` … `func9.test` | function arg counts, NULLs, destructors, auxdata, aggregates, result types | aggregate/auxdata APIs, more result writers |
|
|
| `func.test` … `func9.test` | function arg counts, NULLs, destructors, auxdata, aggregates, result types | aggregate/auxdata APIs, more result writers |
|
|
|
| `errors`/`errmsg.test` | error text and error offsets | `sqlite3_error_offset`, error-message behavior |
|
|
| `errors`/`errmsg.test` | error text and error offsets | `sqlite3_error_offset`, error-message behavior |
|
|
|
-| `fkey1.test` … `fkey9.test` | foreign-key and not-null constraint codes | missing extended-code constants |
|
|
|
|
|
|
|
+| `fkey1.test` … `fkey9.test` | foreign-key and not-null constraint codes | Implemented in `SQLiteConstraints.mod` |
|
|
|
| `openv2.test`, `uri.test`, `uri2.test` | open flags, URI filenames, read-only opens | `open_v2` flags and URI behavior |
|
|
| `openv2.test`, `uri.test`, `uri2.test` | open flags, URI filenames, read-only opens | `open_v2` flags and URI behavior |
|
|
|
| `limit.test`, `limit2.test` | `sqlite3_limit` | connection limits |
|
|
| `limit.test`, `limit2.test` | `sqlite3_limit` | connection limits |
|
|
|
| `trans.test`, `trans2.test`, `trans3.test`, `rollback.test` | transaction boundaries and hooks | commit/rollback hook ordering |
|
|
| `trans.test`, `trans2.test`, `trans3.test`, `rollback.test` | transaction boundaries and hooks | commit/rollback hook ordering |
|
|
|
-| `backup.test`, `backup2.test`, `backup4.test`, `backup5.test` | online backup and incremental backup | backup API |
|
|
|
|
|
|
|
+| `backup.test`, `backup2.test`, `backup4.test`, `backup5.test` | online backup and incremental backup | Core API implemented; file backup remains |
|
|
|
| `attach.test`, `attach2.test` | multiple attached databases | BLOB `zDb` values, future helpers |
|
|
| `attach.test`, `attach2.test` | multiple attached databases | BLOB `zDb` values, future helpers |
|
|
|
|
|
|
|
|
### Later / not useful yet
|
|
### Later / not useful yet
|
|
@@ -119,9 +124,9 @@ Cases:
|
|
|
- `clear_bindings`
|
|
- `clear_bindings`
|
|
|
- `LONGINT` value such as `9000000001`
|
|
- `LONGINT` value such as `9000000001`
|
|
|
|
|
|
|
|
-### 2. Extend `SQLiteBlob.mod`
|
|
|
|
|
|
|
+### 2. `SQLiteBlobErrors.mod` — implemented 2026-10-27
|
|
|
|
|
|
|
|
-Port from `incrblob-3.*`, `incrblob-4.*` and `test_blob.mod`.
|
|
|
|
|
|
|
+Ported from `incrblob-3.*`, `incrblob-4.*` and `test_blob.mod`.
|
|
|
|
|
|
|
|
Cases:
|
|
Cases:
|
|
|
|
|
|
|
@@ -145,11 +150,9 @@ Cases:
|
|
|
- authorizer action arguments
|
|
- authorizer action arguments
|
|
|
- busy handler actually invoked by a second connection
|
|
- busy handler actually invoked by a second connection
|
|
|
|
|
|
|
|
-### 4. Extended-code tests
|
|
|
|
|
|
|
+### 4. Extended-code tests — implemented 2026-10-27
|
|
|
|
|
|
|
|
-Port from `m2SQLITE/tests/test_codes.mod`.
|
|
|
|
|
-
|
|
|
|
|
-Add constants and tests for:
|
|
|
|
|
|
|
+Ported from `m2SQLITE/tests/test_codes.mod` into `SQLiteConstraints.mod`.
|
|
|
|
|
|
|
|
- `SQLiteConstraintNotNull` = 1299
|
|
- `SQLiteConstraintNotNull` = 1299
|
|
|
- `SQLiteConstraintForeignKey` = 787
|
|
- `SQLiteConstraintForeignKey` = 787
|
|
@@ -159,11 +162,10 @@ Add constants and tests for:
|
|
|
### 5. Later slices
|
|
### 5. Later slices
|
|
|
|
|
|
|
|
- aggregate functions + auxdata (`test_func.mod`, `func*.test`)
|
|
- aggregate functions + auxdata (`test_func.mod`, `func*.test`)
|
|
|
-- backup API (`test_blob.mod`, `backup*.test`)
|
|
|
|
|
-- version/sourceid/threadsafe (`test_version.mod`)
|
|
|
|
|
|
|
+- file-to-file backup coverage (`backup*.test`)
|
|
|
- `sqlite3_get_table` / `free_table`
|
|
- `sqlite3_get_table` / `free_table`
|
|
|
-- statement metadata (`sqlite3_sql`, `expanded_sql`, `stmt_readonly`, `stmt_busy`)
|
|
|
|
|
-- limits, autocommit and error offsets
|
|
|
|
|
|
|
+- extension loading and WAL/checkpoint helpers
|
|
|
|
|
+- deeper progress/authorizer/busy cases from upstream tests
|
|
|
|
|
|
|
|
## Related session note
|
|
## Related session note
|
|
|
|
|
|