db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jdo Wiki] Update of "QueryTests" by MichaelWatzek
Date Thu, 22 Sep 2005 14:02:09 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jdo Wiki" for change notification.

The following page has been changed by MichaelWatzek:
http://wiki.apache.org/jdo/QueryTests

------------------------------------------------------------------------------
  ||<|2> '''A14.6.10-2:''' When `having` is specified, the `having` expression consists
of arithmetic and boolean expressions containing aggregate expressions. || '''`valid:`'''[[BR]]`SELECT
department, SUM(salary)` `FROM company.FullTimeEmployee GROUP BY department` `HAVING COUNT(department.employees)
> 0` ||<|2> `result.`[[BR]]`Having` ||<|2> Positive and negative test. ||
  || '''`invalid:`'''[[BR]]`SELECT department, SUM(salary)` `FROM company.FullTimeEmployee
GROUP BY department` `HAVING firstname == 'emp1First'` ||
  ||<|3> '''A14.6.11-1:''' When the value of the `Unique` flag is `true`, then the result
of a query is a single value, with `null` used to indicate that none of the instances in the
candidates satisfied the filter. If more than one instance satisfies the filter, and the range
is not limited to one result, then `execute` throws a `JDOUserException.` || '''`valid, result
is non-null:`'''[[BR]]`SELECT UNIQUE FROM company.Company` `WHERE companyid == 1` ||<|3>
`result.`[[BR]]`Unique` ||<|3> Positive and negative test. ||
- || '''`valid, result is null:`'''[[BR]]`SELECT UNIQUE FROM company.Company` WHERE name ==
'non-existent' ||
+ || '''`valid, result is null:`'''[[BR]]`SELECT UNIQUE FROM company.Company` `WHERE name
== 'non-existent'` ||
  || '''`invalid:`'''[[BR]]`SELECT UNIQUE FROM company.Person` ||
  ||<|3> '''A14.6.11-2:''' The default Unique setting is `true` for aggregate results
without a grouping expression, and `false` otherwise. || '''`true:`'''[[BR]]`SELECT COUNT(THIS)
FROM company.Person` ||<|3> `result.`[[BR]]`DefaultUnique` ||<|3> Positive test.
||
  || '''`false grouping:`'''[[BR]]`SELECT FROM company.Person` `GROUP BY lastname` ||
  || '''`false:`'''[[BR]]`SELECT FROM company.Person` ||
- || '''A14.6.12-1:''' The result class may be one of ... ... Portable result classes do not
invoke any persistence behavior during their no-args constructor or set methods. || `SELECT
firstname, lastname INTO ...FullName FROM company.Person` || `result.`[[BR]]`ResultClassRequirements`
|| Positive test.[[BR]]New result class required. ||
+ ||<|14> '''A14.6.12-1:''' The result class may be one of ... ... Portable result classes
do not invoke any persistence behavior during their no-args constructor or set methods. ||
'''`valid, result class is String:`'''[[BR]]`SELECT stringNull INTO String FROM mylib.PrimitiveTypes`[[BR]]''`TBD
for all supported JDK classes.`''||<|14> `result.`[[BR]]`ResultClassRequirements` ||<|14>
Positive and negative test.[[BR]]New result class required. ||
+ || '''`valid, result class is TCK class:`'''[[BR]]`SELECT stringNull AS s, intNotNull AS
i` `INTO ...StringIntResult` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is TCK class` `not having Long property:`'''[[BR]]`SELECT stringNull
AS s, longNotNull AS l` `INTO ...StringIntResult` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is JDK class:`'''[[BR]]`SELECT stringNull, intNotNull` `INTO
String` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is JDK class` `and not assignment compatible:`'''[[BR]]`SELECT
stringNull` `INTO Integer` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is TCK class` `and not assignment compatible:`'''[[BR]]`SELECT
longNotNull AS s` `INTO ...StringIntResult` `FROM mylib.PrimitiveTypes`||
+ || '''`valid, specifying a constructor:`'''[[BR]]`SELECT new StringIntResult(stringNull,
intNotNull)` `FROM mylib.PrimitiveTypes`||
+ || '''`valid, specifying a non-existent` `constructor with AS:`'''[[BR]]`SELECT new StringIntResult(stringNull
AS s)` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, specifying a non-existent` `constructor without AS:`'''[[BR]]`SELECT new
StringIntResult(stringNull)` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is TCK class` `not having an no-arg constructor:`'''[[BR]]`SELECT
stringNull INTO ...NoArgConstructor` `FROM mylib.PrimitiveTypes`||
+ || '''`invalid, result class is TCK class` `not having public fields and methods:`'''[[BR]]`SELECT
stringNull INTO ...NoFieldsNoMethods` `FROM mylib.PrimitiveTypes`||
+ || '''`valid, result class is TCK class` `having public fields and set methods:`'''[[BR]]`SELECT
stringNull AS s INTO ...FieldsAndSetMethods` `FROM mylib.PrimitiveTypes`||
+ || '''`valid, result class is TCK class` `having public fields and put method:`'''[[BR]]`SELECT
stringNull AS s INTO ...FieldsAndPutMethod` `FROM mylib.PrimitiveTypes`||
+ || '''`valid, result class is TCK class` `having put method:`'''[[BR]]`SELECT stringNull
AS s INTO ...PutMethod` `FROM mylib.PrimitiveTypes`||
  || '''A14.6.12-2:''' Table 6: Shape of Result (C is the candidate class) || `...` || `result.`[[BR]]`ShapeOfResult`
|| Positive test. ||
  
  [[Anchor(SQLQueries)]]

Mime
View raw message