On each of SQLite, PostgreSQL (PGlite and a real server) and DuckDB the store MUST pass every case of the suite its capabilities name and the merge suite of AnyFS.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
Tests: passed: suite/dialects.test.ts on duckdb the store passes every case of the suite its capabilities name, and the merge su; passed: suite/dialects.test.ts on postgres the store passes every case of the suite its capabilities name, and the merge ; passed: suite/dialects.test.ts on sqlite the store passes every case of the suite its capabilities name, and the merge su
Search MUST be offered where the engine has full-text search (SQLite FTS5, PostgreSQL tsvector with an inverted index), the caller MUST NOT be able to write an operator of the engine's query language, and an engine with no search (DuckDB) MUST say so and offer none.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
Replicas of SQLite, PostgreSQL and DuckDB that edit the same paths MUST exchange rows through a medium and merge pairwise, and all MUST end with the same files and the same siblings.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
The dumps the library writes for PostgreSQL (INSERT ... ON CONFLICT DO NOTHING) and for DuckDB (INSERT OR IGNORE), replayed in any order, twice and overlapping, MUST give the union of the rows, the same files as the merge by deltas.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
A dump MUST be written again for another engine from its text (redump), and the dump of the real sqlite3 written for PostgreSQL or DuckDB and the dump the library writes for each MUST give the same files in the other engine.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
A DuckDB database has no trigger: the import of the library MUST hold what a trigger holds elsewhere, so that a replica the database does not trust refuses the whole replay and a row an epoch collected is not written; what a raw import into DuckDB cannot be made to hold MUST be said.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
On a real PostgreSQL server (made for the run, or named by ANYFS_SQL_TEST_PG) the store MUST pass the suites too, writers on pooled connections MUST be serialised so that a check and its write are one step, and where no server can be made the test MUST be skipped with a sentence that says what is missing.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
The dumps of the real pg_dump (--data-only --inserts --on-conflict-do-nothing) of several real databases, replayed by the real psql and by the library in any order, twice and overlapping, MUST be the union of the rows, and a dump of the real sqlite3 written for PostgreSQL and replayed by psql MUST give the same files.
Enforced (check): .github: cd commons/anyfs-sql && bun run verify — suite/dialects.test.ts
Tests: passed: suite/dialects.test.ts a dump of the real sqlite3 written for PostgreSQL and replayed by the real psql gives the ; passed: suite/dialects.test.ts the dumps of the real pg_dump (data only, inserts, on conflict do nothing) of several real
Given three real PostgreSQL databases that each took different rows, When their pg_dump outputs are replayed by psql into a fourth in any order, Then it holds the union, per FR-008.
Given replicas on SQLite, PostgreSQL and DuckDB with edits to one path, When they merge pairwise, Then all show the same winner and the same siblings, per FR-003.
A schema the connection does not start in: the functions of PostgreSQL name their schema, so that a dump replayed with an empty search path still finds its tables (FR-008).