Skip to content

Comments

feat: add has_metadata_key to bd query DSL#2

Open
turian wants to merge 2 commits intofeat/metadata-queryablefrom
feat/metadata-has-key-dsl
Open

feat: add has_metadata_key to bd query DSL#2
turian wants to merge 2 commits intofeat/metadata-queryablefrom
feat/metadata-has-key-dsl

Conversation

@turian
Copy link
Owner

@turian turian commented Feb 20, 2026

Summary

  • Add has_metadata_key=<keyname> field to the bd query DSL
  • Works in filter mode (AND chains) and predicate mode (OR queries)
  • Added to KnownFields registry for documentation
  • Reuses existing IssueFilter.HasMetadataKey and SQL JSON_EXTRACT IS NOT NULL

Base: feat/metadata-queryable (PR steveyegge#1908 against upstream)

Test plan

  • TestEvaluatorHasMetadataKeyQueries — 4 cases: basic, combined with status, OR predicate, invalid key
  • TestHasMetadataKeyPredicateEvaluation — predicate mode with key present, absent, and OR fallback

🤖 Generated with Claude Code

turian and others added 2 commits February 19, 2026 22:34
Add SQL-level metadata filtering using Dolt's JSON_EXTRACT and
JSON_UNQUOTE functions, with strict key validation to prevent
JSON path injection.

New CLI flags for bd list and bd search:
  --metadata-field key=value  (repeatable, AND semantics)
  --has-metadata-key key      (existence check)

New bd query DSL support:
  metadata.team = "platform"
  metadata.sprint = "Q1" AND metadata.team = "platform"

Implements GH#1406.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support metadata existence checks in the query DSL:
  bd query "has_metadata_key=team AND status=open"

Completes the list/search/query triangle for metadata existence
filtering. Uses existing IssueFilter.HasMetadataKey field and
SQL-level JSON_EXTRACT IS NOT NULL from PR2.

Implements GH#1406.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@turian turian force-pushed the feat/metadata-queryable branch from 58f05e6 to ca318fe Compare February 22, 2026 20:58
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.

1 participant