A SELECT MUST be run as osqueryi --json "<sql>" through the function the caller gives that runs a program (so that the library depends on no runtime, and ssh host osqueryi is a prefix), its rows MUST have the types of the schema (osquery prints every value as text), a table that is not on the platform MUST be a typed error that says where it is, and what osquery says (a table it does not have, a failure, output that is not a list of rows) MUST be an error value; the driver MUST reject with the typed error.
Enforced (check): .github: cd commons/data && bun run verify — suite/osquery.test.ts: a SELECT runs as `osqueryi --json`, its rows have the types of the schema, a table that is not on the platform is a typed error that says where it is, and what osquery says (a missing table, a failure, output that is not JSON) is an error value; suite/osquery.test.ts: where osqueryi is installed it is run for real: the machine's own users are rows of the types the schema gives
Proved by: data/suite/osquery.test.ts
Written in: data/sql/extensions/osquery/driver.ts
Tests: passed: suite/osquery.test.ts a SELECT runs as `osqueryi --json`, its rows have the types of the schema, a table that is; passed: suite/osquery.test.ts where osqueryi is installed it is run for real: the machine's own users are rows of the ty
Cited by: Data, sql/extensions/osquery/driver