6 #include <CoralBase/Attribute.h>
7 #include <CoralBase/AttributeList.h>
15 DBLoader(
"MCKLoader", sm, sm.sessionMgr().createSession())
22 unique_ptr< coral::IQuery >
q;
27 unique_ptr< coral::IQuery > qtmp( m_session.nominalSchema().tableHandle(
"MCK_TO_SMK_LINK").newQuery() );
30 catch(coral::TableNotExistingException & ex) {
35 std::string theCondition =
"SMK_LINK_SMK = :smId";
36 theCondition += string(
" AND SMK_LINK_ACTIVE_MCK = 1" );
39 bindings.extend<
int>(
"smId");
40 bindings[0].data<
int>() =
smk;
42 q->setCondition( theCondition, bindings );
45 attList.extend<
int>(
"SMK_LINK_MCK" );
49 coral::ICursor&
cursor =
q->execute();
55 mck =
row[
"SMK_LINK_MCK"].data<
int>();
61 }
else if(nFound==1) {
81 unique_ptr< coral::IQuery >
q;
84 unique_ptr< coral::IQuery > qtmp( m_session.nominalSchema().tableHandle(
"MCK_TABLE").newQuery() );
87 catch(coral::TableNotExistingException & ex) {
93 bindings.extend<
int>(
"mck");
94 bindings[0].data<
int>() = mck;
96 q->setCondition(
"MCK_ID = :mck", bindings );
99 attList.extend<std::string> (
"MCK_ATHENA_VERSION" );
103 coral::ICursor&
cursor =
q->execute();
109 mck_release =
row[
"MCK_ATHENA_VERSION"].data<std::string>();
114 TRG_MSG_ERROR(
"Found more than one release for MCK " << mck);
115 }
else if(nFound==1) {
116 TRG_MSG_INFO(
"Found release " << mck_release <<
" for MCK " << mck);