com.mysql.cj.xdevapi

## Interface UpdateStatement

All Superinterfaces:
  Statement<UpdateStatement,Result>

    public interface UpdateStatement
    extends Statement<UpdateStatement,Result>

A statement representing a set of row modifications.

### Nested Class Summary

### Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.Statement

`Statement.LockContention`

### Method Summary

All Methods Instance Methods Abstract Methods
`UpdateStatement` `limit(long numberOfRows)` Add/replace the row limit for this statement.
`UpdateStatement` `orderBy(String... sortFields)` Add/replace the order specification for this statement.
`UpdateStatement` `set(Map<String,Object> fieldsAndValues)` Add the given set of updates to the statement.
`UpdateStatement` `set(String field, Object value)` Add the given update to the statement setting field to value for all rows matching the search criteria.
`UpdateStatement` `where(String searchCondition)` Add/replace the search criteria for this statement.

### Methods inherited from interface com.mysql.cj.xdevapi.Statement

`bind, bind, bind, bind, clearBindings, execute, executeAsync`

### Method Detail

#### set

    UpdateStatement set(Map<String,Object> fieldsAndValues)

Add the given set of updates to the statement.

Parameters:
  `fieldsAndValues` - table name-value pairs
Returns:
  `UpdateStatement`

#### set

    UpdateStatement set(String field,
                        Object value)

Add the given update to the statement setting field to value for all rows matching the search criteria.

Parameters:
  `field` - field name
  `value` - value to set
Returns:
  `UpdateStatement`

#### where

    UpdateStatement where(String searchCondition)

Add/replace the search criteria for this statement.

Parameters:
  `searchCondition` - search condition expression
Returns:
  `UpdateStatement`

#### orderBy

    UpdateStatement orderBy(String... sortFields)

Add/replace the order specification for this statement.

Parameters:
  `sortFields` - sort expression
Returns:
  `UpdateStatement`

#### limit

    UpdateStatement limit(long numberOfRows)

Add/replace the row limit for this statement.

Parameters:
  `numberOfRows` - limit
Returns:
  `UpdateStatement`

Copyright © 2016, 2024, Oracle and/or its affiliates.