Package com.datastax.astra.client.model
Class Update
java.lang.Object
com.datastax.astra.client.model.Document
com.datastax.astra.client.model.Update
- All Implemented Interfaces:
Serializable
,Map<String,
Object>
Encore the update document
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.datastax.astra.client.model.Document
documentMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBuilder patternstatic Update
create()
Allow to creat a new instance.Builder patternBuilder patternBuilder patternBuilder patternBuilder pattern.Builder patternBuilder patternBuilder patternBuilder patternupdateCurrentDate
(String... fields) Builder patternBuilder patternupdateSetOnInsert
(Map<String, Double> fields) Builder patternMethods inherited from class com.datastax.astra.client.model.Document
append, appendIfNotNull, clear, containsKey, containsValue, create, entrySet, equals, get, get, getArray, getBoolean, getByte, getCalendar, getCharacter, getDate, getDate, getDouble, getFloat, getId, getInstant, getInteger, getList, getList, getLong, getObjectId, getShort, getSimilarity, getString, getUUID, getVector, getVectorize, hashCode, id, isEmpty, keySet, map, parse, put, putAll, remove, size, toJson, toString, values, vector, vectorize
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Update
public Update()Default constructor. -
Update
Default constructor.- Parameters:
json
- filter expression as JSON
-
Update
Default constructor.- Parameters:
obj
- filter expression as JSON
-
-
Method Details
-
create
Allow to creat a new instance.- Returns:
- a new instance
-
inc
Builder pattern- Parameters:
key
- field nameoffset
- increment value- Returns:
- reference to self
-
unset
Builder pattern- Parameters:
fieldName
- field name- Returns:
- reference to self
-
set
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
set
Builder pattern- Parameters:
fields
- ` fields map- Returns:
- reference to self
-
min
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
push
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
pop
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
pushEach
Builder pattern.- Parameters:
key
- field namevalues
- filed list valuesposition
- where to push in the list- Returns:
- reference to self
-
addToSet
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
rename
Builder pattern- Parameters:
key
- field namevalue
- filed value- Returns:
- reference to self
-
updateCurrentDate
Builder pattern- Parameters:
fields
- fields to rename- Returns:
- reference to self
-
updateMul
Builder pattern- Parameters:
fields
- fields to rename- Returns:
- reference to self
-
updateSetOnInsert
Builder pattern- Parameters:
fields
- fields to rename- Returns:
- reference to self
-