Hi Edgar,

Edgar Poce wrote:
Hi
In the specification doc 0.16.2 the following methods are defined for QueryResult: QueryResult.getPropertyNames(), QueryResult.getRows() and QueryResult.getNodes() (page 110). But in the page 112 it says "The column names of the table are returned by QueryResult.getColumnNames". it should say getPropertyNames(), or am I missing something?

yes, that's definitively an error in the spec. thanks for reporting this.

in 8.6.3 SQL EBNF it says
"select ::= SELECT ('*' | proplist )"
So it seems jcr doesn't support any kind of expression nor function in the select clause.
e.g. something like "SELECT concat(myapp:myprop1, myapp:myprop2) as customColumn from myapp:mynodetype" would be really handy. And it could be retrieved with QueryResult.getColumnName("customColumn"). What do you think?

while this would work fine in SQL, there is no equivalent in XPath, and that's the reason why such a function is not specified. The EG decided to make the mandatory part of the two specified query langages interchangeable, that is, each SQL query must also be expressible in XPath and vice versa. However implementations are of course free to support more than only the mandatory specified part.
I personally think it is a good approach to start with a common feature set and then gain experience what jsr-170 applications demand from the query support, which then can be used to drive the next version of the spec.


Maybe it makes sense to start some kind of wishlist for jackrabbit where we can pool all the ideas around new features and extensions?

regards
 marcel

Reply via email to