Package com.mysql.cj.xdevapi
Class SqlStatementImpl
java.lang.Object
com.mysql.cj.xdevapi.SqlStatementImpl
- All Implemented Interfaces:
SqlStatement
,Statement<SqlStatement,SqlResult>
public class SqlStatementImpl extends java.lang.Object implements SqlStatement
SqlStatement
implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.Statement
Statement.LockContention
-
Constructor Summary
Constructors Constructor Description SqlStatementImpl(MysqlxSession mysqlxSession, java.lang.String sql)
Constructor. -
Method Summary
Modifier and Type Method Description SqlStatement
bind(java.util.List<java.lang.Object> values)
Bind a list of objects numerically starting at 0.SqlStatement
bind(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.SqlStatement
clearBindings()
Clear all bindings for this statement.SqlResult
execute()
Execute the statement synchronously.java.util.concurrent.CompletableFuture<SqlResult>
executeAsync()
Execute the statement asynchronously.
-
Constructor Details
-
SqlStatementImpl
Constructor.- Parameters:
mysqlxSession
-Session
instance.sql
- SQL statement string.
-
-
Method Details
-
execute
Description copied from interface:Statement
Execute the statement synchronously.- Specified by:
execute
in interfaceStatement<SqlStatement,SqlResult>
- Returns:
- result of statement execution
-
executeAsync
Description copied from interface:Statement
Execute the statement asynchronously.- Specified by:
executeAsync
in interfaceStatement<SqlStatement,SqlResult>
- Returns:
CompletableFuture
for result
-
clearBindings
Description copied from interface:Statement
Clear all bindings for this statement.- Specified by:
clearBindings
in interfaceStatement<SqlStatement,SqlResult>
- Returns:
- this statement
-
bind
Description copied from interface:Statement
Bind a list of objects numerically starting at 0.- Specified by:
bind
in interfaceStatement<SqlStatement,SqlResult>
- Parameters:
values
- list of objects to bind- Returns:
- this statement
-
bind
Description copied from interface:Statement
Bind the set of arguments named by the keys in the map to the associated values in the map.- Specified by:
bind
in interfaceStatement<SqlStatement,SqlResult>
- Parameters:
values
- the map containing key-value pairs to bind- Returns:
- this statement
-