Skip to content

feat(repo): add ID-only filtered listings - #296

Draft
nicolasburtey wants to merge 1 commit into
mainfrom
feat/id-only-filter-listings
Draft

nicolasburtey wants to merge 1 commit into
mainfrom
feat/id-only-filter-listings

Conversation

@nicolasburtey

Copy link
Copy Markdown
Member

Summary

Add an opt-in list_ids_for_filters repo option that generates list_ids_for_filters_by_id and _in_op variants for batch workers.

  • Reuse the existing physical/virtual filters, scope dispatch, ID cursors, and first + 1 lookahead.
  • Return PaginatedQueryRet<EntityId, EntityByIdCursor> without joining the events table or hydrating entities.
  • Support standalone, transactional, and bound scoped-view calls.
  • Keep the capability opt-in so existing repos and generated queries are unchanged.
  • Document why non-ID sort columns are excluded: their cursors also need the sort value.

Downstream validation

Validated against Lana PR #10131 by switching the deposit-interest sweep to list_ids_for_filters_by_id_in_op. The generated Lana queries select DepositAccountId without joining core_deposit_account_events.

  • cargo check -p core-deposit against this branch.
  • cargo nextest run -p core-deposit interest_listing_filters_eligibility_before_pagination — passed.

Verification

  • cargo test -p es-entity-macros --lib — 268 passed.
  • cargo test --test virtual_filter_value --test virtual_filter_value_scoped — 7 passed.
  • cargo test --workspace --no-run — passed.
  • cargo clippy -p es-entity-macros --lib -- -D warnings — passed.
  • cargo nextest run — 409 passed; one unrelated pre-existing trybuild diagnostic-text mismatch in id_source_is_sealed.rs.
  • cargo fmt --all --check and git diff --check — passed.

Workspace Clippy also reports two unrelated existing useless_conversion warnings in src/query.rs.

Add an opt-in list_ids_for_filters repo capability for batch workers
that need matching IDs without hydrating complete event histories.

Reuse existing filters, scopes, cursors, and lookahead while projecting IDs
directly, and cover both directions and scoped views.

This branch has not been deployed

No deployments
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