ModifyStatement implementation.
| Modifier and Type | Field and Description |
|---|---|
| private List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ModifyStatement | arrayAppend(String
document path to the array field docPath, Object value to append value)Implements com. Append a value to the specified array. |
| public ModifyStatement | arrayInsert(String
document path to the array field docPath, Object value to insert value)Implements com. Insert a value into the specified array. |
| public ModifyStatement | change(String
document path to the given value docPath, Object value to set value)Implements com. Add an update to the statement setting the field, if it exists at the document path, to the given value. |
| public CompletableFuture | executeAsync()
Implements com. Execute the statement asynchronously. |
| protected Result | executePreparedStatement()
Implements abstract com. Executes a previously server-prepared statement. |
| protected Result | executeStatement()
Implements abstract com. Executes the statement directly (non-prepared). |
| protected XMessage | getPrepareStatementXMessage()
Implements abstract com. Returns the |
| public ModifyStatement | patch(DbDoc
patch object document)Implements com. Takes in a patch object and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function. |
| public ModifyStatement | patch(String
patch object document)Implements com. Takes in a document patch and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function. |
| public ModifyStatement | set(String
document path to the given value docPath, Object value to set value)Implements com. Add an update to the statement setting the field as the document path to the given value for all documents matching the search criteria. |
| public ModifyStatement | unset(String...
one or more field names docPath)Implements com. Nullify the given fields. |
| public ModifyStatement | where(String
expression searchCondition)Overrides com.
Deprecated
Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method.
Add search condition to this statement. |
| updates | back to summary |
|---|---|
| private List<UpdateSpec> updates | |
| ModifyStatementImpl | back to summary |
|---|---|
| pack-priv ModifyStatementImpl(MysqlxSession mysqlxSession, String schema, String collection, String criteria) | |
| arrayAppend | back to summary |
|---|---|
| public ModifyStatement arrayAppend(String docPath, Object value) Implements com. Doc from com. Append a value to the specified array.
| |
| arrayInsert | back to summary |
|---|---|
| public ModifyStatement arrayInsert(String docPath, Object value) Implements com. Doc from com. Insert a value into the specified array.
| |
| change | back to summary |
|---|---|
| public ModifyStatement change(String docPath, Object value) Implements com. Doc from com. Add an update to the statement setting the field, if it exists at the document path, to the given value.
| |
| executeAsync | back to summary |
|---|---|
| public CompletableFuture Implements com. Doc from com. Execute the statement asynchronously.
| |
| executePreparedStatement | back to summary |
|---|---|
| protected Result executePreparedStatement() Implements abstract com. Doc from com. Executes a previously server-prepared statement. Implementation is dependent on the statement type. | |
| executeStatement | back to summary |
|---|---|
| protected Result executeStatement() Implements abstract com. Doc from com. Executes the statement directly (non-prepared). Implementation is dependent on the statement type. | |
| getPrepareStatementXMessage | back to summary |
|---|---|
| protected XMessage getPrepareStatementXMessage() Implements abstract com. Doc from com. Returns the | |
| patch | back to summary |
|---|---|
| public ModifyStatement patch(DbDoc document) Implements com. Doc from com. Takes in a patch object and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.
Please note that
| |
| patch | back to summary |
|---|---|
| public ModifyStatement patch(String document) Implements com. Doc from com. Takes in a document patch and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.
A document patch is similar to a JSON object, with the key difference that document field values can be nested expressions in addition to literal values.
| |
| set | back to summary |
|---|---|
| public ModifyStatement set(String docPath, Object value) Implements com. Doc from com. Add an update to the statement setting the field as the document path to the given value for all documents matching the search criteria.
| |
| unset | back to summary |
|---|---|
| public ModifyStatement unset(String... docPath) Implements com. Doc from com. Nullify the given fields.
| |
| where | back to summary |
|---|---|
| public ModifyStatement where(String searchCondition) Overrides com. Doc from com. Deprecated Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method. Add search condition to this statement.
table.delete().where("age == 13").execute();
| |