Hi,
JCR-1 has specs for XPath and JCR-SQL.
JCR-2 has specs for JCR-SQL-2 and JQOM.
1. In this context, where does QueryBuilder stand?
2. Is QueryBuilder not a spec from JCR at all?
3. Could we say that we have in all, we have 5 types of Searches ( XPath, JCR-SQL, JCR-SQL-2, JQOM, and QueryBuilder)?
4. When should/could QueryBuilder be used?
Appreciate your quick response.
Thanks,
Rama.
Solved! Go to Solution.
Views
Replies
Total Likes
A colleague, David Gonzalez, summarised why to use QueryBuilder very well:
1. It simplifies making complex parametised queries
2. It should auto-optimize query evaluation
3. Extension points for adding custom behaviour(custom predicates, Hit Writers etc)
4. Provides pagination, facets etc
There is no reason why you have to use QueryBuilder, but it can be less confusing to use than writing path/JCR queries.
Regards,
Opkar
Views
Replies
Total Likes
QueryBuilder is built on JCR API. Here is a good stackoverflow thread that talks about this subject:
http://stackoverflow.com/questions/29717580/cq-querybuilder-api-why
Views
Replies
Total Likes
Hi,
Thanks for sharing that useful URL.
I could not get answers to my above questions.
My fifth question would be:
5. When should QueryBuilder be used as opposed to XPath, JCR-SQL, JCR-SQL-2 and JQOM?
How are these 5 searches related?
Thanks,
Rama.
Views
Replies
Total Likes
A colleague, David Gonzalez, summarised why to use QueryBuilder very well:
1. It simplifies making complex parametised queries
2. It should auto-optimize query evaluation
3. Extension points for adding custom behaviour(custom predicates, Hit Writers etc)
4. Provides pagination, facets etc
There is no reason why you have to use QueryBuilder, but it can be less confusing to use than writing path/JCR queries.
Regards,
Opkar
Views
Replies
Total Likes