15 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
16 q.addToTableList (
"L1_MASTER_TABLE",
"L1MT" );
18 q.extendBinding<
int>(
"smk");
20 q.extendCondition(
"SMT.SMT_ID = :smk");
21 q.extendCondition(
" AND SMT.SMT_L1_MASTER_TABLE_ID = L1MT.L1MT_ID");
23 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
24 q.extendOutput<
int> (
"SMT.SMT_L1_MASTER_TABLE_ID" );
27 q.setDataName(
"L1MT.L1MT_MENU");
32 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
33 q.addToTableList (
"L1_MENU",
"L1TM" );
35 q.extendBinding<
int>(
"smk");
37 q.extendCondition(
"SMT.SMT_ID = :smk");
38 q.extendCondition(
" AND SMT.SMT_L1_MENU_ID = L1TM.L1TM_ID");
40 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
41 q.extendOutput<
int> (
"SMT.SMT_VERSION" );
42 q.extendOutput<
int> (
"SMT.SMT_L1_MENU_ID" );
45 q.setDataName(
"L1TM.L1TM_DATA");
54 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
55 q.addToTableList (
"HLT_MASTER_TABLE",
"HMT" );
57 q.extendBinding<
int>(
"smk");
59 q.extendCondition(
"SMT.SMT_ID = :smk");
60 q.extendCondition(
" AND SMT.SMT_HLT_MASTER_TABLE_ID = HMT.HMT_ID");
62 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
63 q.extendOutput<
int> (
"SMT.SMT_HLT_MASTER_TABLE_ID" );
66 q.setDataName(
"HMT.HMT_MENU");
71 q.addToTableList (
"SUPER_MASTER_TABLE",
"SMT" );
72 q.addToTableList (
"HLT_MENU",
"HTM" );
74 q.extendBinding<
int>(
"smk");
76 q.extendCondition(
"SMT.SMT_ID = :smk");
77 q.extendCondition(
" AND SMT.SMT_HLT_MENU_ID = HTM.HTM_ID");
79 q.extendOutput<std::string>(
"SMT.SMT_NAME" );
80 q.extendOutput<
int> (
"SMT.SMT_VERSION" );
81 q.extendOutput<
int> (
"SMT.SMT_HLT_MENU_ID" );
84 q.setDataName(
"HTM.HTM_DATA");
97 auto session = createDBSession();
98 session->transaction().start(
true);
99 const size_t sv = schemaVersion(session.get());
106 TRG_MSG_ERROR(
"Tried reading L1 menu, but SuperMasterKey " <<
smk <<
" is not available" );
114 catch(coral::QueryException & ex) {
115 TRG_MSG_ERROR(
"When reading L1 menu for SMK " <<
smk <<
" a coral::QueryException was caught ( " << ex.what() <<
" )" );
127 auto session = createDBSession();
128 session->transaction().start(
true);
129 const size_t sv = schemaVersion(session.get());
136 TRG_MSG_ERROR(
"Tried reading HLT menu, but SuperMasterKey " <<
smk <<
" is not available" );
144 catch(coral::QueryException & ex) {
145 TRG_MSG_ERROR(
"When reading HLT menu for SMK " <<
smk <<
" a coral::QueryException was caught ( " << ex.what() <<
" )" );
159 l1menu.setData(std::move(ptl1));
164 TRG_MSG_ERROR(
"When reading L1 menu for SMK " <<
smk <<
" a parsing error occured ( " << ex.what() <<
" )" );
178 hltmenu.
setData(std::move(pthlt));
183 TRG_MSG_ERROR(
"When reading HLT menu for SMK " <<
smk <<
" a parsing error occured ( " << ex.what() <<
" )" );