Class DataCloudStatement
- java.lang.Object
-
- com.salesforce.datacloud.jdbc.core.DataCloudStatement
-
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
DataCloudPreparedStatement
public class DataCloudStatement extends Object implements Statement
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBATCH_EXECUTION_IS_NOT_SUPPORTEDprotected DataCloudConnectiondataCloudConnectionstatic intDEFAULT_QUERY_TIMEOUTprotected QueryStatusListenerlistenerprotected static StringNOT_SUPPORTED_IN_DATACLOUD_QUERYprotected ResultSetresultSet-
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
-
-
Constructor Summary
Constructors Constructor Description DataCloudStatement(@NonNull DataCloudConnection connection)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
-
-
-
Field Detail
-
resultSet
protected ResultSet resultSet
-
NOT_SUPPORTED_IN_DATACLOUD_QUERY
protected static final String NOT_SUPPORTED_IN_DATACLOUD_QUERY
- See Also:
- Constant Field Values
-
BATCH_EXECUTION_IS_NOT_SUPPORTED
protected static final String BATCH_EXECUTION_IS_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
DEFAULT_QUERY_TIMEOUT
public static final int DEFAULT_QUERY_TIMEOUT
- See Also:
- Constant Field Values
-
dataCloudConnection
protected final DataCloudConnection dataCloudConnection
-
listener
protected QueryStatusListener listener
-
-
Constructor Detail
-
DataCloudStatement
public DataCloudStatement(@NonNull @NonNull DataCloudConnection connection)
-
-
Method Detail
-
getQueryExecutor
protected HyperGrpcClientExecutor getQueryExecutor()
-
getQueryExecutor
protected HyperGrpcClientExecutor getQueryExecutor(QueryParam additionalQueryParams)
-
isReady
public boolean isReady()
-
execute
public boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery(String sql) throws SQLException
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeSyncQuery
public DataCloudResultSet executeSyncQuery(String sql) throws SQLException
- Throws:
SQLException
-
executeSyncQuery
protected DataCloudResultSet executeSyncQuery(String sql, HyperGrpcClientExecutor client) throws SQLException
- Throws:
SQLException
-
executeAdaptiveQuery
public DataCloudResultSet executeAdaptiveQuery(String sql) throws SQLException
- Throws:
SQLException
-
executeAdaptiveQuery
protected DataCloudResultSet executeAdaptiveQuery(String sql, HyperGrpcClientExecutor client, Duration timeout) throws SQLException
- Throws:
SQLException
-
executeAsyncQuery
public DataCloudStatement executeAsyncQuery(String sql) throws SQLException
- Throws:
SQLException
-
executeAsyncQuery
protected DataCloudStatement executeAsyncQuery(String sql, HyperGrpcClientExecutor client) throws SQLException
- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
close
public void close() throws SQLException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException
-
getMaxFieldSize
public int getMaxFieldSize()
- Specified by:
getMaxFieldSizein interfaceStatement
-
setMaxFieldSize
public void setMaxFieldSize(int max)
- Specified by:
setMaxFieldSizein interfaceStatement
-
getMaxRows
public int getMaxRows()
- Specified by:
getMaxRowsin interfaceStatement
-
setMaxRows
public void setMaxRows(int max)
- Specified by:
setMaxRowsin interfaceStatement
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable)
- Specified by:
setEscapeProcessingin interfaceStatement
-
getQueryTimeout
public int getQueryTimeout()
- Specified by:
getQueryTimeoutin interfaceStatement
-
setQueryTimeout
public void setQueryTimeout(int seconds)
- Specified by:
setQueryTimeoutin interfaceStatement
-
getWarnings
public SQLWarning getWarnings()
- Specified by:
getWarningsin interfaceStatement
-
clearWarnings
public void clearWarnings()
- Specified by:
clearWarningsin interfaceStatement
-
setCursorName
public void setCursorName(String name)
- Specified by:
setCursorNamein interfaceStatement
-
getResultSet
public ResultSet getResultSet() throws SQLException
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getUpdateCount
public int getUpdateCount()
- Specified by:
getUpdateCountin interfaceStatement
-
getMoreResults
public boolean getMoreResults()
- Specified by:
getMoreResultsin interfaceStatement
-
setFetchDirection
public void setFetchDirection(int direction)
- Specified by:
setFetchDirectionin interfaceStatement
-
getFetchDirection
public int getFetchDirection()
- Specified by:
getFetchDirectionin interfaceStatement
-
setFetchSize
public void setFetchSize(int rows)
- Specified by:
setFetchSizein interfaceStatement
-
getFetchSize
public int getFetchSize()
- Specified by:
getFetchSizein interfaceStatement
-
getResultSetConcurrency
public int getResultSetConcurrency()
- Specified by:
getResultSetConcurrencyin interfaceStatement
-
getResultSetType
public int getResultSetType()
- Specified by:
getResultSetTypein interfaceStatement
-
addBatch
public void addBatch(String sql) throws SQLException
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
clearBatch
public void clearBatch() throws SQLException- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
getConnection
public Connection getConnection()
- Specified by:
getConnectionin interfaceStatement
-
getMoreResults
public boolean getMoreResults(int current)
- Specified by:
getMoreResultsin interfaceStatement
-
getGeneratedKeys
public ResultSet getGeneratedKeys()
- Specified by:
getGeneratedKeysin interfaceStatement
-
executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, String[] columnNames) throws SQLException
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
public int getResultSetHoldability()
- Specified by:
getResultSetHoldabilityin interfaceStatement
-
setPoolable
public void setPoolable(boolean poolable)
- Specified by:
setPoolablein interfaceStatement
-
isPoolable
public boolean isPoolable()
- Specified by:
isPoolablein interfaceStatement
-
closeOnCompletion
public void closeOnCompletion()
- Specified by:
closeOnCompletionin interfaceStatement
-
isCloseOnCompletion
public boolean isCloseOnCompletion()
- Specified by:
isCloseOnCompletionin interfaceStatement
-
unwrap
public <T> T unwrap(Class<T> iFace) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iFace)
- Specified by:
isWrapperForin interfaceWrapper
-
-