Class Filter
java.lang.Object
com.datastax.astra.client.collections.definition.documents.Document
com.datastax.astra.client.core.query.Filter
- All Implemented Interfaces:
Serializable
Filter Builder.
- See Also:
-
Field Summary
Fields inherited from class com.datastax.astra.client.collections.definition.documents.Document
documentMap, SERIALIZER
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.datastax.astra.client.collections.definition.documents.Document
append, appendIfNotNull, clear, containsKey, create, create, entrySet, equals, get, get, getArray, getBoolean, getByte, getCalendar, getCharacter, getDate, getDate, getDocumentMap, getDouble, getFloat, getId, getInstant, getInteger, getList, getLong, getObjectId, getShort, getSimilarity, getString, getUUID, getVector, getVectorize, hashCode, id, map, parse, put, putAll, putAll, remove, setProperty, values, vector, vector, vectorize
-
Constructor Details
-
Filter
public Filter()Default constructor. -
Filter
Create a filter from a map.- Parameters:
conditions
- conditions
-
Filter
public Filter(@NonNull @NonNull String fieldName, @NonNull @NonNull FilterOperator cond, @NonNull @NonNull Object value) Create a filter from a where clause.- Parameters:
fieldName
- fieldNamecond
- conditionvalue
- object value
-
-
Method Details
-
where
Work with arguments.- Parameters:
fieldName
- current field name.- Returns:
- builder for the filter
-
where
Build where clause with operator- Parameters:
fieldName
- current field namecond
- current conditionvalue
- value for the condition- Returns:
- current
-
findById
Build a filter for find by id.- Parameters:
id
- identifier- Returns:
- filter
-
toString
Serialization with Jackson. -
toJson
Express the json filter as a string.
-