# Functions
CalculateMicrodata aggregates microdata using group by attributes as dimensions and calculate aggregated measure(s).
CalculateOutputTable read output table page (dimensions and values) and calculate extra measure(s).
CheckOpenmppSchemaVersion return error if it is not openM++ db or schema version incompatible.
CopyParameterFromRun copy parameter metadata and parameter values into workset from model run.
CopyParameterFromWorkset copy parameter metadata and parameter values from one workset to another.
Delete existing model metadata and drop model data tables from database.
DeleteProfile delete rows from profile in profile_lst and profile_option tables.
DeleteProfileOption delete row from profile_option table.
Delete model run: delete metadata, parameters run values and output tables run values from database.
Delete modeling task and task run history from database.
DeleteWorkset delete workset metadata and workset parameter values from database.
DeleteWorksetAllParameters delete all parameters metadata and values from workset.
DeleteWorksetParameter do delete parameter metadata and values from workset.
return empty value of calculation maps.
GetDefaultWorkset return default working set for the model: workset_lst table row.
GetEntityGenList return entity generation rows by run id: entity_gen and entity_gen_attr table rows.
GetFirstRun return first run of the model: run_lst table row.
GetLanguages return language rows from lang_lst join to lang_word tables and map from lang_code to lang_id.
GetLastCompletedRun return last completed run of the model: run_lst table row.
GetLastRun return last run of the model: run_lst table row.
GetLastRunByName return model run row by run name: run_lst table row.
GetModel return model metadata: parameters and output tables definition.
GetModelById return model metadata: parameters and output tables definition.
GetModelId return model id if exists.
GetModelList return list of the models: model_dic table rows.
GetModelRow return model_dic table row by model id.
GetModelOptions return model run_option table rows as map of maps: map(run_id, map(key, value)).
GetModelText return model text metadata: description and notes.
GetModelTextById return model_dic_txt table rows by model id.
GetModelWord return model "words": language-specific stirngs.
GetProfile return profile_option table rows as (key, value) map.
GetProfileList return profile names: profile_lst table rows.
GetRun return model run row by id: run_lst table row.
GetRunAllParamText return all run parameters value notes: run_parameter_txt table rows.
GetRunByDigest return model run row by digest: run_lst table row.
GetRunByDigestStampName return model run row by run digest or run stamp or run name: run_lst table row.
GetRunByName return model run row by run name: run_lst table row.
GetRunByStamp return model run row by run stamp: run_lst table row.
GetRunEntityGenList return run entity rows by model id: run_entity table rows.
GetRunFull return full metadata for model run: run_lst, run_option, run_parameter, run_table, run_progress, and entity generation rows.
GetRunFullText return full metadata, including text, for completed model run: run_lst, run_txt, run_option, run_parameter, run_parameter_txt, run_table, run_progress, and entity generation rows.
GetRunFullTextList return list of full metadata, including text, for model runs: run_lst, run_txt, run_option, run_parameter, run_parameter_txt, run_table, run_progress and entity generation rows.
GetRunList return list of model runs by model_id: run_lst rows.
GetRunListByDigestStampName return list of model run rows by run digest or run stamp or run name: run_lst table rows.
GetRunListText return list of model runs with description and notes: run_lst and run_txt rows.
GetRunOptions return run_option table rows as (key, value) map.
GetRunParamText return run parameter value notes: run_parameter_txt table rows.
GetRunProgress return sub-values run progress for specified run id: run_progress table rows.
GetRunText return model run description and notes: run_txt table rows.
GetTask return modeling task rows by id: task_lst table row and set ids from task_set.
GetTaskByName return modeling task rows by id: task_lst table row and set ids from task_set.
GetTaskFirstRun return first run of the modeling task: task_run_lst table row.
GetTaskFull return modeling task metadata, description, notes and run history from db-tables: task_lst, task_txt, task_set, task_run_lst, task_run_set.
GetTaskFullList return list of modeling tasks metadata, description, notes and run history from db-tables: task_lst, task_txt, task_set, task_run_lst, task_run_set.
GetTaskLastCompletedRun return last completed run of the modeling task: task_run_lst table row.
GetTaskLastRun return last run of the modeling task: task_run_lst table row.
GetTaskList return list of model tasks: task_lst rows.
GetTaskListText return list of modeling tasks with description and notes: task_lst and task_txt rows.
GetTaskRun return modeling task run status: task_run_lst table row.
GetTaskRunByName return modeling task run status by task id and task run name: task_run_lst table row.
GetTaskRunByStamp return modeling task run status by task id and task run stamp: task_run_lst table row.
GetTaskRunByStampOrName return modeling task run status by task id and task run stamp or task run name: task_run_lst table row.
GetTaskRunList return model run history: master row from task_lst and all rows from task_run_lst, task_run_set.
GetTaskRunListByStampOrName return modeling task run rows from task_run_lst table by task id and task run stamp or task run name.
GetTaskRunSetRows return task run body (pairs of run id and set id) by task run id: task_run_set table rows.
GetTaskRunSetText return additinal modeling task text description and notes for all task worksets and model runs: workset_txt, run_txt table rows.
GetTaskSetIds return modeling task set id's by task id from task_set db table.
GetWorkset return working set by id: workset_lst table row.
GetWorksetAllParamText return all workset parameters value notes: workset_parameter_txt table rows.
GetWorksetByName return working set by name.
GetWorksetFull return full workset metadata: workset_lst, workset_txt, workset_parameter, workset_parameter_txt table rows.
GetWorksetFullList return list of full workset metadata: workset_lst, workset_txt, workset_parameter, workset_parameter_txt table rows.
GetWorksetList return list of model worksets: workset_lst rows.
GetWorksetListText return list of model worksets, description and notes: workset_lst and workset_txt rows.
GetWorksetParam return sub-values count and default sub-value id for workset parameter: SELECT sub_count, default_sub_id FROM workset_parameter.
GetWorksetParamList return Hid, sub-values count and default sub-value id for all parameters included in that workset: SELECT parameter_hid, sub_count, default_sub_id FROM workset_parameter.
GetWorksetParamText return parameter value notes: workset_parameter_txt table rows.
GetWorksetRunIds return ids of model run results (run_id) where input parameters are from specified working set.
GetWorksetText return workset description and notes: workset_txt table rows.
return SQLite connection string and driver name based on model name:
Database=modelName.sqlite; Timeout=86400; OpenMode=ReadWrite;.
return read-only SQLite connection string and driver name based on model name:
Database=modelName.sqlite; Timeout=86400; OpenMode=ReadWrite;.
IsRunCompleted return true if run status one of: s=success, x=exit, e=error.
return true if character is can be interpreted as sql ' quote MSSQL silently replace following utf-16 chars with 'single' quote:
ʹ 697 Modifier Letter Prime
ʼ 700 Modifier Letter Apostrophe
ˈ 712 Modifier Letter Vertical Line
′ 8242 Prime
' 65287 Fullwidth Apostrophe
*/.
return default SQLite connection string based on model.sqlite file path:
Database=model.sqlite; Timeout=86400; OpenMode=ReadWrite;.
return default read-only SQLite connection string based on model.sqlite file path:
Database=model.sqlite; Timeout=86400; OpenMode=ReadOnly;.
NameOfRunStatus return short name by run run status code: s=success, x=exit, e=error.
Open database connection.
OpenmppSchemaVersion return db schema: select id_value from id_lst where id_key = 'openmpp'.
ReadMicrodataCalculateTo read aggregated microdata rows (run_id, calc_id, group by attributes, calc_value) and process each row by cvtTo().
ReadMicrodataTo read entity microdata rows (microdata key, attributes) from model run results and process each row by cvtTo().
ReadOutputTableCalculteTo read calculated output table page (run id, expression(s) id, dimensions and values) and process each row by cvtTo().
ReadOutputTableTo read output table page (dimensions and values) from model run results and process each row by cvtTo().
ReadParameterTo read input parameter rows (sub id, dimensions, value) from workset or model run results and process each row by cvtTo().
RenameRun do rename model run if new name is not empty "" string.
RenameTask do rename task if new name is not empty "" string.
RenameWorkset do rename workset if new name is not empty "" string.
SelectFirst select first db row and pass it to cvt() for row.Scan().
SelectRows select db rows and pass each to cvt() for rows.Scan().
SelectRowsTo select db rows and pass each row to cvt().
SelectToList select db rows into list using cvt to convert (scan) each db row into struct.
make sql quoted string, ie: 'O”Brien'.
TrxSelectFirst select first db row in transaction scope and pass it to cvt() for row.Scan().
TrxSelectRows select db rows in transaction scope and pass each to cvt() for rows.Scan().
TrxUpdate execute sql query in transaction scope.
TrxUpdateStatement execute sql statement in transaction scope until put() return true.
Update execute sql query outside of transaction scope (on different connection).
UpdateLanguage insert new or update existing language and words in lang_lst and lang_word tables.
UpdateModel insert new model metadata in database, return true if model inserted or false if already exist.
delete existing and insert new model text (description and notes) in database.
UpdateModelWord insert new or update existing model language-specific strings in model_word table.
UpdateProfile insert new or replace existing profile in profile_lst and profile_option tables.
UpdateProfileOption insert new or replace existing profile option in profile_option table.
UpdateRunParameterText merge (insert or update) run parameter value notes into run_parameter_txt table.
UpdateRunStatus updates run status to the one of run completed: s=success, x=exit, e=error.
UpdateRunValueDigest does recalculate and update run_lst table with new run value digest and return it.
UpdateWorksetParameterText merge parameter value notes into workset_parameter_txt table.
UpdateWorksetReadonly update workset readonly status.
UpdateWorksetReadonlyByName update workset readonly status by workset name.
WriteMicrodataFrom insert microdata values into model run until from() return not nil CellMicro value.
WriteOutputTableFrom insert output table values (accumulators or expressions) into model run from accFrom() and exprFrom() readers.
WriteParameterFrom insert or update parameter values in workset or insert parameter values into model run until from() return not nil CellParam value.
# Constants
dimension enum ids between: dim3 BETWEEN 44 AND 88.
calculated exprssion id offset, for example for Expr1 calculated expression id is 12001.
DB2 db facet.
common default db facet.
d = deleted model run.
s = completed successfully.
dimension equal: dim1 = 12.
e = error failure.
x = exit and not completed.
value greater or equal: attr1 >= 12.
value greater than: attr1 > 12.
auto convert IN list filter into equal or BETWEEN if possible.
i = initial status.
dimension enum ids in: dim2 IN (11, 22, 33).
IsOdbcSupported indicate support of ODBC connections built-in.
value less or equal: attr1 <= 12.
value less than: attr1 < 12.
MaxSchemaVersion is a maximum compatible db schema version.
MinSchemaVersion is a minimal compatible db schema version.
MS SQL db facet.
MySQL and MariaDB facet.
dimension equal: dim1 <> 12.
ODBC db driver name.
Oracle db facet.
PostgreSQL db facet.
p = run in progress.
SQLite db driver name.
default db driver name.
SQLite db facet.
default SQLite busy timeout.
TotalEnumCode is predefined enum code for "total" enum.
w = wait: run in progress, under external supervision.
# Structs
calculation maps between runs digest and id and calculations name and id.
CalculateLayout describes calculation expression for parameters, output table values or microdata entity.
CalculateMicroLayout describes aggregations of microdata.
CalculateLayout describes calculation of output table values.
CellAcc is value of output table accumulator.
CellAccConverter is a converter for output table accumulator to implement CsvConverter interface.
CellAllAcc is value of multiple output table accumulators.
CellAllAccConverter is a converter for multiple output table accumulators to implement CsvConverter interface.
CellCodeAcc is value of output table accumulator.
CellCodeAllAcc is value of multiple output table accumulators.
CellCodeExpr is value of output table expression.
CellCodeMicro is a row of entity microdata: entity_key and attribute values, if attribute type is enum based value is enum code.
CellCodeMicroCalc is value of entity microdata calculated expression.
CellCodeParam is value of input parameter.
CellCodeTableCalc is value of output table calculated expression.
CellMicroConverter is a parent for for entity microdata converters.
CellExpr is value of output table expression.
CellExprConverter is a converter for output table expression to implement CsvConverter interface.
Converter for output table expression to implement CsvLocaleConverter interface.
CellMicro is a row of entity microdata: entity_key and attribute values, if attribute type is enum based value is enum id.
CellMicroCalc is value of entity microdata calculated expression.
CellMicroCalcConverter is a converter for calculated microdata row to implement CsvConverter interface.
CellMicroConverter is a converter for entity microdata row to implement CsvConverter interface.
CellParam is value of input parameter.
CellParamConverter is a converter for input parameter to implement CsvConverter interface.
Converter for input parameter to implement CsvLocaleConverter interface.
CellTableCalc is value of output table calculated expression.
CellTableCalcConverter is a converter for output table calculated cell to implement CsvConverter interface.
CellTableConverter is a parent for for output table converters.
DescrNote is a holder for language code, descripriton and notes.
EntityAttrRow is db row of entity_attr join to model_entity_dic table.
EntityAttrTxtRow is db row of entity_attr_txt join to model_entity_dic table.
EntityDicRow is db row of entity_dic join to model_entity_dic table.
EntityGenMeta is a holder of entity generation db rows from entity_gen, model_entity_dic, entity_gen_attr and run_entity tables Entity generation is a model entity with set of attributes included in particular model run(s).
EntityMeta is entity metadata: entity name, digest, attributes.
EntityRunPub is "public" metadata of entity run generation and attributes for json import-export.
EntityTxtRow is db row of entity_dic_txt join to model_entity_dic table.
FilterColumn define dimension or attribute column and condition to filter enum codes to build select where.
FilterIdColumn define dimension or attribute column and condition to filter enum ids to build select where.
GroupLstRow is db row of group_lst table.
GroupMeta is db rows to describe parent-child group of parameters or output tables, it is join of group_lst to group_pc.
GroupPcRow is db row of group_pc table.
GroupTxtRow is db row of group_txt table.
LangLstRow is db row of lang_lst table.
LangMeta is languages and words for each language.
LangNote is a holder for language code and notes.
ModelDicRow is db row of model_dic table.
ModelMeta is model metadata db rows, language-neutral portion of it.
ModelTxtMeta is language-specific portion of model metadata db rows.
ModelTxtRow is db row of model_dic_txt join to model_dic.
ModelWordMeta is language-specific model_word db rows.
OrderByColumn define column to order by rows selected from parameter or output table.
ParamDicRow is db row of parameter_dic join to model_parameter_dic table
ParamHid (parameter_dic.parameter_hid) is db-unique id of the parameter, use digest to find same parameter in other db.
ParamDimsRow is db row of parameter_dims join to model_parameter_dic table.
ParamDimsTxtRow is db row of parameter_dims_txt join to model_parameter_dic table.
ParamImportRow is db row of model_parameter_import table.
ParamMeta is parameter metadata: parameter name, type, dimensions.
ParamRunSetPub is "public" run or workset parameter value metadata for json import-export.
ParamRunSetTxtPub is "public" run or workset parameter metadata for json import-export: name, description and notes.
ParamTxtRow is db row of parameter_dic_txt join to model_parameter_dic table.
ParamValuePub is "public" run or workset parameter metadata and values for json import-export.
ProfileMeta is rows from profile_option table.
ReadCalculteMicroLayout describe microdata generation read layout, aggregation measures and group by attributes.
ReadCalculteTableLayout describe table read layout and additional measures to calculte.
ReadCompareMicroLayout to compare microdata runs with base run using multiple comparison aggregations and/or calculation aggregations.
ReadCompareTableLayout to compare output table runs with base run using multiple comparison expressions and/or calculation measures.
ReadLayout describes source and size of data page to read input parameter, output table values or microdata.
ReadMicroLayout describes source and size of data page to read entity microdata.
ReadPageLayout describes first row offset and size of data page to read input parameter or output table values.
ReadParamLayout describes source and size of data page to read input parameter values.
ReadSubIdLayout supply sub-value id filter to select rows with only single sub_id from output table or input parameter values.
ReadTableLayout describes source and size of data page to read output table values.
RunEntityRow is db row of run_entity join to entity_gen table.
RunMeta is metadata of model run: name, status, run options, description, notes.
RunParamTxtRow is db row of run_parameter_txt.
RunProgress is a "public" sub-value run_progress db row.
RunPub is "public" model run metadata for json import-export.
RunRow is model run row: run_lst table row.
RunTxtRow is db row of run_txt.
TableAccRow is db row of table_acc join to model_table_dic table.
TableAccTxtRow is db row of table_acc_txt join to model_table_dic table.
TableDicRow is db row of table_dic join to model_table_dic table.
TableDimsRow is db row of table_dims join to model_table_dic table.
TableDimsTxtRow is db row of table_dims_txt join to model_table_dic table.
TableExprRow is db row of table_expr join to model_table_dic table.
TableExprTxtRow is db row of table_expr_txt join to model_table_dic table.
TableMeta is output table metadata: table name, dimensions, accumulators, expressions.
TableRunPub is "public" metadata for output tables included in model run results.
TableTxtRow is db row of table_dic_txt join to model_table_dic table.
TaskDef is modeling task definition: metadata and input worksets.
TaskDefPub is "public" modeling task metadata and task input worksets for json import-export.
TaskMeta is metadata for modeling task: name, status, description, notes, task run history.
TaskPub is "public" modeling task metadata, task input worksets and task run history for json import-export.
TaskRow is db row of task_lst.
TaskRunRow is db row of task_run_lst.
TaskRunSetRow is db row of task_run_set.
TaskRunSetTxt is additional task text: description and notes by language for all input worksets and model runs of the task.
TaskTxtRow is db row of task_txt.
TypeDicRow is db row of type_dic join to model_type_dic table and min, max, count of enum id's.
TypeEnumRow is db row of type_enum_lst join to model_type_dic table.
TypeEnumTxtRow is db row of type_enum_txt join to model_type_dic table.
TypeMeta is type metadata: type name and enums.
TypeTxtRow is db row of type_dic_txt join to model_type_dic table.
WorksetCreatePub is "public" workset metadata and parameters list for json import-export.
WorksetHdrPub is "public" workset metadata for json import-export.
WorksetMeta is a model workset metadata: name, parameters, decription, notes.
WorksetParamTxtRow is workset_parameter_txt table row.
WorksetPub is "public" workset metadata and parameter metadata for json import-export.
WorksetRow is workset_lst table row.
WorksetTxtRow is db row of workset_txt.
WriteLayout describes parameters or output tables values for insert or update.
WriteMicroLayout describes source and size of data page to read entity microdata.
WriteParamLayout describes parameter values for insert or update.
WriteTableLayout describes output table values for insert or update.
# Interfaces
CellIntKeys provide method to get a copy of cell keys as []int for parameter or output table row, for example, return [parameter row sub id and dimension ids].
CellToCodeConverter provide methods to convert parameters or output table row from enum id to enum code.
CellToIdConverter provide methods to convert parameters or output table row from enum code to enum id.
CsvConverter provide methods to convert parameter row, output table row or microdata row from or to row []string for csv file.
CsvConverter provide methods to convert parameters or output table data to row []string for csv file.
CsvConverter provide methods to convert parameter row, output table row or microdata row from or to row []string for csv file.
Convert from csv row []string to parameter, output table or microdata cell (dimensions and value or microdata key and attributes value).