Package com.lucidworks.apollo.blob.sql
Class SQLHelper
java.lang.Object
com.lucidworks.apollo.blob.sql.SQLHelper
Helper class for common SQL tasks like getting data sources, etc. Mainly used by JDBC*Stage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongaddResultsToContext(ResultSet rs, String pre, com.lucidworks.apollo.pipeline.Context context) longaddResultsToRequest(ResultSet rs, String pre, com.lucidworks.apollo.common.pipeline.PipelineDocument doc) voidbindStatement(PreparedStatement stmt, List<String> keys, com.lucidworks.apollo.pipeline.Context context, com.lucidworks.apollo.common.pipeline.PipelineDocument doc) First check the context and then check the field.protected StringconstructPropertyName(String pre, String colName, int rowId) Given a data source description, return a JDBC connection from the cache based off of the DBCP DataSourcevoidsetFetchSize(Statement stmt, int size) void
-
Field Details
-
ROWS_RETRIEVED_KEY
- See Also:
-
dataSourceProvider
-
-
Constructor Details
-
SQLHelper
-
-
Method Details
-
getConnection
Given a data source description, return a JDBC connection from the cache based off of the DBCP DataSource- Parameters:
dsd-- Returns:
- Throws:
ExecutionExceptionSQLException
-
bindStatement
public void bindStatement(PreparedStatement stmt, List<String> keys, com.lucidworks.apollo.pipeline.Context context, com.lucidworks.apollo.common.pipeline.PipelineDocument doc) throws SQLException First check the context and then check the field. If the field matches, use the first value- Parameters:
stmt-keys-context-doc-- Throws:
SQLException
-
setRows
- Throws:
SQLException
-
setFetchSize
- Throws:
SQLException
-
addResultsToContext
public long addResultsToContext(ResultSet rs, String pre, com.lucidworks.apollo.pipeline.Context context) throws SQLException - Throws:
SQLException
-
addResultsToRequest
public long addResultsToRequest(ResultSet rs, String pre, com.lucidworks.apollo.common.pipeline.PipelineDocument doc) throws SQLException - Throws:
SQLException
-
constructPropertyName
-