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 SqlStatementbind(java.util.List<java.lang.Object> values)Bind a list of objects numerically starting at 0.SqlStatementbind(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.SqlStatementclearBindings()Clear all bindings for this statement.SqlResultexecute()Execute the statement synchronously.java.util.concurrent.CompletableFuture<SqlResult>executeAsync()Execute the statement asynchronously.
-
Constructor Details
-
SqlStatementImpl
Constructor.- Parameters:
mysqlxSession-Sessioninstance.sql- SQL statement string.
-
-
Method Details
-
execute
Description copied from interface:StatementExecute the statement synchronously.- Specified by:
executein interfaceStatement<SqlStatement,SqlResult>- Returns:
- result of statement execution
-
executeAsync
Description copied from interface:StatementExecute the statement asynchronously.- Specified by:
executeAsyncin interfaceStatement<SqlStatement,SqlResult>- Returns:
CompletableFuturefor result
-
clearBindings
Description copied from interface:StatementClear all bindings for this statement.- Specified by:
clearBindingsin interfaceStatement<SqlStatement,SqlResult>- Returns:
- this statement
-
bind
Description copied from interface:StatementBind a list of objects numerically starting at 0.- Specified by:
bindin interfaceStatement<SqlStatement,SqlResult>- Parameters:
values- list of objects to bind- Returns:
- this statement
-
bind
Description copied from interface:StatementBind the set of arguments named by the keys in the map to the associated values in the map.- Specified by:
bindin interfaceStatement<SqlStatement,SqlResult>- Parameters:
values- the map containing key-value pairs to bind- Returns:
- this statement
-