Package jakarta.nosql.query
Interface SelectQuery
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSelectQuery.SelectQueryProviderA provider toSelectQuery
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetEntity()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.longgetLimit()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.longgetSkip()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 SelectQueryparse(String query)Obtains an instance ofSelectQueryfrom 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
Whereentity 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 ofSelectQueryfrom a text string.- Parameters:
query- the query- Returns:
SelectQueryinstance- Throws:
NullPointerException- when the query is nullQuerySyntaxException- if the text cannot be parsedProviderNotFoundException- when the provider is not found
-
-