An SQL statement can use the values that are passed at run time to the parameters of the method that uses the statement. SQL statements denote these parameters with markers. Each marker corresponds to a parameter in a method.
When a method is invoked, the values for these parameters are obtained from the arguments provided by the invoking application and used during execution of the SQL statement.
The following parameter markers are allowed in the FROM clause of a SELECT statement that appears in an annotated method that runs against an in-memory Java collection. These two parameter markers mean the same thing in the FROM clause as they do elsewhere in the query.
You cannot use both types of parameter marker in the same SQL statement.
pureQuery runtime gets the information that it needs regarding the class of the collection from the declaration of the annotated method.
The following parameter markers are allowed in the FROM clause of a SELECT statement that appears in an inline method that runs against an in-memory Java collection.
You cannot use both types of parameter marker in the same SQL statement.
<classname> represents the fully qualified class name of the members of the corresponding collection that is passed as a parameter when the method is executed.
pureQuery runtime needs to know the class to be used when examining the members of an in-memory Java collection.
When either of the last two forms is used, the class name is identified specifically in the FROM clause, as in the following example:
List<Employee> emps;
Dept[] depts;
List<Map<String, Object>> list = qocData.queryList
("select e.id, d.name " +
"from ?1.com.ibm.data.test.Employee as e, " +
"?2.com.ibm.data.test.single.Dept as d " +
"where e.deptid=d.id", emps, depts);