Hey,

During a seminar yesterday I got the question of why Query source 
selection is done in the builder and not the Query. I didn't have a good 
answer.

Here is the code we are talking about. QueryBuilder:
Query newQuery();
Query newQuery(Iterable source);
---
The alternative would be to have only newQuery() in QueryBuilder(), and 
then have 
find()/find(iterable),iterator/iterator(iterable),count/count(iterable) 
in Query. The good thing about this is that Queries can be created as 
domain concepts more easily and then strung together later on using the 
iterable versions of query. This approach is similar to LINQ (I'm told) 
where building the query graph is done separately from applying it to a 
collection/database.

Any thoughts on this?

/Rickard


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to