cqengine icon indicating copy to clipboard operation
cqengine copied to clipboard

Why does CQE not support Query<O> queries?

Open yrashk opened this issue 8 years ago • 2 comments

Is there any specific reason why CollectionQueryEngine#retrieveRecursive only allows SimpleQuery and logical queries and throws an exception on other Query<O>-implementing queries?

yrashk avatar Jan 29 '17 08:01 yrashk

The reason I am asking this is because recently I had to implement another query to enforce strict order semantics over a nested query (scoped, https://github.com/eventsourcing/es4j/pull/211) but it had to be implemented as a SimpleQuery even though it doesn't have an attribute. CQE would fail if I implement it as a Query.

yrashk avatar Jan 31 '17 02:01 yrashk

Hi Yurii,

This is a good point. I agree it can be inconvenient and I've found it so myself! It's for historical reasons. But I think it makes sense to remove the restriction going forward. I'll try to do so in the next release and I'll keep this issue open until it's done. Thanks!

npgall avatar Jan 31 '17 14:01 npgall