rails_query runs only on a database family it can guard

Status: accepted

rails_query promises two guards the database itself enforces: a read-only transaction and a statement timeout. Each database server spells both differently, and some cannot give one at all, so the tool runs a statement only where it knows the spelling. A database family is that knowledge: one per kind of database, told by the adapter's name, and the only place a database's read-only and timeout rules live. rails_query reads the name from the database's configuration, before any connection opens.

Decision

Consequences

Apps on SQL Server, Oracle or CockroachDB have no rails_query. On SQL Server and Oracle the LIMIT its row cap appends is a syntax error, so a query without its own row limit fails there. Supporting another database means adding a family with its own read-only and timeout spelling, verified against a real server.

Alternatives not taken