com.mysql.cj.xdevapi

## Interface Statement<STMT_T,RES_T>

Type Parameters:
  `STMT_T` - statement type
  `RES_T` - result type

All Known Subinterfaces:
  AddStatement, DeleteStatement, FindStatement, InsertStatement, ModifyStatement, RemoveStatement, SelectStatement, SqlStatement, UpdateStatement

    public interface Statement<STMT_T,RES_T>

A statement is a query or state-affecting command against a database that returns a result.

### Nested Class Summary

Nested Classes
`static class` `Statement.LockContention` The lock contention options for the locking modes available.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default STMT_T` `bind(List<Object> values)` Bind a list of objects numerically starting at 0.
`default STMT_T` `bind(Map<String,Object> values)` Bind the set of arguments named by the keys in the map to the associated values in the map.
`default STMT_T` `bind(Object... values)` Bind an array of objects numerically starting at 0.
`default STMT_T` `bind(String argName, Object value)` Bind the named argument to the given value.
`default STMT_T` `clearBindings()` Clear all bindings for this statement.
`RES_T` `execute()` Execute the statement synchronously.
`CompletableFuture<RES_T>` `executeAsync()` Execute the statement asynchronously.

### Method Detail

#### execute

    RES_T execute()

Execute the statement synchronously.

Returns:
  result of statement execution

#### executeAsync

    CompletableFuture<RES_T> executeAsync()

Execute the statement asynchronously.

Returns:
  `CompletableFuture` for result

#### clearBindings

    default STMT_T clearBindings()

Clear all bindings for this statement.

Returns:
  this statement

#### bind

    default STMT_T bind(String argName,
                        Object value)

Bind the named argument to the given value.

Parameters:
  `argName` - argument name
  `value` - object to bind
Returns:
  this statement

#### bind

    default STMT_T bind(Map<String,Object> values)

Bind the set of arguments named by the keys in the map to the associated values in the map.

Parameters:
  `values` - the map containing key-value pairs to bind
Returns:
  this statement

#### bind

    default STMT_T bind(List<Object> values)

Bind a list of objects numerically starting at 0.

Parameters:
  `values` - list of objects to bind
Returns:
  this statement

#### bind

    default STMT_T bind(Object... values)

Bind an array of objects numerically starting at 0.

Parameters:
  `values` - one or more objects to bind
Returns:
  this statement

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