Skip to content

Persistence Query — multi-tag filter (intersect / union) #90

@pathosDev

Description

@pathosDev

`PersistenceQuery.eventsByTag` (#36) returns events with a single tag. Real workloads often want to combine tags: "all events tagged `type:Order` AND `tenant:t1`" or "tagged either `tenant:t1` OR `tenant:t2`".

Today users have to:

  • Query each tag separately and merge in app code.
  • Or (worse) emit pre-combined synthetic tags at write time.

API sketch:

```ts
query.eventsByTag({ all: ['type:Order', 'tenant:t1'] }) // intersect
query.eventsByTag({ any: ['tenant:t1', 'tenant:t2'] }) // union
query.eventsByTag({ all: ['type:Order'], not: ['archived'] }) // exclusion
```

Scope:

Out of scope:

  • Time-range filters combined with tags — separate sub-issue if needed.

Estimate: 1-2 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowNice-to-have / niche / demand-driven

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions