public class SQLQuery extends ExpressionQuery implements BatchRequestParticipant
| Modifier and Type | Class and Description |
|---|---|
class |
SQLQuery.FetchSizeProperty
Internal class to hold fetch size and whether to set fetch size for connection.
|
class |
SQLQuery.StoredProcMetadataEntry
This class represents a information on a single stored procedure
parameter/result element.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DS_QUERY_TYPE_NORMAL |
static int |
DS_QUERY_TYPE_STORED_PROC |
static int |
ORACLE_REF_CURSOR_TYPE |
| Constructor and Description |
|---|
SQLQuery(DataService dataService,
String queryId,
String configId,
boolean returnGeneratedKeys,
boolean returnUpdatedRowCount,
String[] keyColumns,
String query,
List<QueryParam> queryParams,
Result result,
EventTrigger inputEventTrigger,
EventTrigger outputEventTrigger,
Map<String,String> advancedProperties,
String inputNamespace) |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertToTimestampString(Timestamp sqlTimestamp) |
static String |
convertToTimeString(Time sqlTime) |
org.wso2.carbon.dataservices.common.DBConstants.AutoCommit |
getAutoCommit() |
static String |
getBase64StringFromInputStream(InputStream in) |
SQLConfig |
getConfig() |
static int |
getCurrentRefCursorOrdinal() |
int |
getFetchDirection() |
int |
getFetchSize() |
SQLQuery.FetchSizeProperty |
getFetchSizeProperty() |
String[] |
getKeyColumns() |
int |
getMaxFieldSize() |
int |
getMaxRows() |
List<QueryParam> |
getOutQueryParams() |
int |
getQueryTimeout() |
int |
getQueryType() |
boolean |
hasBatchQuerySupport() |
boolean |
hasOutParams() |
boolean |
hasRefCursor() |
void |
init(String query)
Pre-processing of the query
|
boolean |
isForceJDBCBatchReqs() |
boolean |
isForceStoredProc() |
boolean |
isHasFetchDirection() |
boolean |
isHasFetchSize() |
boolean |
isHasMaxFieldSize() |
boolean |
isHasMaxRows() |
boolean |
isHasQueryTimeout() |
boolean |
isResultOnlyOutParams() |
boolean |
isReturnGeneratedKeys() |
boolean |
isReturnUpdatedRowCount() |
String[] |
lookupConnectionCredentials() |
void |
releaseBatchRequestResources()
release resources after the batch request is done
|
void |
runPostQuery(Object result,
XMLStreamWriter xmlWriter,
InternalParamCollection params,
int queryLevel)
This method must be implemented by concrete implementations of this class,
to provide the logic to execute the query.
|
Object |
runPreQuery(InternalParamCollection params,
int queryLevel)
This method must be implemented by concrete implementations of this class,
to provide the logic to execute the query.
|
static void |
setCurrentRefCursorOrdinal(int ordinal) |
createProcessedQuery, getParamCount, getQuery, isDynamicQuery, processDynamicQueryaddQueryPreprocessedObject, execute, getAdvancedProperties, getAndRemoveQueryPreprocessObject, getConfigId, getCurrentInternalParams, getDataService, getInputEventTrigger, getInputNamespace, getOutputEventTrigger, getQueryId, getQueryParams, getResult, hasResult, isPreBuildResult, isQueryPreprocessInitial, isQueryPreprocessSecondary, isUsingColumnNumbers, isWriteRow, resetCurrentInternalParams, resetQueryPreprocessing, setCurrentInternalParams, setQueryPreprocessingInitial, setQueryPreprocessingSecondary, writeResultEntryaddAttribute, endElement, getNamespace, setNamespace, startRowElement, startWrapperElement, writeResultElementpublic static final int DS_QUERY_TYPE_NORMAL
public static final int DS_QUERY_TYPE_STORED_PROC
public static final int ORACLE_REF_CURSOR_TYPE
public SQLQuery(DataService dataService, String queryId, String configId, boolean returnGeneratedKeys, boolean returnUpdatedRowCount, String[] keyColumns, String query, List<QueryParam> queryParams, Result result, EventTrigger inputEventTrigger, EventTrigger outputEventTrigger, Map<String,String> advancedProperties, String inputNamespace) throws DataServiceFault
DataServiceFaultpublic static int getCurrentRefCursorOrdinal()
public static void setCurrentRefCursorOrdinal(int ordinal)
public void init(String query) throws DataServiceFault
ExpressionQueryinit in class ExpressionQueryquery - QueryDataServiceFaultpublic org.wso2.carbon.dataservices.common.DBConstants.AutoCommit getAutoCommit()
public boolean hasBatchQuerySupport()
public String[] getKeyColumns()
public boolean isReturnGeneratedKeys()
public boolean isReturnUpdatedRowCount()
public boolean isForceStoredProc()
public boolean isForceJDBCBatchReqs()
public boolean isHasFetchDirection()
public boolean isHasFetchSize()
public boolean isHasMaxFieldSize()
public boolean isHasMaxRows()
public boolean isHasQueryTimeout()
public int getFetchDirection()
public int getFetchSize()
public int getMaxFieldSize()
public int getMaxRows()
public int getQueryTimeout()
public SQLQuery.FetchSizeProperty getFetchSizeProperty()
public boolean hasOutParams()
public boolean isResultOnlyOutParams()
public List<QueryParam> getOutQueryParams()
public int getQueryType()
public SQLConfig getConfig()
public String[] lookupConnectionCredentials() throws DataServiceFault
DataServiceFaultpublic static String getBase64StringFromInputStream(InputStream in) throws SQLException
SQLExceptionpublic boolean hasRefCursor()
public Object runPreQuery(InternalParamCollection params, int queryLevel) throws DataServiceFault
QueryrunPreQuery in class QueryDataServiceFaultpublic void runPostQuery(Object result, XMLStreamWriter xmlWriter, InternalParamCollection params, int queryLevel) throws DataServiceFault
QueryrunPostQuery in class QueryDataServiceFaultpublic void releaseBatchRequestResources()
BatchRequestParticipantreleaseBatchRequestResources in interface BatchRequestParticipantCopyright © 2018 WSO2. All rights reserved.