Context
#621 adds EQL v3 encrypted JSON (types.Json) with containment querying only — ops.contains(col, subObject) emitting the @> operator with a query_jsonb needle.
EQL v3 supports a second JSON query form that #621 does not implement: JSONPath selector with a constraint, e.g.
foo->'bar' = $1
foo->'wee' > $1
The eql_v3_json domain ships the operators for it — ->(text|int) and ->>(text|int) — and encryptQuery(value, { queryType: 'searchableJson' }) already auto-infers a selector term for string (JSONPath) needles. What's missing is the adapter surface: the v3 Drizzle operators expose no ->/->> selector, so a selector-with-constraint query can't be expressed, and there are no tests for it.
Proposed change
- Add selector operators (
-> / ->>) to the v3 Drizzle integration for types.Json columns.
- Compose the extracted selector value with the existing comparison operators so
col->'bar' = $1 / col->'wee' > $1 work end-to-end.
- Add a live oracle + tests (mirroring
json-contains.integration.test.ts).
- Document the pattern in
skills/stash-encryption / skills/stash-drizzle.
Notes
https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Context
#621 adds EQL v3 encrypted JSON (
types.Json) with containment querying only —ops.contains(col, subObject)emitting the@>operator with aquery_jsonbneedle.EQL v3 supports a second JSON query form that #621 does not implement: JSONPath selector with a constraint, e.g.
The
eql_v3_jsondomain ships the operators for it —->(text|int) and->>(text|int) — andencryptQuery(value, { queryType: 'searchableJson' })already auto-infers a selector term for string (JSONPath) needles. What's missing is the adapter surface: the v3 Drizzle operators expose no->/->>selector, so a selector-with-constraint query can't be expressed, and there are no tests for it.Proposed change
->/->>) to the v3 Drizzle integration fortypes.Jsoncolumns.col->'bar' = $1/col->'wee' > $1work end-to-end.json-contains.integration.test.ts).skills/stash-encryption/skills/stash-drizzle.Notes
https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w