json_tree is missing from the EQL catalog, so no Go types are generated for it #1348
Description
Background
json_tree is the EQL v4 type family for an encrypted JSON document. EQL (Encrypt Query Language) is the SQL library installed into a customer's PostgreSQL database; Stack Encrypt is the Rust engine that encrypts the values EQL stores. The Rust engine and the SQL for json_tree are built in #1288, #1325, #1329 and #1336.
Every EQL type is listed in one catalog. eql-codegen reads that catalog to generate the Rust target table and the Go types in languages/golang/encrypt/eql/eql_gen.go. A Go program stores and queries EQL columns through those generated types.
Problem
The json_tree types were hand-written in packages/eql/crates/eql-bindings/src/v4/json_tree.rs and never added to the catalog. That file says so itself: the family is "not in the catalog yet, so it is not in super::all nor in the target table".
So:
- the Go SDK has no
eql.JSONTreetype to scan a column into; - the engine's guest cannot look the type up by name;
stashgencannot see that ajson_treefield must usenull=sql. A null document cannot be padded to a value's length, because documents have no single length.
Proposal
- Add the
json_treefamily to the catalog,v4::all()and the target table: the stored type, the query type, the leaf query type and the entry type. - Run
mise run types:generate, soeql_gen.gogainsJSONTree,JSONTreeQuery,JSONTreeLeafQueryandJSONTreeEntry. Each is marked not producible, with a reason that points at the data-plan issue. - Decide whether the selector, which is a text value, needs a generated or a hand-written Go type.
- Report the family as not fixed-width, so
stashgenrequiresnull=sql. - Gates:
types:check,go_eql_parityand theeql-codegentests.
Plan: docs/plans/2026-10-24-go-json-tree.md, step 1.
Activity
feat(eql): name the v4 JSON tree domains as v3 names its JSON document
feat(eql,stack-encrypt): name the v4 JSON document type JsonSearch, a…
docs(eql,stack-encrypt): record the v3 names the v4 JSON document takes
feat(eql): name the v4 JSON tree domains as v3 names its JSON document
feat(eql,stack-encrypt): name the v4 JSON document type JsonSearch, a…
docs(eql,stack-encrypt): record the v3 names the v4 JSON document takes