public interface ModifyStatement extends Statement<ModifyStatement,Result>
Statement.LockContention
Modifier and Type | Method and Description |
---|---|
ModifyStatement |
arrayAppend(String docPath,
Object value)
Append a value to the specified array.
|
ModifyStatement |
arrayInsert(String docPath,
Object value)
Insert a value into the specified array.
|
ModifyStatement |
change(String docPath,
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(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(String docPath,
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(String... sortFields)
Add/replace the order specification for this statement.
|
ModifyStatement |
unset(String... docPath)
Nullify the given fields.
|
bind, bind, bind, bind, clearBindings, execute, executeAsync
ModifyStatement sort(String... sortFields)
sortFields
- sort expressionModifyStatement
ModifyStatement limit(long numberOfRows)
numberOfRows
- limitModifyStatement
ModifyStatement set(String docPath, Object value)
docPath
- document path to the given valuevalue
- value to setModifyStatement
ModifyStatement change(String docPath, Object value)
docPath
- document path to the given valuevalue
- value to setModifyStatement
ModifyStatement unset(String... docPath)
docPath
- 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(String document)
document
- patch objectModifyStatement
ModifyStatement arrayInsert(String docPath, Object value)
docPath
- document path to the array fieldvalue
- value to insertModifyStatement
ModifyStatement arrayAppend(String docPath, Object value)
docPath
- document path to the array fieldvalue
- value to appendModifyStatement