public class ModifyStatementImpl extends FilterableStatement<ModifyStatement,Result> implements ModifyStatement
ModifyStatement implementation.PreparableStatement.PreparableStatementFinalizer, PreparableStatement.PreparedStateStatement.LockContentionfilterParamsmysqlxSession, 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 docPath,
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... docPath)
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, sortdeallocatePrepared, execute, getMessageBuilder, resetPrepareState, setReprepareStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlimit, sortprotected Result executeStatement()
PreparableStatementexecuteStatement in class PreparableStatement<Result>protected XMessage getPrepareStatementXMessage()
PreparableStatementXMessage needed to prepare this statement. Implementation is dependent on the statement type.getPrepareStatementXMessage in class PreparableStatement<Result>XMessage that prepares this statementprotected Result executePreparedStatement()
PreparableStatementexecutePreparedStatement in class PreparableStatement<Result>public java.util.concurrent.CompletableFuture<Result> executeAsync()
StatementexecuteAsync in interface Statement<ModifyStatement,Result>CompletableFuture for resultpublic ModifyStatement set(java.lang.String docPath, java.lang.Object value)
ModifyStatementset in interface ModifyStatementdocPath - document path to the given valuevalue - value to setModifyStatementpublic ModifyStatement change(java.lang.String docPath, java.lang.Object value)
ModifyStatementchange in interface ModifyStatementdocPath - document path to the given valuevalue - value to setModifyStatementpublic ModifyStatement unset(java.lang.String... docPath)
ModifyStatementunset in interface ModifyStatementdocPath - one or more field namesModifyStatementpublic ModifyStatement patch(DbDoc document)
ModifyStatementDbDoc does not support expressions as a field values, please use ModifyStatement.patch(String) method if you need
such functionality.patch in interface ModifyStatementdocument - patch objectModifyStatementpublic ModifyStatement patch(java.lang.String document)
ModifyStatementpatch in interface ModifyStatementdocument - patch objectModifyStatementpublic ModifyStatement arrayInsert(java.lang.String docPath, java.lang.Object value)
ModifyStatementarrayInsert in interface ModifyStatementdocPath - document path to the array fieldvalue - value to insertModifyStatementpublic ModifyStatement arrayAppend(java.lang.String docPath, java.lang.Object value)
ModifyStatementarrayAppend in interface ModifyStatementdocPath - 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