public class ModifyStatementImpl extends FilterableStatement<ModifyStatement,Result> implements ModifyStatement
ModifyStatement
implementation.PreparableStatement.PreparableStatementFinalizer, PreparableStatement.PreparedState
Statement.LockContention
filterParams
mysqlxSession, preparedState, preparedStatementId
Modifier and Type | Method and Description |
---|---|
ModifyStatement |
arrayAppend(java.lang.String docPath,
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.
|
java.util.concurrent.CompletableFuture<Result> |
executeAsync()
Execute the statement asynchronously.
|
protected Result |
executePreparedStatement()
Executes a previously server-prepared statement.
|
protected Result |
executeStatement()
Executes the statement directly (non-prepared).
|
protected XMessage |
getPrepareStatementXMessage()
Returns the
XMessage needed to prepare 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 |
unset(java.lang.String... fields)
Nullify the given fields.
|
ModifyStatement |
where(java.lang.String searchCondition)
Deprecated.
Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method.
|
bind, clearBindings, isRelational, limit, offset, orderBy, sort
deallocatePrepared, execute, getMessageBuilder, resetPrepareState, setReprepareState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
limit, sort
protected Result executeStatement()
PreparableStatement
executeStatement
in class PreparableStatement<Result>
protected XMessage getPrepareStatementXMessage()
PreparableStatement
XMessage
needed to prepare this statement. Implementation is dependent on the statement type.getPrepareStatementXMessage
in class PreparableStatement<Result>
XMessage
that prepares this statementprotected Result executePreparedStatement()
PreparableStatement
executePreparedStatement
in class PreparableStatement<Result>
public java.util.concurrent.CompletableFuture<Result> executeAsync()
Statement
executeAsync
in interface Statement<ModifyStatement,Result>
CompletableFuture
for resultpublic ModifyStatement set(java.lang.String docPath, java.lang.Object value)
ModifyStatement
set
in interface ModifyStatement
docPath
- document path to the given valuevalue
- value to setModifyStatement
public ModifyStatement change(java.lang.String docPath, java.lang.Object value)
ModifyStatement
change
in interface ModifyStatement
docPath
- document path to the given valuevalue
- value to setModifyStatement
public ModifyStatement unset(java.lang.String... fields)
ModifyStatement
unset
in interface ModifyStatement
fields
- one or more field namesModifyStatement
public ModifyStatement patch(DbDoc document)
ModifyStatement
DbDoc
does not support expressions as a field values, please use ModifyStatement.patch(String)
method if you need
such functionality.patch
in interface ModifyStatement
document
- patch objectModifyStatement
public ModifyStatement patch(java.lang.String document)
ModifyStatement
patch
in interface ModifyStatement
document
- patch objectModifyStatement
public ModifyStatement arrayInsert(java.lang.String field, java.lang.Object value)
ModifyStatement
arrayInsert
in interface ModifyStatement
field
- document path to the array fieldvalue
- value to insertModifyStatement
public ModifyStatement arrayAppend(java.lang.String docPath, java.lang.Object value)
ModifyStatement
arrayAppend
in interface ModifyStatement
docPath
- document path to the array fieldvalue
- value to appendModifyStatement
@Deprecated public ModifyStatement where(java.lang.String searchCondition)
FilterableStatement
table.delete().where("age == 13").execute();
where
in class FilterableStatement<ModifyStatement,Result>
searchCondition
- expression