From OpenSCADAWiki
Public generic static methods:
- static string fullDBSYS( ); — The full name of the system table.
- static string fullDB( ); — The full name of the table with a description of the registered databases.
- static string realDBName( const string &bdn, bool back = false ); — Conversion of the full template name of the database or table (of view "<gen>.myTbl") in the real name. Use back for the backward conversion.
- static string dbPart( const string &bdn, bool tbl = false ); — Getting the generic storage address part or the table at tbl from the common storage name bdn.
- static void dbList( vector<string> &ls, char flags = LsNoFlg ); — List of available databases with the DBLsFlg flags.
- static AutoHD<TTable> tblOpen( const string &bdn, bool create = false ); — Opening the table bdn of the storage by it full path with the creation create at absence.
- static void tblClose( const string &bdn, bool del = false ); — Closing the table bdn of the storage by it full path with deleting at del.
- static bool dataSeek( const string &bdn, const string &path, int lev, TConfig &cfg, char flags = NoFlg, XMLNode *localCfgCtx = NULL ); — Complete scanning of the records on the storage according to the ReqGenFlg flags. If the DB name bdn or path path to the Configuration File are not pointed, their processing is skipped. More about conditions of using the Configuration File and the Data Bases read in the Data storing conception. localCfgCtx is used for loading from the local configuration context, prepared in dataSet(), and it missing causes for checking and using, at presence, the global configuration context SYS->cfgCtx().
- static bool dataGet( const string &bdn, const string &path, TConfig &cfg, char flags = NoFlg, XMLNode *localCfgCtx = NULL ); — Getting the record from the storage according to the ReqGenFlg flags. If the DB name bdn or path path to the configuration file are not pointed, their processing is skipped. More about conditions of using the Configuration File and the Data Bases read in the Data storing conception. localCfgCtx is used for loading from the local configuration context, prepared in dataSet(), and it missing causes for checking and using, at presence, the global configuration context SYS->cfgCtx().
- static bool dataSet( const string &bdn, const string &path, TConfig &cfg, char flags = NoFlg, XMLNode *localCfgCtx = NULL ); — Setting/Saving the record to the storage according to the ReqGenFlg flags. If the DB name bdn or path path to the configuration file are not pointed, their processing is skipped. More about conditions of using the Configuration File and the Data Bases read in the Data storing conception. localCfgCtx is used for saving to the local configuration context, is prepared for dataSeek() and dataGet(), and it missing causes for checking and using, at presence, the global configuration context SYS->cfgCtx().
- static bool dataDel( const string &bdn, const string &path, TConfig &cfg, char flags = NoFlg ); — Deleting the record in the storage according to the ReqGenFlg flags. If the DB name bdn or path path to the configuration file are not pointed, their processing is skipped. More about conditions of using the Configuration File and the Data Bases read in the Data storing conception.
- static bool dataDelTbl( const string &bdn, const string &path = "", char flags = NoFlg ); — The data container table common removing from the storage bbn and the configuration file path, according to the ReqGenFlg flags.
- static string genPrmGet( const string &path, const string &oval = "", const string &user = "root", char flags = NoFlg ); — Getting the generic parameter path from the Generic Storage ("<gen>.SYS") on behalf of the user and according to the ReqGenFlg flags. If the data are not available the value oval is returned. On the Configuration File there are used the object parameters by the tags "prm" and on the Data Base there is used the table "SYS".
- static void genPrmSet( const string &path, const string &val, const string &user = "root", char flags = NoFlg ); — Setting/Saving the generic parameter path to the Generic Storage ("<gen>.SYS") of the user and according to the ReqGenFlg flags.