-
Language:
English
-
Language:
English
13.42. Query Examples
Note
To return the results use
ksession.getQueryResults("name")
, where "name" is the query's name. This returns a list of query results, which allow you to retrieve the objects that matched the query.
- Query for people over the age of 30
query "people over the age of 30" person : Person( age > 30 ) end
- Query for people over the age of X, and who live in Y
query "people over the age of x" (int x, String y) person : Person( age > x, location == y ) end