cadrumo.application.ledger.review_filter module

The one projection from an operator filter spec onto a Ledger review query.

Two verbs resolve the same --filter clauses – the review listing and the transaction listing that narrows by review state – and if each mapped the spec onto its own query, the identical clauses could select different rows on the two surfaces. The mapping therefore has one home.

It sits in the Ledger package rather than beside the spec because the direction of the dependency is already fixed: models imports the spec’s status enum, so the spec’s module cannot import the query type back without a cycle.

ledger_review_query_for_spec(spec, *, bucket_id, transaction_id=None)[source]

Project one parsed operator filter spec onto its LedgerReviewQuery.

The single home for the spec-to-query field mapping, shared by ledger list’s review-spec narrowing and the ledger review verb, so the two surfaces cannot resolve the same --filter clauses differently.

Return type:

LedgerReviewQuery

Parameters: