OpenM++ runtime library (libopenm)
openm::ModelAggregationSql Class Reference

class to produce aggregation sql for otput table More...

#include <modelExpressionSql.h>

Inheritance diagram for openm::ModelAggregationSql:
Collaboration diagram for openm::ModelAggregationSql:

Public Member Functions

 ModelAggregationSql (const string &i_accTableName, const vector< string > &i_dimCols, const vector< int > &i_accIds, const vector< string > &i_accNames, const vector< string > &i_accCols)
 create aggregation sql builder for output table. More...
 
 ~ModelAggregationSql () noexcept
 release sql builder resources.
 
const string translateAggregationExpr (const string &i_outTableName, const string &i_name, const string &i_colName, const string &i_expr)
 translate output aggregation expression into sql. More...
 
- Public Member Functions inherited from openm::ModelBaseExpressionSql
 ModelBaseExpressionSql (const string &i_accTableName, const vector< string > &i_dimCols, const vector< int > &i_accIds, const vector< string > &i_accNames, const vector< string > &i_accCols)
 initialization: store output table definition parts. More...
 
 ~ModelBaseExpressionSql () noexcept
 release sql builder resources.
 

Additional Inherited Members

- Protected Member Functions inherited from openm::ModelBaseExpressionSql
const string translateAllSimpleFnc (const string &i_srcMsg, bool i_isSkipAggr, const string &i_expr)
 translate (substitute) all non-aggregation functions More...
 
- Static Protected Member Functions inherited from openm::ModelBaseExpressionSql
static const string translateSimpleFnc (const string &i_srcMsg, FncCode i_code, const string &i_arg)
 translate (substitute) non-aggregation function More...
 
- Protected Attributes inherited from openm::ModelBaseExpressionSql
const string accTableName
 accumulator database table name
 
const vector< string > dimCols
 names of table dimensions
 
const vector< int > accIds
 ids of table accumulators
 
const vector< string > accNames
 names of table accumulators: Acc0, Acc1
 
const vector< string > accCols
 column names of table accumulators: acc0, acc1
 
int accCount
 number of accumulators
 

Detailed Description

class to produce aggregation sql for otput table

Constructor & Destructor Documentation

◆ ModelAggregationSql()

openm::ModelAggregationSql::ModelAggregationSql ( const string &  i_accTableName,
const vector< string > &  i_dimCols,
const vector< int > &  i_accIds,
const vector< string > &  i_accNames,
const vector< string > &  i_accCols 
)
inline

create aggregation sql builder for output table.

Parameters
[in]i_accTableNameaccumulator table name in database
[in]i_dimColscolumn names of table dimensions
[in]i_accIdsids of table accumulators
[in]i_accNamesnames of table accumulators
[in]i_accColscolumns names of table accumulators

Member Function Documentation

◆ translateAggregationExpr()

const string ModelAggregationSql::translateAggregationExpr ( const string &  i_outTableName,
const string &  i_name,
const string &  i_colName,
const string &  i_expr 
)

translate output aggregation expression into sql.

translate output aggregation expression into sql

Parameters
i_outTableNameoutput table name
i_nameexpression name
i_colNameexpression column name
i_exprsource expression, ie: OM_AVG(acc2).
Returns
aggergation sql select query

The documentation for this class was generated from the following files: