Package io.stargate.sdk.doc.domain
Class QueryBuilder
java.lang.Object
io.stargate.sdk.doc.domain.QueryBuilder
Helper to build queries
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOnly return those fields if providedbuild()Terminal call to build immutable instance ofQuery.Build Where Clause based on Filters.Use 'where' to help you createOnly return those fields if providedKeep fields null but convenient for fluent api.Only return those fields if provided.
-
Field Details
-
fields
Fields to search. -
whereClause
One can provide the full where clause as a JSON String. If not null it will be used and the filters will be ignored. -
filters
Use to build the where Clause as a JsonString if the field whereClause is not provided. - FieldName + condition + value
-
-
Constructor Details
-
QueryBuilder
public QueryBuilder()Default constructor.
-
-
Method Details
-
build
Terminal call to build immutable instance ofQuery.- Returns:
- immutable instance of
Query.
-
select
Only return those fields if provided- Parameters:
fields- String- Returns:
- SearchDocumentQueryBuilder
-
selectAll
Keep fields null but convenient for fluent api.- Returns:
- current query
-
jsonWhere
Use 'where' to help you create- Parameters:
where- String- Returns:
- SearchDocumentQueryBuilder
-
where
Only return those fields if provided.- Parameters:
fieldName- String- Returns:
- SearchDocumentWhere
-
and
Only return those fields if provided- Parameters:
fieldName- String- Returns:
- SearchDocumentWhere
-
getWhereClause
Build Where Clause based on Filters.- Returns:
- String
-