Re: JDOQL Subquery proposals

2007-10-23 Thread Craig L Russell
Hi Michael, Looks good. Craig On Oct 23, 2007, at 2:35 AM, Michael Bouschen wrote: Hi, I looked at the sample queries we used when discussion the subquery proposal. I modified them such that they work with the company model used in the TCK and adapted them to the proposed API. I propos

Re: JDOQL Subquery proposals

2007-10-23 Thread Michael Bouschen
Hi, I looked at the sample queries we used when discussion the subquery proposal. I modified them such that they work with the company model used in the TCK and adapted them to the proposed API. I propose to add these queries to a new TCK query test class testing JDOQL subqueries. (1) Select

Re: JDOQL Subquery proposals

2007-10-22 Thread Craig L Russell
It looks like the spec update I just completed forgot to include some of the APIs that we discussed here: addSubquery(Query subquery, String variableDeclaration, String candidateCollectionExpr, String parameter); addSubqueryWithArray(Query subquery, String variableDeclaration, String cand

Re: JDOQL Subquery proposals

2006-10-07 Thread Wesley Biggs
Craig, This approach (adding subqueries by value) sounds good to me. Simple, elegant and easier on the spec-writing committee. ;-) Wes Craig L Russell wrote: Hi Wes and Michael, I'm just now reviewing this. Very nice indeed. We need to consider what happens if a subquery is modified afte

Re: JDOQL Subquery proposals

2006-10-03 Thread Craig L Russell
Hi Wes and Michael, I'm just now reviewing this. Very nice indeed. We need to consider what happens if a subquery is modified after being added to an outer query. I'd like to propose that we treat the subquery as supplying certain pieces and excluding others. We have a similar situation wi

Re: JDOQL Subquery proposals

2006-09-26 Thread Michael Bouschen
Hi Wes, I agree with what you are proposing below. Some more comments inline ... Hi Michael, thanks for reviewing. I agree, it is too much to overload the existing methods. I like your suggestion -- the only modification I would add is that the Query parameter come first as I think that woul

Re: JDOQL Subquery proposals

2006-09-25 Thread Wes Biggs
Hi Michael, thanks for reviewing. I agree, it is too much to overload the existing methods. I like your suggestion -- the only modification I would add is that the Query parameter come first as I think that would be slightly more readable/self-documenting. e.g. addSubquery(Query sub, String

Re: JDOQL Subquery proposals

2006-09-24 Thread Michael Bouschen
Hi Wes, thanks for the feedback, it's definitely not too late. I like your proposal. It allows subqueries being supported in both the SSJDOQL and the query API. I like the the idea of explicitly setting subquery's candidate collection by passing an expression of the outer query (and use the s

Re: JDOQL Subquery proposals

2006-09-17 Thread Wes Biggs
I'm ridiculously late in responding to this thread but if I may be so bold, I'll make a further suggestion. I like everything about the proposed approach except the requirement that subquery definitions must resort to single-string JDOQL syntax, even when using the API-based methods. I think

Re: JDOQL Subquery proposals

2006-07-26 Thread Michael Bouschen
Hi Craig, below I try summarize my understanding of what needs to be added in order to support subqueries: - Adding support for defining an alias for the elements of the candidate collection. If there is no explicit alias defined, 'this' is the default. This allows to disambiguate the candid

Re: JDOQL Subquery proposals

2006-06-23 Thread Craig L Russell
Hi Michael, I came up with some more queries that I'd like to discuss as we consider how to do subqueries. I haven't found a use case for subqueries that themselves contain subqueries... Select employees who make more than the average of their department employees? Select employees who ma

Re: JDOQL Subquery proposals

2006-06-23 Thread Abe White
I haven't been following this discussion, and that's not likely to change. I want to pop in, however, to point out that Kodo has had JDOQL subqueries for a long time. They're likely too limited and under-specified for the spec group's purposes, but perhaps they'll give you some ideas: h

Re: JDOQL Subquery proposals

2006-06-22 Thread Michael Bouschen
Hi, I agree to what Craig mentioned in the JDO TCK minutes: method addSubquery separates the outer from the subquery. So it looks like that this approach cannot support correlated subqueries where the subquery iterates a collection field defined in the outer query. My preference is using vari

Re: JDOQL Subquery proposals (was: RE: any plans to support subqueries with similar concept as in sql)

2006-06-12 Thread Erik Bengtson
Hi, I like both, but I prefer using DECLARE VARIABLES way to avoid a new jdo api jar. The first one, addSubquery, would be much more complex if nesting of subqueries is allowed, and it could become impossible to manage corner cases for this feature. > * Can type derivation & coercion of JDOQL va

JDOQL Subquery proposals (was: RE: any plans to support subqueries with similar concept as in sql)

2006-06-09 Thread Matthew T. Adams
Hi everyone, Here are 2 proposals discussed in the Fri 9 Jun JDO conference call regarding support for subqueries in JDOQL, including single-string and Query API enhancements, inspired by JPOX's proposed enhancement, documented in JPOX JIRA issue CORE-2861 (http://www.jpox.org/servlet/jira/browse/