Package com.firebolt.jdbc.statement
Class FireboltStatement
java.lang.Object
com.firebolt.jdbc.JdbcBase
com.firebolt.jdbc.statement.FireboltStatement
- All Implemented Interfaces:
GenericWrapper
,AutoCloseable
,Statement
,Wrapper
- Direct Known Subclasses:
FireboltPreparedStatement
-
Field Summary
FieldsFields 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
-
Constructor Summary
ConstructorsConstructorDescriptionFireboltStatement
(FireboltStatementService statementService, FireboltProperties sessionProperties, FireboltConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
cancel()
void
void
close()
void
close
(boolean removeFromConnection) Closes the Statement and removes the object from the list of Statements kept in theFireboltConnection
if the param removeFromConnection is set to truevoid
boolean
boolean
boolean
boolean
execute
(List<StatementInfoWrapper> statements) void
executeAsync
(String sql) int[]
executeQuery
(String sql) protected ResultSet
executeQuery
(List<StatementInfoWrapper> statementInfoList) int
executeUpdate
(String sql) int
executeUpdate
(String sql, int autoGeneratedKeys) int
executeUpdate
(String sql, int[] columnIndexes) int
executeUpdate
(String sql, String[] columnNames) protected int
int
int
int
int
boolean
boolean
getMoreResults
(int current) protected StatementInfoWrapper
getOneQueryStatementInfo
(List<StatementInfoWrapper> statementInfoList) int
int
int
int
int
boolean
Returns true if the statement has more resultsboolean
isClosed()
boolean
boolean
boolean
Returns true if the statement is currently runningvoid
setCursorName
(String name) void
setEscapeProcessing
(boolean enable) void
setFetchDirection
(int direction) void
setFetchSize
(int rows) void
setMaxFieldSize
(int max) void
setMaxRows
(int max) void
setPoolable
(boolean poolable) void
setQueryTimeout
(int seconds) protected void
Methods inherited from class com.firebolt.jdbc.JdbcBase
addWarning, clearWarnings, getWarnings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.firebolt.jdbc.GenericWrapper
isWrapperFor, unwrap
Methods inherited from interface java.sql.Statement
clearWarnings, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, getWarnings, isSimpleIdentifier, setLargeMaxRows
-
Field Details
-
sessionProperties
-
-
Constructor Details
-
FireboltStatement
public FireboltStatement(FireboltStatementService statementService, FireboltProperties sessionProperties, FireboltConnection connection)
-
-
Method Details
-
executeQuery
- Specified by:
executeQuery
in interfaceStatement
- Throws:
SQLException
-
executeQuery
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Throws:
SQLException
-
execute
- Throws:
SQLException
-
cancel
- Specified by:
cancel
in interfaceStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Throws:
SQLException
-
executeUpdate
- Throws:
SQLException
-
executeAsync
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceStatement
-
getMoreResults
- Specified by:
getMoreResults
in interfaceStatement
- Throws:
SQLException
-
getMaxRows
public int getMaxRows()- Specified by:
getMaxRows
in interfaceStatement
-
setMaxRows
- Specified by:
setMaxRows
in interfaceStatement
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceStatement
- Throws:
SQLException
-
close
Closes the Statement and removes the object from the list of Statements kept in theFireboltConnection
if the param removeFromConnection is set to true- Parameters:
removeFromConnection
- whether theFireboltStatement
must be removed from the parentFireboltConnection
- Throws:
SQLException
-
isClosed
public boolean isClosed() -
getResultSet
- Specified by:
getResultSet
in interfaceStatement
-
getMoreResults
- Specified by:
getMoreResults
in interfaceStatement
- Throws:
SQLException
-
getUpdateCount
public int getUpdateCount()- Specified by:
getUpdateCount
in interfaceStatement
-
closeOnCompletion
public void closeOnCompletion()- Specified by:
closeOnCompletion
in interfaceStatement
-
isCloseOnCompletion
public boolean isCloseOnCompletion()- Specified by:
isCloseOnCompletion
in interfaceStatement
-
getQueryTimeout
public int getQueryTimeout()- Specified by:
getQueryTimeout
in interfaceStatement
-
setQueryTimeout
public void setQueryTimeout(int seconds) - Specified by:
setQueryTimeout
in interfaceStatement
-
validateStatementIsNotClosed
- Throws:
SQLException
-
getOneQueryStatementInfo
protected StatementInfoWrapper getOneQueryStatementInfo(List<StatementInfoWrapper> statementInfoList) throws SQLException - Throws:
SQLException
-
isStatementRunning
public boolean isStatementRunning()Returns true if the statement is currently running- Returns:
- true if the statement is currently running
-
getMaxFieldSize
public int getMaxFieldSize()- Specified by:
getMaxFieldSize
in interfaceStatement
-
setMaxFieldSize
public void setMaxFieldSize(int max) - Specified by:
setMaxFieldSize
in interfaceStatement
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable) - Specified by:
setEscapeProcessing
in interfaceStatement
-
setCursorName
- Specified by:
setCursorName
in interfaceStatement
- Throws:
SQLException
-
getFetchDirection
public int getFetchDirection()- Specified by:
getFetchDirection
in interfaceStatement
-
setFetchDirection
- Specified by:
setFetchDirection
in interfaceStatement
- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSize
in interfaceStatement
- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSize
in interfaceStatement
- Throws:
SQLException
-
getResultSetConcurrency
public int getResultSetConcurrency()- Specified by:
getResultSetConcurrency
in interfaceStatement
-
getResultSetType
public int getResultSetType()- Specified by:
getResultSetType
in interfaceStatement
-
addBatch
-
clearBatch
public void clearBatch()- Specified by:
clearBatch
in interfaceStatement
-
executeBatch
- Specified by:
executeBatch
in interfaceStatement
- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeys
in interfaceStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Throws:
SQLException
-
getResultSetHoldability
public int getResultSetHoldability()- Specified by:
getResultSetHoldability
in interfaceStatement
-
isPoolable
public boolean isPoolable()- Specified by:
isPoolable
in interfaceStatement
-
setPoolable
- Specified by:
setPoolable
in interfaceStatement
- Throws:
SQLException
-
hasMoreResults
public boolean hasMoreResults()Returns true if the statement has more results- Returns:
- true if the statement has more results
-