Skip to content

docs: EQL 2.3 — query coverage + reference-page fixes#22

Open
coderdan wants to merge 4 commits into
docs/eql-2.3-index-query-recipesfrom
docs/eql-2.3-query-coverage
Open

docs: EQL 2.3 — query coverage + reference-page fixes#22
coderdan wants to merge 4 commits into
docs/eql-2.3-index-query-recipesfrom
docs/eql-2.3-query-coverage

Conversation

@coderdan
Copy link
Copy Markdown
Contributor

@coderdan coderdan commented May 20, 2026

Draft — stacked on #21; hold until eql-2.3.0 final. Base is docs/eql-2.3-index-query-recipes (PR #21) so the diff shows only this PR's additions; GitHub retargets it to main once #21 merges.

Why

The encryption query docs and the EQL reference pages had drifted from EQL 2.3: queries.mdx covered only equality/match/range, eql-guide.mdx's Functions section listed names that don't exist, cipher-cell.mdx described the v2.2 payload, and drizzle.mdx mis-stated where sorting is available.

Changes

queries.mdx

  • JSONB — expanded the path/containment stub into containment (@>), field access (->), field equality & ordering, and path queries.
  • GROUP BY / DISTINCT — new section: group/deduplicate encrypted columns by HMAC term; group a JSON field via eql_v2.eq_term(col -> '<selector>').
  • Joins — new section: equality joins on encrypted columns via the hash operator class.

eql-guide.mdx

  • Replaced fabricated function names (encrypted_eq, encrypted_get_hmac_256, add_column, …) with the real groups + a pointer to the generated /stack/reference/eql/ reference. Fixed three broken anchors; corrected "B-tree for exact".

cipher-cell.mdx

  • Realigned with the v2.3 payload schema (eql-payload-v2.3.schema.json): added the k discriminator, removed b3, collapsed ocf/ocvoc, re-scoped a as an STE-vector-element field, corrected the sv element shape, fixed three broken anchors.

drizzle.mdx

  • Fixed the sort/operator-class callout — sorting is gated on operator-class support (most providers, incl. AWS RDS — not Supabase), not a self-hosted-vs-managed split; dropped the non-existent --exclude-operator-family flag.

Verify before merge

  • JSONB containment formeql_v2.jsonb_array(col) @> eql_v2.jsonb_array($1) (consistent with docs(encryption): align index & query recipes with EQL 2.3 #21). EQL 2.3 also has a typed stevec_query @> path; confirm which is the public recipe.
  • Field equality / orderingWHERE metadata -> 'role' = $1::eql_v2.ste_vec_entry and ORDER BY eql_v2.ore_cllw(metadata -> 'created_at'). Confirm the cast.
  • GROUP BY — requires the column's unique (HMAC) index config; confirm.
  • Joins — confirm cross-column joins work and phrase the keyset/config-compatibility requirement precisely.
  • SDK / Drizzle surfaceclient.encryptQuery for JSONB, encryptionOps.jsonbPathExists, .innerJoin() — confirm against the current @cipherstash/stack API.
  • eql-guide config functionseql_v2.config_add_table/_column/_index/_cast — confirm that is the intended public config API.
  • cipher-cell payload — field catalogue taken from eql-payload-v2.3.schema.json; confirm nothing outside that schema changed (envelope / integrity-hash details).

queries.mdx covered only equality, match, and range/order. Add the rest
of what encrypted columns support:

- JSONB — expand the thin path/containment stub into containment, field
  access (`->`), field equality and ordering, and path queries; cross-link
  the full operator reference in proxy/searchable-json.
- GROUP BY / DISTINCT — group and deduplicate encrypted columns by HMAC
  term; group a JSON field via eql_v2.eq_term(col -> '<selector>').
- Joins — equality joins on encrypted columns, satisfied by a hash join
  through the hash operator class.

Stacked on the EQL 2.3 recipe-fix branch (docs/eql-2.3-index-query-recipes).
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
public-docs Error Error May 20, 2026 12:57pm

Request Review

The Functions section listed fabricated names — `encrypted_eq`,
`encrypted_get_hmac_256`, `add_column`, `add_search_config` — none of
which exist in EQL. Replace the hand-maintained list with the real
function groups (`config_add_*`; the `hmac_256` / `bloom_filter` /
`ore_block_u64_8_256` extractors; the operators) and a pointer to the
generated /stack/reference/eql/ API reference, which can't drift.

Also: fix three broken cross-reference anchors into
searchable-encryption.mdx; correct "B-tree for exact" (equality uses a
hash functional index in 2.3); add the JSONB operators to the Operators
section and the rewritten index/query pages to Related.
@coderdan coderdan changed the title docs(encryption): GROUP BY, JOINs & fuller JSONB query coverage docs: EQL 2.3 query coverage (GROUP BY, joins, JSONB) + eql-guide fixes May 20, 2026
cipher-cell.mdx still described the v2.2 payload. Realign it with the
v2.3 on-the-wire schema (eql-payload-v2.3.schema.json):

- Add the `k` discriminator field (`ct` / `sv`) — previously undocumented.
- Remove `b3` (Blake3) — dropped everywhere in 2.3; STE-vector element
  equality now uses `hm`.
- Collapse `ocf` / `ocv` into the single `oc` (CLLW ORE) field; width is
  carried on the ciphertext via a leading domain-tag byte.
- Re-scope `a` (array marker) — it is an STE-vector element field, not a
  top-level field.
- Correct the `sv` element shape: an STE-vector element is not a full
  CipherCell — it carries `s` + `c` + optional `a` + exactly one of
  `hm` / `oc`.
- Fix three broken searchable-encryption anchors; fix the
  `eql_v2.encrypted` -> `eql_v2_encrypted` type name.
@coderdan coderdan changed the title docs: EQL 2.3 query coverage (GROUP BY, joins, JSONB) + eql-guide fixes docs: EQL 2.3 — query coverage + reference-page fixes May 20, 2026
The "sorting encrypted columns" callout claimed sorting is unavailable on
"managed databases (Supabase, RDS)" and referenced an
`--exclude-operator-family` install flag. AWS RDS does allow custom
operator classes — the real limitation is operator-class support, which
most providers permit (Supabase being the exception). Reword to match the
indexes/queries docs and drop the non-existent install flag.
@coderdan coderdan marked this pull request as ready for review May 20, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants