Package com.ocient.jdbc
Class XGStatement
java.lang.Object
com.ocient.jdbc.XGStatement
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
XGPreparedStatement
public class XGStatement extends Object implements Statement
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceXGStatement.ExceptionalRunnableSame asRunnablebut can throw an exception -
Field Summary
Fields Modifier and Type Field Description protected booleanclosedprotected XGConnectionconnprotected booleanforceprotected booleanforceNextRedirectstatic LoggerLOGGERprotected booleanoneShotForceprotected ArrayList<Object>parmsprotected booleanpoolableprotected XGResultSetresultprotected longtimeoutMillisFields 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
Constructors Constructor Description XGStatement(XGConnection conn, boolean shouldRequestVersion)XGStatement(XGConnection conn, boolean force, boolean oneShotForce)XGStatement(XGConnection conn, int type, int concur, boolean force, boolean oneShotForce)XGStatement(XGConnection conn, int type, int concur, int hold, boolean force, boolean oneShotForce) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Field Details
-
LOGGER
-
poolable
protected boolean poolable -
closed
protected boolean closed -
conn
-
result
-
parms
-
force
protected boolean force -
forceNextRedirect
protected boolean forceNextRedirect -
timeoutMillis
protected volatile long timeoutMillis -
oneShotForce
protected boolean oneShotForce
-
-
Constructor Details
-
XGStatement
- Throws:
SQLException
-
XGStatement
- Throws:
SQLException
-
XGStatement
public XGStatement(XGConnection conn, int type, int concur, boolean force, boolean oneShotForce) throws SQLException- Throws:
SQLException
-
XGStatement
public XGStatement(XGConnection conn, int type, int concur, int hold, boolean force, boolean oneShotForce) throws SQLException- Throws:
SQLException
-
-
Method Details
-
setKMLFile
-
returnStatementToCache
public void returnStatementToCache() -
newXGStatement
public static XGStatement newXGStatement(XGConnection conn, boolean shouldRequestVersion) throws SQLException- Throws:
SQLException
-
newXGStatement
public static XGStatement newXGStatement(XGConnection conn, boolean force, boolean oneShotForce) throws SQLException- Throws:
SQLException
-
newXGStatement
public static XGStatement newXGStatement(XGConnection conn, int type, int concur, boolean force, boolean oneShotForce) throws SQLException- Throws:
SQLException
-
newXGStatement
public static XGStatement newXGStatement(XGConnection conn, int type, int concur, int hold, boolean force, boolean oneShotForce) throws SQLException- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
cancel
Kill the currently running query- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-
cancelQuery
- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
dissociateQuery
protected void dissociateQuery()Dissociate the current query with this statement -
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
executeInlinePlan
- Throws:
SQLException
-
executePlan
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
explain
- Throws:
SQLException
-
explainPlan
public String explainPlan(String plan, ClientWireProtocol.ExplainFormat format) throws SQLException- Throws:
SQLException
-
exportView
- Throws:
SQLException
-
exportTable
- Throws:
SQLException
-
exportTranslation
- Throws:
SQLException
-
explainPipeline
- Throws:
SQLException
-
checkData
- Throws:
SQLException
-
fetchSystemMetadataInt
public int fetchSystemMetadataInt(ClientWireProtocol.FetchSystemMetadata.SystemMetadataCall call) throws SQLException- Throws:
SQLException
-
fetchSystemMetadataResultSet
public ResultSet fetchSystemMetadataResultSet(ClientWireProtocol.FetchSystemMetadata.SystemMetadataCall call, String schema, String table, String col, boolean test) throws SQLException- Throws:
SQLException
-
fetchSystemMetadataString
public String fetchSystemMetadataString(ClientWireProtocol.FetchSystemMetadata.SystemMetadataCall call) throws SQLException- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getFetchDirection
- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
getMaxFieldSize
- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException
-
getMaxRows
- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getQueryId
-
getQueryTimeout
- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException
-
getQueryTimeoutMillis
protected long getQueryTimeoutMillis() -
getResultSet
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getResultSetConcurrency
- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
getWarnings
- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException
-
isClosed
- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
killQuery
- Throws:
SQLException
-
listPlan
- Throws:
SQLException
-
passUpCancel
- Throws:
SQLException
-
reset
protected void reset() -
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
setEscapeProcessing
- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
setMaxFieldSize
- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException
-
setMaxRows
- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
setQueryCancelled
public void setQueryCancelled(boolean b) -
setQueryTimeout
- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setRunningQueryThread
-
setForceNextRedirect
public void setForceNextRedirect() -
startTask
protected void startTask(XGStatement.ExceptionalRunnable task, Optional<String> optQueryId, long timeoutMillis) throws ExceptionExecutes a potentially exceptional task, canceling the backing query its it takes longer than the timeout specified bygetQueryTimeout().- Parameters:
task- the task to executeoptQueryId- the query associated with this task. Empty of none existstimeoutMillis- the number of milliseconds to wait before firing off a kill query command to the sql node- Throws:
SQLTimeoutException- if the timeout is reached before the call completesException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-