public interface ModifyStatement extends Statement<ModifyStatement,Result>
Statement.LockContention
Modifier and Type | Method and Description |
---|---|
ModifyStatement |
arrayAppend(java.lang.String field,
java.lang.Object value)
Append a value to the specified array.
|
ModifyStatement |
arrayInsert(java.lang.String field,
java.lang.Object value)
Insert a value into the specified array.
|
ModifyStatement |
change(java.lang.String docPath,
java.lang.Object value)
Add an update to the statement setting the field, if it exists at the document path, to the given value.
|
ModifyStatement |
limit(long numberOfRows)
Add/replace the document limit for this statement.
|
ModifyStatement |
patch(DbDoc document)
Takes in a patch object and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.
|
ModifyStatement |
patch(java.lang.String document)
Takes in a document patch and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.
|
ModifyStatement |
set(java.lang.String docPath,
java.lang.Object value)
Add an update to the statement setting the field as the document path to the given value for all documents matching the search criteria.
|
ModifyStatement |
sort(java.lang.String... sortFields)
Add/replace the order specification for this statement.
|
ModifyStatement |
unset(java.lang.String... fields)
Nullify the given fields.
|
bind, bind, bind, bind, clearBindings, execute, executeAsync
ModifyStatement sort(java.lang.String... sortFields)
sortFields
- sort expressionModifyStatement
ModifyStatement limit(long numberOfRows)
numberOfRows
- limitModifyStatement
ModifyStatement set(java.lang.String docPath, java.lang.Object value)
docPath
- document path to the given valuevalue
- value to setModifyStatement
ModifyStatement change(java.lang.String docPath, java.lang.Object value)
docPath
- document path to the given valuevalue
- value to setModifyStatement
ModifyStatement unset(java.lang.String... fields)
fields
- one or more field namesModifyStatement
ModifyStatement patch(DbDoc document)
DbDoc
does not support expressions as a field values, please use patch(String)
method if you need
such functionality.document
- patch objectModifyStatement
ModifyStatement patch(java.lang.String document)
document
- patch objectModifyStatement
ModifyStatement arrayInsert(java.lang.String field, java.lang.Object value)
field
- document path to the array fieldvalue
- value to insertModifyStatement
ModifyStatement arrayAppend(java.lang.String field, java.lang.Object value)
field
- document path to the array fieldvalue
- value to appendModifyStatement