12 err.SetDescription(
"FillFromDB() not implemented for QCOFParametersHandle");
20 std::string bareOwner, extraLabel;
21 GetLabel().GetBareOwnerAndExtraLabel(bareOwner,extraLabel);
22 if (extraLabel==
"") extraLabel=
"None";
24 std::string ap_algo, ap_extralabel;
29 if(ap_extralabel==
"") ap_extralabel =
"None";
31 std::string nps_algo, nps_extralabel;
36 if(nps_extralabel==
"") nps_extralabel =
"None";
40 std::stringstream squery;
44 squery<<
"select amp_version from " <<bareOwner<<
"_amp_algo where amp_version='" << GetVersion() <<
"' and amp_extralabel='"<< extraLabel<<
"'";
50 catch(
const QError& cerr) {
59 squery<<
"INSERT into "<<bareOwner<<
"_amp_algo (amp_version, amp_extralabel) values " <<
"('" << GetVersion() <<
"','" << extraLabel <<
"')";
66 catch(
const QError& cerr) {
79 squery<<
"select amp_version from " <<bareOwner<<
"_amp_params where amp_version='" << GetVersion() <<
"' and amp_extralabel='"<< extraLabel <<
"' and channel=" << GetChannel() <<
" and ap_algo='" << ap_algo <<
"' and ap_extralabel='" << ap_extralabel <<
"' and ap_validity_kind ='"<< fAPValidityKind <<
"' and nps_algo='" << nps_algo <<
"' and nps_extralabel='" << nps_extralabel <<
"' and nps_validity_kind ='"<< fNPSValidityKind <<
"'";
85 catch(
const QError& cerr) {
93 fields.push_back((std::string)
"amp_version"); values.push_back(
"'"+GetVersion()+
"'");
94 fields.push_back((std::string)
"amp_extralabel"); values.push_back(
"'"+extraLabel+
"'");
95 fields.push_back((std::string)
"channel"); values.push_back(GetChannel());
96 fields.push_back((std::string)
"ap_algo"); values.push_back(
"'"+ap_algo+
"'");
97 fields.push_back((std::string)
"ap_version"); values.push_back(
"'"+fAPVersion+
"'");
98 fields.push_back((std::string)
"ap_extralabel"); values.push_back(
"'"+ap_extralabel+
"'");
99 fields.push_back((std::string)
"ap_validity_kind"); values.push_back(
"'"+fAPValidityKind+
"'");
100 fields.push_back((std::string)
"nps_algo"); values.push_back(
"'"+nps_algo+
"'");
101 fields.push_back((std::string)
"nps_version"); values.push_back(
"'"+fNPSVersion+
"'");
102 fields.push_back((std::string)
"nps_extralabel"); values.push_back(
"'"+nps_extralabel+
"'");
103 fields.push_back((std::string)
"nps_validity_kind"); values.push_back(
"'"+fNPSValidityKind+
"'");
107 db->
Insert(bareOwner+
"_amp_params",fields,values);
110 catch(
const QError& cerr) {
QError DoQuery(const std::string &query, QDbTable &table)
std::map< std::string, column > QDbTable
int DoExec(const std::string &Query)
Execute an INSERT, UPDATE, DELETE, FETCH, or MOVE statement.
int Insert(const std::string &tableName, const column &fields, const column &values)
error class with error type and description
Label for global QObject's.
void GetBareOwnerAndExtraLabel(std::string &bOwner, std::string &el) const
split extra label and bare module name
std::string GetStringLabel() const
convert label to string
std::vector< QVdt > QVdt_vector
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...