You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EQL v4 has no range query domains or eql_v4.between, so a Between term has no SQL operand #1237
EQL (Encrypt Query Language) is the SQL library CipherStash installs into a customer's PostgreSQL. It stores encrypted values and lets the database search them. Stack Encrypt writes into EQL v4's types (ADR-0002). ADR-0009 decision 7 makes a BETWEEN query one term carrying both bounds, so a caller can't pair a bound from one column with a bound from another.
a range query domain beside each ordered query domain, ORE and OPE, for example query_integer_range_ore beside query_integer_ord_ore.
Neither exists. No SQL under packages/eql/src defines a *_range_ore or *_range_ope domain, or an eql_v4.between function (checked on next). Stack Encrypt's Between already derives one RangeQuery term holding both bounds (#1208). Once the ordered types are producible, a caller will hold a Between term with no SQL operand to bind it to. The only fallback is two separate comparisons, which loses the one-term guarantee.
Proposal
Add a range query domain for each ordered query domain, ORE and OPE, one per (family, term) as decision 8 has it. Generate them through eql-codegen with the rest of the catalog.
Add eql_v4.between(column, range), inclusive at both ends, inlinable so an index on the order term is used (decision 7's inlining requirement). Do this for ORE and OPE.
Generate the Rust and Go types for the range domains, so a Between term binds as one parameter.
SQLx tests: rows inside, outside and at both bounds, and that the planner uses the functional index.
Activity