Package jakarta.nosql.query
Interface SelectQuery
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SelectQuery.SelectQueryProvider
A provider toSelectQuery
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getEntity()
The entity nameList<String>
getFields()
The fields that will retrieve in this query, if this fields is empty, this query will retrieve the whole entity.long
getLimit()
Statement limits the number of rows returned by a query,List<Sort>
getOrderBy()
The list of orders, it is used to sort the result-set in ascending or descending order.long
getSkip()
Statement defines where the query should startOptional<Where>
getWhere()
The condition at thisSelectQuery
, if the Where is empty that means may retrieve the whole entities.static SelectQuery
parse(String query)
Obtains an instance ofSelectQuery
from a text string.
-
-
-
Method Detail
-
getFields
List<String> getFields()
The fields that will retrieve in this query, if this fields is empty, this query will retrieve the whole entity.- Returns:
- the fields list
-
getEntity
String getEntity()
The entity name- Returns:
- the entity name
-
getWhere
Optional<Where> getWhere()
The condition at thisSelectQuery
, if the Where is empty that means may retrieve the whole entities.- Returns:
- the
Where
entity otherwiseOptional.empty()
-
getSkip
long getSkip()
Statement defines where the query should start- Returns:
- the number to skip, otherwise either negative value or zero
-
getLimit
long getLimit()
Statement limits the number of rows returned by a query,- Returns:
- the maximum of result, otherwise either negative value or zero
-
getOrderBy
List<Sort> getOrderBy()
The list of orders, it is used to sort the result-set in ascending or descending order.- Returns:
- the order list
-
parse
static SelectQuery parse(String query)
Obtains an instance ofSelectQuery
from a text string.- Parameters:
query
- the query- Returns:
SelectQuery
instance- Throws:
NullPointerException
- when the query is nullQuerySyntaxException
- if the text cannot be parsedProviderNotFoundException
- when the provider is not found
-
-