Issue Details (XML | Word | Printable)

Key: JDO-160
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Watzek
Reporter: Michael Watzek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Implement new JDO 2 query tests cases concerning parameters.

Created: 04/Oct/05 09:25 PM   Updated: 19/Oct/05 10:17 PM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-160.patch 2005-10-13 06:23 PM Michael Watzek 15 kB
File Licensed for inclusion in ASF works JDO-160.patch2 2005-10-18 07:03 PM Michael Watzek 16 kB

Resolution Date: 19/Oct/05 10:17 PM


 Description  « Hide
 We need 4 new test classes, one for each of the following assertions:

- A14.6.3-2: Parameters must all be declared explicitly via declareParameters or all be declared implicitly in the filter.
- A14.6.3-3: Parameters implicitly declared (in the result, filter, grouping, ordering, or range) are identified by prepending a ":" to the parameter everywhere it appears. All parameter types can be determined by one of the following techniques.
- A14.6.13-3: If implicit parameters are used, their order of appearance in the query determines their order for binding to positional parameters for execution.

Details can be found on Wiki page http://wiki.apache.org/jdo/QueryTests#Parameters

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Watzek added a comment - 13/Oct/05 06:23 PM
 This patch implements the assertions above.

Michael Bouschen added a comment - 17/Oct/05 06:26 PM
Some comments about JDO-160.patch:

OrderOfParameters:
- I propose to add a second test query that switches the order of param1 and param2, but keeps the order of the actula parameter values. The second query should return an empty result list.

MixedParameters:
- How about adding another negative test query having an explicit and an implict parameter? It declares one parameter "String param1". The filter uses this parameter plus an implicit parameter: "firstname == param1 & lastname == :param2". This mix of explict and implict declared parameters is not valid.

ImplicitParameters:
- I propose to add a test query using an implict parameter in the having clause.

Michael Watzek added a comment - 18/Oct/05 07:03 PM
The second patch contains the comments above.

Michael Bouschen added a comment - 19/Oct/05 07:04 PM
Two comments:
- Class OrderOfParameters defines queries using explicilty declared parameters . I propose to change this to implicit parameters, because the assertion only covers implicit parameters.
- The grouping query in class ImplicitParameters is not valid, it misses a result clause. I propose to add the following result clause: "department.name, COUNT(this)" and change the grouping clause to "department.name HAVING COUNT(this) >= :min".


Michael Watzek added a comment - 19/Oct/05 10:17 PM
I incorporated the comments above into the second patch and checked in the changes.