Part of #5110. Target repo: JasperFx/jasperfx for the interface, then small follow-up PRs in Marten and Polecat to implement it (tracked here).
The batched-query DCB surface is the one seed-suite seam with no JasperFx abstraction at all, and the two products expose the same operations at different paths:
- Marten:
batch.Events.EventsExist(query) / batch.Events.FetchForWritingByTags<T>(query) via IBatchEvents Events { get; } on IBatchedQuery (src/Marten/Services/BatchQuerying/IBatchedQuery.cs)
- Polecat:
batch.EventsExist(query) / batch.FetchForWritingByTags<T>(query) flat on its IBatchedQuery (src/Polecat/Batching/IBatchedQuery.cs)
Method names/signatures already match exactly — only the accessor path differs.
Proposal: add to JasperFx.Events something like
public interface IBatchedEventQueries
{
Task<bool> EventsExist(EventTagQuery query);
Task<IEventBoundary<T>> FetchForWritingByTags<T>(EventTagQuery query) where T : class;
}
with Marten's IBatchEvents and Polecat's IBatchedQuery (or its batch-events sub-object, added for source compatibility) implementing it. The compliance seam's IComplianceBatch then becomes a thin adapter — or disappears once both stores expose the shared interface from CreateBatchQuery().
Exact shape should be finalized against the DCB suite's real usage in P3.1b before the jasperfx PR goes up (the suite work will prove whether Execute(ct) belongs on the shared interface or stays store-side). Polecat-side implementation is a hand-off item.
🤖 Generated with Claude Code
Part of #5110. Target repo: JasperFx/jasperfx for the interface, then small follow-up PRs in Marten and Polecat to implement it (tracked here).
The batched-query DCB surface is the one seed-suite seam with no JasperFx abstraction at all, and the two products expose the same operations at different paths:
batch.Events.EventsExist(query)/batch.Events.FetchForWritingByTags<T>(query)viaIBatchEvents Events { get; }onIBatchedQuery(src/Marten/Services/BatchQuerying/IBatchedQuery.cs)batch.EventsExist(query)/batch.FetchForWritingByTags<T>(query)flat on itsIBatchedQuery(src/Polecat/Batching/IBatchedQuery.cs)Method names/signatures already match exactly — only the accessor path differs.
Proposal: add to JasperFx.Events something like
with Marten's
IBatchEventsand Polecat'sIBatchedQuery(or its batch-events sub-object, added for source compatibility) implementing it. The compliance seam'sIComplianceBatchthen becomes a thin adapter — or disappears once both stores expose the shared interface fromCreateBatchQuery().Exact shape should be finalized against the DCB suite's real usage in P3.1b before the jasperfx PR goes up (the suite work will prove whether
Execute(ct)belongs on the shared interface or stays store-side). Polecat-side implementation is a hand-off item.🤖 Generated with Claude Code