You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've always said that the compiled query feature is Marten's version of the "Specification pattern", but I'm working with a client where I think there would be a lot of value in having an alternative "Specification" usage for weirder things that can't work inside of a compiled query.
The goal in a way is to have reusable query specifications while also nuking the typical stupid Clean Architecture style repository abstractions that take away all the power.
Bonus: do this in such a way that you can still use at least some of these things with batched queries as well.
The text was updated successfully, but these errors were encountered:
// This will be in https://github.com/JasperFx/marten/issues/3318, but a bit more integratedpublicinterfaceIQueryPlan<T>{Task<T>Fetch(IQuerySessionsession,CancellationTokencancellationToken);}// it'll be fancier to try to enable batch queryingpublicclassQuerySession{publicTask<T>QueryAsync<T>(thisIDocumentSessionsession,IQueryPlan<T>plan,CancellationTokencancellationToken){return plan.Fetch(session, cancellationToken);}}
See this for a little more background: https://medium.com/@arjunarora171997/specification-design-pattern-8ce9f7897a83#:~:text=The%20specification%20design%20pattern%20is%20basically%20you%20first%20preparing%20a,from%20other%20tables)%2C%20etc.
I've always said that the compiled query feature is Marten's version of the "Specification pattern", but I'm working with a client where I think there would be a lot of value in having an alternative "Specification" usage for weirder things that can't work inside of a compiled query.
The goal in a way is to have reusable query specifications while also nuking the typical stupid Clean Architecture style repository abstractions that take away all the power.
Bonus: do this in such a way that you can still use at least some of these things with batched queries as well.
The text was updated successfully, but these errors were encountered: