Database can be queried using QueryDSL-enabled query
method with few custom extension that will be described later.
{CODE:java query_1_0@ClientApi\Session\Querying\HowToQuery.java /}
Parameters | ||
---|---|---|
indexName | String | Name of an index to perform query on |
isMapReduce | boolean | Indicates if queried index is a map/reduce index (modifies how we treat identifier properties). |
Return Value | |
---|---|
IRavenQueryable | Instance implementing IRavenQueryable interface containing additional query methods. |
{SAFE The default value of a page size for a query is 128
results. In order to retrieve a different number of results in a single query use .Take(pageSize)
method. /}
{CODE:java query_1_1@ClientApi\Session\Querying\HowToQuery.java /}
Notice that by specifying Employee
as a class parameter, we are not only defining a result type, but also marking name of collection that will be queried.
Queries can be performed using strongly typed syntax.
{CODE:java query_1_2@ClientApi\Session\Querying\HowToQuery.java /}
{CODE:java query_1_4@ClientApi\Session\Querying\HowToQuery.java /}
or
{CODE:java query_1_5@ClientApi\Session\Querying\HowToQuery.java /}
Available custom methods and extensions: