Skip to content

feat(query): Map hasKey/hasValue/hasKeyValue filter ops - #875

Open
omegent-app[bot] wants to merge 1 commit into
feat/query-native-encoded-typesfrom
feat/query-map-has-ops
Open

feat(query): Map hasKey/hasValue/hasKeyValue filter ops#875
omegent-app[bot] wants to merge 1 commit into
feat/query-native-encoded-typesfrom
feat/query-map-has-ops

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #874. JSON-encoded maps are arrays of [key, value] tuples, so Cosmos, Postgres, SQLite, and memory can filter them.

Query DSL additions on ReadonlyMap fields:

  • hasKey / notHasKey
  • hasValue / notHasValue
  • hasKeyValue / notHasKeyValue (pair is readonly [K, V])
  • *-any / *-all variants for multiple keys, values, or pairs

Adapters compile these against the encoded tuple array (EXISTS / p[0] / p[1] in Cosmos, json_each + $[0]/$[1] in SQLite, jsonb_array_elements in Postgres, in-memory after toCodecJson).

Stacked on #874 (feat/query-native-encoded-types).

opened by patroza in chat thread Discord · Discord · T3


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

JSON-encoded maps are arrays of [key, value] tuples. Add hasKey,
hasValue, hasKeyValue (and not*/any/all variants) on the query DSL,
implemented in memory, SQLite, Postgres, and Cosmos.

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@omegent-app
omegent-app Bot marked this pull request as ready for review August 22, 2026 10:36
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.

0 participants