Class SimpleSqlQuerySource
- java.lang.Object
- 
- com.inductiveautomation.reporting.gateway.data.queries.SimpleSqlQuerySource
 
- 
- All Implemented Interfaces:
- QuerySource<SimpleSqlQueryConfig>
 
 public class SimpleSqlQuerySource extends java.lang.Object implements QuerySource<SimpleSqlQueryConfig> SimpleSqlQuerySource provides a SQL Query data source that allows for binding-like paths to be added via {} refs in SQL queries.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.inductiveautomation.reporting.gateway.api.QuerySourceQuerySource.SubQueryTransaction
 
- 
 - 
Constructor SummaryConstructors Constructor Description SimpleSqlQuerySource()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description QuerySource.SubQueryTransactionbegin(ReportExecutionContext context, SimpleSqlQueryConfig config, java.util.Map<java.lang.String,java.lang.Object> extraConfigs, QueryResults parent)Begin a nested query "transaction".java.lang.StringgetId()The unique ID for this query source.Datasetquery(ReportExecutionContext execContext, SimpleSqlQueryConfig config, java.util.Map<java.lang.String,java.lang.Object> extraConfigs)Execute a top level query.
 
- 
- 
- 
Method Detail- 
getIdpublic java.lang.String getId() Description copied from interface:QuerySourceThe unique ID for this query source. Should be qualified with module name first- Specified by:
- getIdin interface- QuerySource<SimpleSqlQueryConfig>
 
 - 
querypublic Dataset query(ReportExecutionContext execContext, SimpleSqlQueryConfig config, java.util.Map<java.lang.String,java.lang.Object> extraConfigs) throws java.lang.Exception Description copied from interface:QuerySourceExecute a top level query.- Specified by:
- queryin interface- QuerySource<SimpleSqlQueryConfig>
- Parameters:
- execContext- The context for the report being executed.
- config- The config object which was configured in the designer for this query.
- extraConfigs- Extra configuration data the designer may need to send. Unused by most data sources, because the queryConfig should contain all data needed to execute the query. May be null.
- Returns:
- A dataset of results for executing this query
- Throws:
- java.lang.Exception
 
 - 
beginpublic QuerySource.SubQueryTransaction begin(ReportExecutionContext context, SimpleSqlQueryConfig config, java.util.Map<java.lang.String,java.lang.Object> extraConfigs, QueryResults parent) throws java.lang.Exception Description copied from interface:QuerySourceBegin a nested query "transaction". This means that a nested query (defined by a single query config) is about to be executed, and will probably be executed many times.- Specified by:
- beginin interface- QuerySource<SimpleSqlQueryConfig>
- Parameters:
- context- The context for the report being executed
- config- The config object which was configured in designer for this nested query.
- extraConfigs- Extra configuration data the designer may need to send. Unused by most data sources, because the queryConfig should contain all data needed to execute the query. May be null.
- parent- The QueryResults object for the parent query of this nested query.
- Returns:
- A new transaction object to handle the execution of this nested query.
- Throws:
- java.lang.Exception
 
 
- 
 
-