Package io.agroal.test
Interface MockStatement
-
- All Superinterfaces:
AutoCloseable,Statement,Wrapper
- All Known Implementing Classes:
MockStatement.Empty
public interface MockStatement extends Statement
- Author:
- Luis Barreiro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMockStatement.Empty
-
Field Summary
Fields Modifier and Type Field Description static int[]BATCHstatic long[]LARGE_BATCH-
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidaddBatch(String sql)default voidcancel()default voidclearBatch()default voidclearWarnings()default voidclose()default voidcloseOnCompletion()default booleanexecute(String sql)default booleanexecute(String sql, int autoGeneratedKeys)default booleanexecute(String sql, int[] columnIndexes)default booleanexecute(String sql, String[] columnNames)default int[]executeBatch()default long[]executeLargeBatch()default longexecuteLargeUpdate(String sql)default longexecuteLargeUpdate(String sql, int autoGeneratedKeys)default longexecuteLargeUpdate(String sql, int[] columnIndexes)default longexecuteLargeUpdate(String sql, String[] columnNames)default ResultSetexecuteQuery(String sql)default intexecuteUpdate(String sql)default intexecuteUpdate(String sql, int autoGeneratedKeys)default intexecuteUpdate(String sql, int[] columnIndexes)default intexecuteUpdate(String sql, String[] columnNames)default ConnectiongetConnection()default intgetFetchDirection()default intgetFetchSize()default ResultSetgetGeneratedKeys()default longgetLargeMaxRows()default longgetLargeUpdateCount()default intgetMaxFieldSize()default intgetMaxRows()default booleangetMoreResults()default booleangetMoreResults(int current)default intgetQueryTimeout()default ResultSetgetResultSet()default intgetResultSetConcurrency()default intgetResultSetHoldability()default intgetResultSetType()default intgetUpdateCount()default SQLWarninggetWarnings()default booleanisClosed()default booleanisCloseOnCompletion()default booleanisPoolable()default booleanisWrapperFor(Class<?> iface)default voidsetCursorName(String name)default voidsetEscapeProcessing(boolean enable)default voidsetFetchDirection(int direction)default voidsetFetchSize(int rows)default voidsetLargeMaxRows(long max)default voidsetMaxFieldSize(int max)default voidsetMaxRows(int max)default voidsetPoolable(boolean poolable)default voidsetQueryTimeout(int seconds)default <T> Tunwrap(Class<T> iface)-
Methods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, isSimpleIdentifier
-
-
-
-
Method Detail
-
getLargeUpdateCount
default long getLargeUpdateCount() throws SQLException- Specified by:
getLargeUpdateCountin interfaceStatement- Throws:
SQLException
-
getLargeMaxRows
default long getLargeMaxRows() throws SQLException- Specified by:
getLargeMaxRowsin interfaceStatement- Throws:
SQLException
-
setLargeMaxRows
default void setLargeMaxRows(long max) throws SQLException- Specified by:
setLargeMaxRowsin interfaceStatement- Throws:
SQLException
-
executeLargeBatch
default long[] executeLargeBatch() throws SQLException- Specified by:
executeLargeBatchin interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
default long executeLargeUpdate(String sql) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
default long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
default long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeLargeUpdate
default long executeLargeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Throws:
SQLException
-
executeQuery
default ResultSet executeQuery(String sql) throws SQLException
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeUpdate
default int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
close
default void close() throws SQLException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException
-
getMaxFieldSize
default int getMaxFieldSize() throws SQLException- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException
-
setMaxFieldSize
default void setMaxFieldSize(int max) throws SQLException- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException
-
getMaxRows
default int getMaxRows() throws SQLException- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException
-
setMaxRows
default void setMaxRows(int max) throws SQLException- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException
-
setEscapeProcessing
default void setEscapeProcessing(boolean enable) throws SQLException- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException
-
getQueryTimeout
default int getQueryTimeout() throws SQLException- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setQueryTimeout
default void setQueryTimeout(int seconds) throws SQLException- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException
-
cancel
default void cancel() throws SQLException- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-
getWarnings
default SQLWarning getWarnings() throws SQLException
- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException
-
clearWarnings
default void clearWarnings() throws SQLException- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
setCursorName
default void setCursorName(String name) throws SQLException
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
execute
default boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSet
default ResultSet getResultSet() throws SQLException
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getUpdateCount
default int getUpdateCount() throws SQLException- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
getMoreResults
default boolean getMoreResults() throws SQLException- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getFetchDirection
default int getFetchDirection() throws SQLException- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchDirection
default void setFetchDirection(int direction) throws SQLException- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
getFetchSize
default int getFetchSize() throws SQLException- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException
-
setFetchSize
default void setFetchSize(int rows) throws SQLException- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
getResultSetConcurrency
default int getResultSetConcurrency() throws SQLException- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetType
default int getResultSetType() throws SQLException- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
addBatch
default void addBatch(String sql) throws SQLException
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
clearBatch
default void clearBatch() throws SQLException- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
executeBatch
default int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
getConnection
default Connection getConnection() throws SQLException
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getMoreResults
default boolean getMoreResults(int current) throws SQLException- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
default ResultSet getGeneratedKeys() throws SQLException
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
executeUpdate
default int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
default int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
default int executeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
default boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
default boolean execute(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
default boolean execute(String sql, String[] columnNames) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
default int getResultSetHoldability() throws SQLException- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
isClosed
default boolean isClosed() throws SQLException- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
isPoolable
default boolean isPoolable() throws SQLException- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
setPoolable
default void setPoolable(boolean poolable) throws SQLException- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
closeOnCompletion
default void closeOnCompletion() throws SQLException- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
default boolean isCloseOnCompletion() throws SQLException- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-
unwrap
default <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
default boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
-