6 namespace persistency {
13 return existsTable( m_schema,
tname );
19 "GLOBAL_TAG::Table::create");
23 createTable( m_schema, descr.
get() );
29 for (
auto row : q ) {}
31 return q.retrievedRows();
36 boost::posix_time::ptime& snapshotTime ){
39 for (
auto row : q ) std::tie( validity, snapshotTime ) = row;
41 return q.retrievedRows();
48 boost::posix_time::ptime& snapshotTime ){
51 for (
auto row : q ) std::tie( validity, description, release, snapshotTime ) = row;
53 return q.retrievedRows();
60 const boost::posix_time::ptime& snapshotTime,
61 const boost::posix_time::ptime& insertionTime ){
63 dataToInsert( std::tie( name, validity, description, release, snapshotTime, insertionTime ) );
64 insertInTable( m_schema,
tname, dataToInsert.
get() );
71 const boost::posix_time::ptime& snapshotTime,
72 const boost::posix_time::ptime& insertionTime ){
76 updateTable( m_schema,
tname, buffer );
84 return existsTable( m_schema,
tname );
89 throwException(
"GLOBAL_TAG_MAP table already exists in this schema.",
90 "GLOBAL_TAG_MAP::Table::create");
94 createTable( m_schema, descr.
get() );
98 std::vector<std::tuple<std::string,std::string,std::string> >&
tags ){
103 for (
auto row : q ) {
104 if ( std::get<1>(row) ==
"-" ) {
105 std::get<1>(row) =
"";
107 tags.push_back( row );
109 return q.retrievedRows();
113 std::vector<std::tuple<std::string,std::string,std::string> >&
tags ){
118 const std::vector<std::tuple<std::string,std::string,std::string> >&
tags ){
120 for(
auto row :
tags ) inserter.
insert( std::tuple_cat( std::tie( gtName ),row ) );
126 m_gtMapTable( schema ){
bool select(const std::string &name)
GLOBAL_TAG::Table & gtTable()
const coral::TableDescription & get()
static char const * tname
GLOBAL_TAG::Table m_gtTable
void insert(const P ¶ms)
GTSchema(coral::ISchema &schema)
unsigned long long Time_t
void addCondition(const T &value, const std::string condition="=")
const coral::AttributeList & get() const
void addOrderClause(bool ascending=true)
void insert(const std::string &name, cond::Time_t validity, const std::string &description, const std::string &release, const boost::posix_time::ptime &snapshotTime, const boost::posix_time::ptime &insertionTime)
GLOBAL_TAG_MAP::Table & gtMapTable()
void setColumnData(const Params ¶ms)
Table(coral::ISchema &schema)
void insert(const std::string >Name, const std::vector< std::tuple< std::string, std::string, std::string > > &tags)
static char const * tname
GLOBAL_TAG_MAP::Table m_gtMapTable
void update(const std::string &name, cond::Time_t validity, const std::string &description, const std::string &release, const boost::posix_time::ptime &snapshotTime, const boost::posix_time::ptime &insertionTime)
bool select(const std::string >Name, std::vector< std::tuple< std::string, std::string, std::string > > &tags)
Table(coral::ISchema &schema)
void addWhereCondition(const P ¶m, const std::string condition="=")
void throwException(const std::string &message, const std::string &methodName)