unLHCLoggingDB 9.0.0
|
Library containing database related functions of the unLHCLoggingDB component. More...
Functions | |
bool | unLHCLoggingDBSql_openDbConnection (string sDbName, string sDbUser, string sDbPass, bool printDebug=true) |
bool | unLHCLoggingDBSql_startCommand (dbCommand &cmd, string &sql) |
bool | unLHCLoggingDBSql_executeCommand (dbCommand &cmd, mapping &map, dyn_dyn_mixed &result, bool columnWise=false) |
bool | unLHCLoggingDBSql_finishCommand (dbCommand &cmd) |
dyn_dyn_mixed | unLHCLoggingDBSql_queryDataWithParameterMapping (string sqlQuery, mapping params, dyn_string &dsExInfo, bool columnWise=false, bool blocking=true) |
dyn_dyn_mixed | unLHCLoggingDBSql_queryData (string sqlQuery, dyn_string &dsExInfo, bool columnWise=false, bool blocking=true) |
void | unLHCLoggingDBSql_executeWithBoundData (string sql, dyn_dyn_mixed &data) |
void | unLHCLoggingDBSql_executeWithParameterMapping (string sql, mapping params) |
void | unLHCLoggingDBSql_execute (string sql) |
void | unLHCLoggingDBSql_beginTransaction () |
void | unLHCLoggingDBSql_commitTransaction () |
void | unLHCLoggingDBSql_rollbackTransaction () |
dyn_string | unLHCLoggingDBSql_getDbSchemas (dyn_string &dsExInfo) |
dyn_string | unLHCLoggingDBSql_getRdbSource (string sDbSchema, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getLogVarInfo (string sDbSchema, dyn_string &dsExInfo, bool bUTC=false, bool bGetHierarchies=true) |
dyn_dyn_mixed | unLHCLoggingDBSql_getLogVariables (string sDbSchema, dyn_string &dsExInfo) |
unsigned | unLHCLoggingDBSql_getNumberOfLogVariables (string sDbSchema, dyn_string &dsExInfo) |
unsigned | unLHCLoggingDBSql_getNumberOfHierarchies (string sDbSchema, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getElementDetails (string sVariableId, dyn_string &dsExInfo) |
string | unLHCLoggingDBSql_getElementNameFromVariableName (string sVariableName, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferHistory (string sVariableId, time tStart, time tEnd, bool bUTC=false, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getElementHistory (string sVariableId, time tStart, time tEnd, bool bUTC=false, dyn_string &dsExInfo) |
dyn_string | unLHCLoggingDBSql_getMetaUsers (dyn_string &dsExInfo) |
dyn_string | unLHCLoggingDBSql_getMetaUsersForSchema (string sSchemaName, dyn_string &dsExInfo) |
bool | unLHCLoggingDBSql_checkUserPass (string sUser, string sPass) |
void | unLHCLoggingDBSql_getSystemIntegrityCredentials (string &sUser, string &sPass, dyn_string &dsExInfo) |
bool | unLHCLoggingDBSql_createDataCategory (string sName, string sSubName, string sTransferGroupId) |
bool | unLHCLoggingDBSql_updateTransferGroupId (string sDataCatName, string sDataCatSubName, string sTransferGroupId) |
dyn_dyn_mixed | unLHCLoggingDBSql_getDataCategories (dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getDataCategoriesForSpecific (string sSchema, string sUser, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getDataCategoryMapping (dyn_string &dsExInfo) |
void | unLHCLoggingDBSql_addDataCategoryMapping (string sUser, string sSchema, string sDataCategory, dyn_string &dsExInfo) |
void | unLHCLoggingDBSql_updateDataCategoryMapping (string sNewUser, string sNewSchema, string sNewDataCategory, string sOldUser, string sOldSchema, string sOldDataCategory, dyn_string &dsExInfo) |
void | unLHCLoggingDBSql_deleteDataCategoryMapping (string sUser, string sSchema, string sDataCategory, dyn_string &dsExInfo) |
bool | unLHCLoggingDBSql_registerDataForLogging (const dyn_string &dsElementId, const dyn_string &dsVariableName, const dyn_string &dsRDBSource, const dyn_string &dsUnit, const dyn_string &dsDescription, const dyn_string &dsDataCategoryId, const dyn_string &dsHierarchy, const string sUser, const string sPass) |
time | unLHCLoggingDBSql_getDbSysTime (dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferHistoryForTestDpe (string sVarName, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferStats (string job, time tStart, time tEnd, bool bUTC, dyn_string &exceptionInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferStatsForDataCategory (string dataCategoryId, time tStart, time tEnd, bool bUTC, dyn_string &exceptionInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferJobIds (dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferJobDetails (string sRdbSource, bool bUTC, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getTransferJobStatus (string sRdbSource, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getSessionInfo (const string sJobNumber, dyn_string &dsExInfo, bool bUTC=false) |
dyn_dyn_mixed | unLHCLoggingDBSql_getDataCategoriesOfSchema (string sDbSchema, dyn_string &dsExInfo) |
string | unLHCLoggingDBSql_getDataCategoryId (string sDataCategory, dyn_string &dsExInfo) |
bool | unLHCLoggingDBSql_unregisterVariablesFromLogging (const dyn_string &dsSignalNames) |
bool | unLHCLoggingDBSql_renameVariables (const dyn_string &dsSignalNameOld, const dyn_string &dsSignalNameNew, const dyn_string &dsDescriptionNew, const dyn_string &dsUnitNew) |
void | unLHCLoggingDBSql_renameVariablesImpl (const dyn_string &dsSignalNameOld, const dyn_string &dsSignalNameNew, const dyn_string &dsDescriptionNew, const dyn_string &dsUnitNew) |
bool | unLHCLoggingDBSql_deleteHierarchies (const dyn_string &dsSignalNames) |
dyn_dyn_mixed | unLHCLoggingDBSql_getInconsistentData (const string sDbSchema, dyn_string &dsExInfo) |
unsigned | unLHCLoggingDBSql_getNumSignalsHavingInconsistentArchiveGroup (const string sDbSchema, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getElements (const string sDbSchema, dyn_string &dsExInfo) |
dyn_dyn_mixed | unLHCLoggingDBSql_getElementsExceptInternalDPs (const string sDbSchema, dyn_string &dsExInfo) |
dyn_string | unLHCLoggingDBSql_getSystemsUsingSchema (const string sDbSchema, dyn_string &dsExInfo) |
bool | unLHCLoggingDBSql_triggerRetransferForRdbSource (string sRdbSource, time tStart) |
dyn_string | unLHCLoggingDBSql_getAllRdbSources (dyn_string &dsExInfo) |
Library containing database related functions of the unLHCLoggingDB component.
Usage: Public
PVSS manager usage: CTRL, UI
Constraints:
bool unLHCLoggingDBSql_openDbConnection | ( | string | sDbName, |
string | sDbUser, | ||
string | sDbPass, | ||
bool | printDebug = true |
||
) |
Connect to db, if the connectionName exists, then use the existing. If connexction fails return FALSE.
sDbName | input, database name |
sDbUser | input, database user |
sDbPass | input, database password (encrypted) |
bool unLHCLoggingDBSql_startCommand | ( | dbCommand & | cmd, |
string & | sql | ||
) |
Start execution of a db command
cmd | input, command |
sql | input, sql query text |
bool unLHCLoggingDBSql_executeCommand | ( | dbCommand & | cmd, |
mapping & | map, | ||
dyn_dyn_mixed & | result, | ||
bool | columnWise = false |
||
) |
Execute a db command with paramter mapping and get result
cmd | input, command |
map | input, parameter mapping |
result | output, result as dyn_dyn_mixed |
bool unLHCLoggingDBSql_finishCommand | ( | dbCommand & | cmd | ) |
Finish execution of a db command
cmd | input, command |
sql | input, sql query text |
dyn_dyn_mixed unLHCLoggingDBSql_queryDataWithParameterMapping | ( | string | sqlQuery, |
mapping | params, | ||
dyn_string & | dsExInfo, | ||
bool | columnWise = false , |
||
bool | blocking = true |
||
) |
Execute sql query with parameter mapping
sqlQuery | input, SQL query string |
params | input, parameter mapping |
dsExInfo | output, Exception information |
columnWise | input, false: get result row wise, true: get result column wise |
blocking | input, execute blocking queries on default, but we can also switch to asynchronous mode |
dyn_dyn_mixed unLHCLoggingDBSql_queryData | ( | string | sqlQuery, |
dyn_string & | dsExInfo, | ||
bool | columnWise = false , |
||
bool | blocking = true |
||
) |
Execute sql query
sqlQuery | input, SQL query string |
dsExInfo | output, Exception information |
columnWise | input, false: get result row wise, true: get result column wise |
void unLHCLoggingDBSql_executeWithBoundData | ( | string | sql, |
dyn_dyn_mixed & | data | ||
) |
Execute sql command with bound data
Using this function we will gain speed by sending a sql command just once (e.g. an insert into statement) but executing it many times with different input data (provided through the dyn_dyn_mixed input-parameter) unLHCLoggingDBSql_executeWithBoundData("INSERT INTO myTable(colId,colName,colUnit) VALUES(:data1,:data2,:data3)");
sql | input, SQL command string |
data | input, data to be inserted |
throws | an exception on error |
void unLHCLoggingDBSql_executeWithParameterMapping | ( | string | sql, |
mapping | params | ||
) |
Execute sql command with parameter mapping
sql | input, SQL command string |
params | input, Parameter mapping like: param["user"]=sUserName; |
throws | an exception on error |
void unLHCLoggingDBSql_execute | ( | string | sql | ) |
Execute sql command
sql | input, SQL command string |
throws | an exception on error |
void unLHCLoggingDBSql_beginTransaction | ( | ) |
start a transaction
throws | an exception on error |
void unLHCLoggingDBSql_commitTransaction | ( | ) |
commit a transaction
throws | an exception on error |
void unLHCLoggingDBSql_rollbackTransaction | ( | ) |
rollback a transaction
dyn_string unLHCLoggingDBSql_getDbSchemas | ( | dyn_string & | dsExInfo | ) |
Get all DB schemas, which have an ELEMENTS table
dsExInfo | output: Exception info |
dyn_string unLHCLoggingDBSql_getRdbSource | ( | string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all RDB Sources of a specific DB schema
sDbSchema | input, Database schema |
dsExInfo | output: Exception info |
dyn_dyn_mixed unLHCLoggingDBSql_getLogVarInfo | ( | string | sDbSchema, |
dyn_string & | dsExInfo, | ||
bool | bUTC = false , |
||
bool | bGetHierarchies = true |
||
) |
Get all variables of a specified db schema that are registered for logging and retrieve detail informations
sDbSchema | input, Database schema |
bUTC | input, true=show timestamps as UTC, false=show timestamps as localtime |
dsExInfo | output: Exception info |
line 1: Variable ID line 2: Variable Name line 3: Dpe NAME line 4: Dpe ALIAS line 5: Data category line 6: User name line 7: Logging required line 8: Registered for logging line 9: Rdb source line 10: Hierarchy line 11: Transfer job ID line 12: Timestamp last job run line 13: Timestamp last logged line 14: No records last logged line 15: description
dyn_dyn_mixed unLHCLoggingDBSql_getLogVariables | ( | string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all variables of a specified db schema that are registered for logging
sDbSchema | input, Database schema |
dsExInfo | output: Exception info |
line 1: Variable Name line 2: Element Name line 3: Variable Description line 4: Hierarchy Path line 5: Data category
unsigned unLHCLoggingDBSql_getNumberOfLogVariables | ( | string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get number of registered elements for a specific database schema
sDbSchema | input, Database schema |
dsExInfo | output Exception info |
unsigned unLHCLoggingDBSql_getNumberOfHierarchies | ( | string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get number of registered hierarchies for a specific database schema
sDbSchema | input, Database schema |
dsExInfo | output Exception info |
dyn_dyn_mixed unLHCLoggingDBSql_getElementDetails | ( | string | sVariableId, |
dyn_string & | dsExInfo | ||
) |
Get details of a particular element
Use this function only to query single elements because it is not very fast, which is caused by the prequery of the dbSchema name
sVariableId | input, Variable ID of the selected element |
dsExInfo | output, ExceptionInfo |
column 1: Variable name column 2: Datapoint name column 3: Data category column 4: User name column 5: Logging requred column 6: Registered for logging column 7: Rdb source column 8: Hierarchy
string unLHCLoggingDBSql_getElementNameFromVariableName | ( | string | sVariableName, |
dyn_string & | dsExInfo | ||
) |
Get the full dpe name from a signal name
Use this function only to query single elements because it is not very fast, which is caused by the prequery of the dbSchema name
sVariableName | input, Variable Name of the selected element |
dsExInfo | output, ExceptionInfo |
dyn_dyn_mixed unLHCLoggingDBSql_getTransferHistory | ( | string | sVariableId, |
time | tStart, | ||
time | tEnd, | ||
bool | bUTC = false , |
||
dyn_string & | dsExInfo | ||
) |
Get the transfer history of a specific element (MDB -> LDB)
sVariableId | input, Variable ID of the selected element |
tStart | input, Query start time (UTC only) |
tEnd | input, Query end time (UTC only) |
bUTC | input, Display timestamps of query result in UTC or LOCAL |
dsExInfo | output, ExceptionInfo |
line 1: Time created line 2: Time first checked line 3: Time last checked line 4: No of records checked line 5: Time last logged line 6: No of records logged
dyn_dyn_mixed unLHCLoggingDBSql_getElementHistory | ( | string | sVariableId, |
time | tStart, | ||
time | tEnd, | ||
bool | bUTC = false , |
||
dyn_string & | dsExInfo | ||
) |
Get value history of a specific meta variable
sVariableId | input, VARIABLE_ID of the selected element |
tStart | input, Query start time (UTC only) |
tEnd | input, Query end time (UTC only) |
bUTC | input, Display timestamps of query result in UTC or LOCAL |
dsExInfo | output, ExceptionInfo |
line 1: Time archived to MDB line 2: Value
dyn_string unLHCLoggingDBSql_getMetaUsers | ( | dyn_string & | dsExInfo | ) |
Get meta users from RDB2NXCALS.META_USERS
dsExInfo | output, Exception information |
dyn_string unLHCLoggingDBSql_getMetaUsersForSchema | ( | string | sSchemaName, |
dyn_string & | dsExInfo | ||
) |
Get meta users from RDB2NXCALS.META_USERS for a specific db schema
dsExInfo | output, Exception information |
bool unLHCLoggingDBSql_checkUserPass | ( | string | sUser, |
string | sPass | ||
) |
Check if user pass combination is found in the database
sUser | output, username |
sPass | output, password |
void unLHCLoggingDBSql_getSystemIntegrityCredentials | ( | string & | sUser, |
string & | sPass, | ||
dyn_string & | dsExInfo | ||
) |
Get credentials for user SystemIntegrity
sUser | output, username |
sPass | output, password |
dsExInfo | output, Exception information |
bool unLHCLoggingDBSql_createDataCategory | ( | string | sName, |
string | sSubName, | ||
string | sTransferGroupId | ||
) |
Create a new data category
sName | input, data category name |
sSubName | input, data category sub name |
sTransferGroupId | input, transfer group id |
bool unLHCLoggingDBSql_updateTransferGroupId | ( | string | sDataCatName, |
string | sDataCatSubName, | ||
string | sTransferGroupId | ||
) |
Update transfer group of an existing data category
sDataCatName | input, data category name |
sDataCatSubName | input, data category sub name |
sTransferGroupId | input, transfer group id |
dyn_dyn_mixed unLHCLoggingDBSql_getDataCategories | ( | dyn_string & | dsExInfo | ) |
Get data categories from RDB2NXCALS.META_VARIABLE_CATEGORIES
dsExInfo | output, Exception information |
line 1: data category id line 2: data category name line 3: data category sub name line 4: data category name / data category sub name line 5: data transfer group id
dyn_dyn_mixed unLHCLoggingDBSql_getDataCategoriesForSpecific | ( | string | sSchema, |
string | sUser, | ||
dyn_string & | dsExInfo | ||
) |
Get available data categories for Specific Schema and User
sSchema | input, schema name |
sUser | input, user name |
dsExInfo | output, Exception information |
line 1: data category id line 2: data category name line 3: data category sub name line 4: data category name / data category sub name line 5: data transfer group id
dyn_dyn_mixed unLHCLoggingDBSql_getDataCategoryMapping | ( | dyn_string & | dsExInfo | ) |
Get mapping between data category, schema and user
dsExInfo | output, Exception information |
column 1: data category name/subname column 2: schema name column 3: user name
void unLHCLoggingDBSql_addDataCategoryMapping | ( | string | sUser, |
string | sSchema, | ||
string | sDataCategory, | ||
dyn_string & | dsExInfo | ||
) |
Add mapping between data category, schema and user
sUser | input, user name |
sSchema | input, schema name |
sDataCategory | input, data categrory id as string |
dsExInfo | output, Exception information |
void unLHCLoggingDBSql_updateDataCategoryMapping | ( | string | sNewUser, |
string | sNewSchema, | ||
string | sNewDataCategory, | ||
string | sOldUser, | ||
string | sOldSchema, | ||
string | sOldDataCategory, | ||
dyn_string & | dsExInfo | ||
) |
Update mapping between data category, schema and user
sNewUser | input, user name |
sNewSchema | input, schema name |
sNewDataCategory | input, data categrory id as string |
sOldUser | input, user name |
sOldSchema | input, schema name |
sOldDataCategory | input, data categrory id as string |
dsExInfo | output, Exception information |
void unLHCLoggingDBSql_deleteDataCategoryMapping | ( | string | sUser, |
string | sSchema, | ||
string | sDataCategory, | ||
dyn_string & | dsExInfo | ||
) |
Remove mapping between data category, schema and user
sUser | input, user name |
sSchema | input, schema name |
sDataCategory | input, data categrory id as string |
dsExInfo | output, Exception information |
bool unLHCLoggingDBSql_registerDataForLogging | ( | const dyn_string & | dsElementId, |
const dyn_string & | dsVariableName, | ||
const dyn_string & | dsRDBSource, | ||
const dyn_string & | dsUnit, | ||
const dyn_string & | dsDescription, | ||
const dyn_string & | dsDataCategoryId, | ||
const dyn_string & | dsHierarchy, | ||
const string | sUser, | ||
const string | sPass | ||
) |
Register new elements for logging
dsElementId | input, list of element ids |
dsVariableName | input, list of variable names |
dsRDBSource | input, list of RDB sources |
dsUnit | input, list of units |
dsDescription | input, list of descriptions |
dsDataCategoryId | input, list of data category ids |
dsHierarchy | input, list of Hierarchies |
sUser | input, username from meta_users |
sPass | input, password from meta_users |
time unLHCLoggingDBSql_getDbSysTime | ( | dyn_string & | dsExInfo | ) |
Query current database system time
dsExInfo | output, Exception information |
dyn_dyn_mixed unLHCLoggingDBSql_getTransferHistoryForTestDpe | ( | string | sVarName, |
dyn_string & | dsExInfo | ||
) |
Get the most recent entry from transfer history for a specific signal name
This function is used by the test datapoints of system integrity plugin but it can be used for any variable.
sVarName | input, Variable Name of the test datapoint |
dsExInfo | output, Exception information |
sqlResult[1][1]: variable_name sqlResult[1][2]: last_logged_utc_stamp at local
dyn_dyn_mixed unLHCLoggingDBSql_getTransferStats | ( | string | job, |
time | tStart, | ||
time | tEnd, | ||
bool | bUTC, | ||
dyn_string & | exceptionInfo | ||
) |
Query for transfer statistics per transfer job
job | input, name of the transfer job |
tStart | input, utc start time of time window |
tEnd | input, utc end time of time window |
bUTC | input, true=show timestamps as UTC, false=show timestamps as localtime |
dsExInfo | output, Exception information |
line 1: session_id line 2: session_start_utc line 3: session_type line 4: time_in_s line 5: no_of_recs line 6: time_in_s line 7: no_of_recs
dyn_dyn_mixed unLHCLoggingDBSql_getTransferStatsForDataCategory | ( | string | dataCategoryId, |
time | tStart, | ||
time | tEnd, | ||
bool | bUTC, | ||
dyn_string & | exceptionInfo | ||
) |
Get transfer statistics for a specific data category
dataCategoryId | input, data category id |
tStart | input, utc start time of time window |
tEnd | input, utc end time of time window |
bUTC | input, true=show timestamps as UTC, false=show timestamps as localtime |
dsExInfo | output, Exception information |
dyn_dyn_mixed unLHCLoggingDBSql_getTransferJobIds | ( | dyn_string & | dsExInfo | ) |
Execute SQL query to get transfer job IDs
dsExInfo | output, Exception information |
dyn_dyn_mixed unLHCLoggingDBSql_getTransferJobDetails | ( | string | sRdbSource, |
bool | bUTC, | ||
dyn_string & | dsExInfo | ||
) |
Execute SQL query to get information of RDB transfer jobs
sRdbSource | input, show transfer jobs related to this RDB SOURCE |
bUTC | input, true=show timestamps as UTC, false=show timestamps as localtime |
dsExInfo | output, Exception information |
line 1: job name line 2: job enabled line 3: job state line 4: last start date line 5: last run duration line 6: next run date line 7: load in percent
dyn_dyn_mixed unLHCLoggingDBSql_getTransferJobStatus | ( | string | sRdbSource, |
dyn_string & | dsExInfo | ||
) |
SQL query to get current status of transfer jobs
sRdbSource | input, show transfer jobs related to this RDB SOURCE |
dsExInfo | output, Exception information |
sqlResult[1]: job name sqlResult[2]: job enabled sqlResult[3]: job state sqlResult[4]: last start date (utc)
dyn_dyn_mixed unLHCLoggingDBSql_getSessionInfo | ( | const string | sJobNumber, |
dyn_string & | dsExInfo, | ||
bool | bUTC = false |
||
) |
Execute SQL query to get information about the latest session
sJobNumber | input, job number as a string, e.g.: "7" |
dsExInfo | output, Exception information |
bUTC | input, true=show timestamps as UTC, false=show timestamps as localtime |
column 1: session id column 2: session type column 3: session start column 4: session end column 5: operation type column 6: operation time column 7: operation no of records
dyn_dyn_mixed unLHCLoggingDBSql_getDataCategoriesOfSchema | ( | string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all data categories related to a DB-schema
sDbSchema | input, list of user names |
dsExInfo | output, Exception information |
string unLHCLoggingDBSql_getDataCategoryId | ( | string | sDataCategory, |
dyn_string & | dsExInfo | ||
) |
Get data category id of a data category
sDataCategory | input, "data_category_name/data_category_sub_name" |
dsExInfo | output, Exception information |
bool unLHCLoggingDBSql_unregisterVariablesFromLogging | ( | const dyn_string & | dsSignalNames | ) |
Unregisters a set of signals from logging
dsSignalNames | input, set of signals to unregister |
bool unLHCLoggingDBSql_renameVariables | ( | const dyn_string & | dsSignalNameOld, |
const dyn_string & | dsSignalNameNew, | ||
const dyn_string & | dsDescriptionNew, | ||
const dyn_string & | dsUnitNew | ||
) |
Renames given signals and updates description and unit. Changes are propagated to LDB
This function also works for exchanging names for renamed variables (ie A->B and B->A). It renames variables in two steps: first to a temp name and then to the proper new name. It rolls back in case of errors.
dsSignalNameOld | input, list of signals to be renamed |
dsSignalNameNew | input, list of new signal names |
dsDescriptionNew | input, list of new signal descriptions |
dsUnitNew | input, list of new signal units |
|
private |
Renames given signals and updates description and unit. Changes are propagated to LDB
This internal function does neither commit nor rollback in case of error, use unLHCLoggingDBSql_renameVariables instead This function does NOT work for exchanging names for renamed variables (ie A->B and B->A).
dsSignalNameOld | input, list of signals to be renamed |
dsSignalNameNew | input, list of new signal names |
dsDescriptionNew | input, list of new signal descriptions |
dsUnitNew | input, list of new signal units |
throws | an exception in case of error |
bool unLHCLoggingDBSql_deleteHierarchies | ( | const dyn_string & | dsSignalNames | ) |
Deletes hierarchies for given signals
dsSignalNames | input, set of signals for which we want to delte the hierarchies |
dyn_dyn_mixed unLHCLoggingDBSql_getInconsistentData | ( | const string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Find inconsistency between registered data (meta_variables) and dpes (elements)
sDbSchema | input, name of the db schema to check |
dsExInfo | output, Exception information |
column 1: variable_id column2: variable_name
unsigned unLHCLoggingDBSql_getNumSignalsHavingInconsistentArchiveGroup | ( | const string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get number of signals registered for logging, having incosistencies between RDB_SOURCE and ARCHIVE_GROUP
sDbSchema | input, name of the db schema to check |
dsExInfo | output, Exception information |
dyn_dyn_mixed unLHCLoggingDBSql_getElements | ( | const string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all elements in a specific db schema
sDbSchema | input, db schema to look for elements |
dyn_dyn_mixed unLHCLoggingDBSql_getElementsExceptInternalDPs | ( | const string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all elements in a specific db schema
sDbSchema | input, db schema to look for elements |
dyn_string unLHCLoggingDBSql_getSystemsUsingSchema | ( | const string | sDbSchema, |
dyn_string & | dsExInfo | ||
) |
Get all systems that are using a specific db schema
sDbSchema | input, db schema to look for elements |
bool unLHCLoggingDBSql_triggerRetransferForRdbSource | ( | string | sRdbSource, |
time | tStart | ||
) |
Trigger retransfer for given RDB_SOURCE starting from a certain START_TIME
sDbSchema | input, RDB_SOURCE to retransfer |
tStart | input, START_TIME for retransfer (localtime) |
dyn_string unLHCLoggingDBSql_getAllRdbSources | ( | dyn_string & | dsExInfo | ) |
Get all RDB_SOURCES, that are currently registered
dsExInfo | output, Exception information |