Package com.mysql.cj.xdevapi
Interface Statement<STMT_T,RES_T>
- Type Parameters:
STMT_T- statement typeRES_T- result type
- All Known Subinterfaces:
AddStatement,DeleteStatement,FindStatement,InsertStatement,ModifyStatement,RemoveStatement,SelectStatement,SqlStatement,UpdateStatement
- All Known Implementing Classes:
AddStatementImpl,DeleteStatementImpl,FilterableStatement,FindStatementImpl,InsertStatementImpl,ModifyStatementImpl,RemoveStatementImpl,SelectStatementImpl,SqlStatementImpl,UpdateStatementImpl
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 Modifier and Type Interface Description static classStatement.LockContentionThe lock contention options for the locking modes available. -
Method Summary
Modifier and Type Method Description default STMT_Tbind(java.lang.Object... values)Bind an array of objects numerically starting at 0.default STMT_Tbind(java.lang.String argName, java.lang.Object value)Bind the named argument to the given value.default STMT_Tbind(java.util.List<java.lang.Object> values)Bind a list of objects numerically starting at 0.default STMT_Tbind(java.util.Map<java.lang.String,java.lang.Object> values)Bind the set of arguments named by the keys in the map to the associated values in the map.default STMT_TclearBindings()Clear all bindings for this statement.RES_Texecute()Execute the statement synchronously.java.util.concurrent.CompletableFuture<RES_T>executeAsync()Execute the statement asynchronously.
-
Method Details
-
execute
RES_T execute()Execute the statement synchronously.- Returns:
- result of statement execution
-
executeAsync
java.util.concurrent.CompletableFuture<RES_T> executeAsync()Execute the statement asynchronously.- Returns:
CompletableFuturefor result
-
clearBindings
Clear all bindings for this statement.- Returns:
- this statement
-
bind
Bind the named argument to the given value.- Parameters:
argName- argument namevalue- object to bind- Returns:
- this statement
-
bind
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
Bind a list of objects numerically starting at 0.- Parameters:
values- list of objects to bind- Returns:
- this statement
-
bind
Bind an array of objects numerically starting at 0.- Parameters:
values- one or more objects to bind- Returns:
- this statement
-