A query MUST be exactly one statement that only reads, judged by the guard of the SQL language library (@intellectual-frontiers/lang-sql/aide/guard, lang-sql 0012-sql-guard) with the parser of the catalog's dialect and the places of its parameters read as NULL: a query that holds a second statement, a data change, a definition, a SELECT ... INTO, a locking clause, a call of a function that sleeps, reads a file, takes a lock or changes a sequence, or a command, MUST be refused as an error value whose reason is the guard's sentence; a word of a write in a string literal, a quoted name, a dollar-quoted string or a comment is not a write.
Enforced (check): .github: cd commons/data && bun run verify — suite/queries.test.ts: a catalog is made from names by their words, and an unknown name, a duplicate, an undeclared parameter and anything that is not one read-only statement are errors as values
Proved by: data/suite/queries.test.ts
Written in: data/sql/extensions/queries/catalog.ts
Tests: passed: suite/queries.test.ts a catalog is made from names by their words, and an unknown name, a duplicate, an undeclar
Cited by: sql/extensions/queries/catalog