Skip to content

stack-encrypt: ordering operators Lt, Lte, Gt, Gte and Between, and remove QueryUsing::index #1186

Open

Description

@coderdan

Background

ADR-0009 decisions 1 and 7 add the ordering operators Lt, Lte, Gt, Gte and Between. Between is one query term carrying both ORE left ciphertexts, inclusive at both ends, bound in SQL as col BETWEEN $1 AND $2.

Problem

stack-encrypt queries ORE and OPE only by naming the index (.index(Ore)), and an ORE query term today is the whole CLLW ciphertext rather than the left half. EQL v4 stores block ORE terms, which the engine does not derive yet (#1140).

Proposal

  • The operator types Lt, Lte, Gt, Gte and Between, with Supports on the ORE and OPE indexes for the integer types they order.
  • Between as one term exposing its two bounds, refusing lo > hi.
  • Remove QueryUsing::index(..), now that every index a plan can declare is reachable through an operator.
  • ADR-0009's code matches what this ships.

Blocked by

Related

Metadata

Metadata

Assignees

Labels

SDKenhancementNew feature or requestrustPull requests that update Rust code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions