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

class to build model creation sql from metadata rows. More...

#include <modelSqlBuilder.h>

Inheritance diagram for openm::ModelSqlBuilder:
Collaboration diagram for openm::ModelSqlBuilder:

Public Member Functions

 ModelSqlBuilder (const string &i_providerNames, const string &i_sqlDir, const string &i_outputDir, const string &i_sqliteDir)
 create new model builder.
 
 ~ModelSqlBuilder () noexcept
 release builder resources.
 
bool isSqliteDb (void) const override
 if true then create SQLite database More...
 
void setModelMetaRows (MetaModelHolder &io_metaRows) const override
 set meta rows values and calculate digests for types, parameters, tables and model More...
 
void build (MetaModelHolder &io_metaRows) override
 update metadata and write sql script to create new model from supplied metadata rows More...
 
void beginWorkset (const MetaModelHolder &i_metaRows, MetaSetLangHolder &io_metaSet) override
 start sql script to create new working set More...
 
void addWorksetParameter (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet, const string &i_name, int i_subId, const string &i_value) override
 append scalar parameter value to sql script for new working set creation More...
 
void addWorksetParameter (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet, const string &i_name, int i_subId, const list< string > &i_valueLst) override
 append parameter values to sql script for new working set creation More...
 
void endWorkset (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet) override
 finish sql script to create new working set More...
 
void buildCompatibilityViews (const MetaModelHolder &i_metaRows) const override
 write sql script to create backward compatibility views More...
 
virtual bool isSqliteDb (void) const =0
 if true then create SQLite database More...
 
virtual void setModelMetaRows (MetaModelHolder &io_metaRows) const =0
 set meta rows values and calculate digests for types, parameters, tables and model More...
 
virtual void build (MetaModelHolder &io_metaRows)=0
 update metadata and write sql script to create new model from supplied metadata rows More...
 
virtual void beginWorkset (const MetaModelHolder &i_metaRows, MetaSetLangHolder &io_metaSet)=0
 start sql script to create new working set More...
 
virtual void addWorksetParameter (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet, const string &i_name, int i_subId, const string &i_value)=0
 append scalar parameter value to sql script for new working set creation More...
 
virtual void addWorksetParameter (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet, const string &i_name, int i_subId, const list< string > &i_valueLst)=0
 append parameter values to sql script for new working set creation More...
 
virtual void endWorkset (const MetaModelHolder &i_metaRows, const MetaSetLangHolder &i_metaSet)=0
 finish sql script to create new working set More...
 
virtual void buildCompatibilityViews (const MetaModelHolder &i_metaRows) const =0
 write sql script to create backward compatibility views More...
 

Additional Inherited Members

- Static Public Member Functions inherited from openm::IModelBuilder
static IModelBuildercreate (const string &i_providerNames, const string &i_sqlDir, const string &i_outputDir, const string &i_sqliteDir)
 new model builder to create sql script specific to each db-provider.
 

Detailed Description

class to build model creation sql from metadata rows.

Member Function Documentation

◆ addWorksetParameter() [1/2]

void ModelSqlBuilder::addWorksetParameter ( const MetaModelHolder i_metaRows,
const MetaSetLangHolder i_metaSet,
const string &  i_name,
int  i_subId,
const list< string > &  i_valueLst 
)
overridevirtual

append parameter values to sql script for new working set creation

Implements openm::IModelBuilder.

◆ addWorksetParameter() [2/2]

void ModelSqlBuilder::addWorksetParameter ( const MetaModelHolder i_metaRows,
const MetaSetLangHolder i_metaSet,
const string &  i_name,
int  i_subId,
const string &  i_value 
)
overridevirtual

append scalar parameter value to sql script for new working set creation

Implements openm::IModelBuilder.

◆ beginWorkset()

void ModelSqlBuilder::beginWorkset ( const MetaModelHolder i_metaRows,
MetaSetLangHolder io_metaSet 
)
overridevirtual

start sql script to create new working set

Implements openm::IModelBuilder.

◆ build()

void ModelSqlBuilder::build ( MetaModelHolder io_metaRows)
overridevirtual

update metadata and write sql script to create new model from supplied metadata rows

Implements openm::IModelBuilder.

◆ buildCompatibilityViews()

void ModelSqlBuilder::buildCompatibilityViews ( const MetaModelHolder i_metaRows) const
overridevirtual

write sql script to create backward compatibility views

Implements openm::IModelBuilder.

◆ endWorkset()

void ModelSqlBuilder::endWorkset ( const MetaModelHolder i_metaRows,
const MetaSetLangHolder i_metaSet 
)
overridevirtual

finish sql script to create new working set

Implements openm::IModelBuilder.

◆ isSqliteDb()

bool openm::ModelSqlBuilder::isSqliteDb ( void  ) const
inlineoverridevirtual

if true then create SQLite database

Implements openm::IModelBuilder.

◆ setModelMetaRows()

void ModelSqlBuilder::setModelMetaRows ( MetaModelHolder io_metaRows) const
overridevirtual

set meta rows values and calculate digests for types, parameters, tables and model

Implements openm::IModelBuilder.


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