Top Description Inners Methods
com.mysql.cj.xdevapi

public Interface Statement<STMT_T, RES_T>

Known Direct Subinterfaces
com.mysql.cj.xdevapi.UpdateStatement, com.mysql.cj.xdevapi.AddStatement, com.mysql.cj.xdevapi.DeleteStatement, com.mysql.cj.xdevapi.FindStatement, com.mysql.cj.xdevapi.InsertStatement, com.mysql.cj.xdevapi.ModifyStatement, com.mysql.cj.xdevapi.RemoveStatement, com.mysql.cj.xdevapi.SelectStatement, com.mysql.cj.xdevapi.SqlStatement
Known Direct Implementers
com.mysql.cj.xdevapi.FilterableStatement
Type Parameters
<STMT_T>
statement type
<RES_T>
result type
Imports
java.util.Arrays, .List, .Map, java.util.concurrent.CompletableFuture, java.util.stream.IntStream

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Statement.LockContention

The lock contention options for the locking modes available.

Method Summary

Modifier and TypeMethod and Description
public default STMT_T

Returns:

this statement
bind
(String
argument name
argName
,
Object
object to bind
value
)

Bind the named argument to the given value.

public default STMT_T

Returns:

this statement
bind
(Map<String, Object>
the map containing key-value pairs to bind
values
)

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

public default STMT_T

Returns:

this statement
bind
(List<Object>
list of objects to bind
values
)

Bind a list of objects numerically starting at 0.

public default STMT_T

Returns:

this statement
bind
(Object...
one or more objects to bind
values
)

Bind an array of objects numerically starting at 0.

public default STMT_T

Returns:

this statement
clearBindings
()

Clear all bindings for this statement.

public RES_T

Returns:

result of statement execution
execute
()

Execute the statement synchronously.

public CompletableFuture<RES_T>

Returns:

CompletableFuture for result
executeAsync
()

Execute the statement asynchronously.

Method Detail

bindback to summary
public default STMT_T bind(String argName, Object value)

Bind the named argument to the given value.

Parameters
argName:String

argument name

value:Object

object to bind

Returns:STMT_T

this statement

bindback to summary
public 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:Map<String, Object>

the map containing key-value pairs to bind

Returns:STMT_T

this statement

Annotations
@SuppressWarnings:unchecked
bindback to summary
public default STMT_T bind(List<Object> values)

Bind a list of objects numerically starting at 0.

Parameters
values:List<Object>

list of objects to bind

Returns:STMT_T

this statement

Annotations
@SuppressWarnings:unchecked
bindback to summary
public default STMT_T bind(Object... values)

Bind an array of objects numerically starting at 0.

Parameters
values:Object[]

one or more objects to bind

Returns:STMT_T

this statement

clearBindingsback to summary
public default STMT_T clearBindings()

Clear all bindings for this statement.

Returns:STMT_T

this statement

executeback to summary
public RES_T execute()

Execute the statement synchronously.

Returns:RES_T

result of statement execution

executeAsyncback to summary
public CompletableFuture<RES_T> executeAsync()

Execute the statement asynchronously.

Returns:CompletableFuture<RES_T>

CompletableFuture for result

com.mysql.cj.xdevapi back to summary

public final Enum Statement.LockContention

extends Enum<Statement.LockContention>
Class Inheritance

The lock contention options for the locking modes available.

Field Summary

Modifier and TypeField and Description
public static final Statement.LockContention
DEFAULT

Default behavior.

public static final Statement.LockContention
NOWAIT

Do not wait to acquire row lock.

public static final Statement.LockContention
SKIP_LOCKED

Do not wait to acquire a row lock.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Statement.LockContention
public static Statement.LockContention[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final Statement.LockContention DEFAULT

Default behavior. Wait until the row lock is released.

NOWAITback to summary
public static final Statement.LockContention NOWAIT

Do not wait to acquire row lock. Fail with an error if a requested row is locked.

SKIP_LOCKEDback to summary
public static final Statement.LockContention SKIP_LOCKED

Do not wait to acquire a row lock. Remove locked rows from the result set.

Constructor Detail

LockContentionback to summary
private LockContention()

Method Detail

valueOfback to summary
public static Statement.LockContention valueOf(String name)
valuesback to summary
public static Statement.LockContention[] values()