1 #ifndef CondCore_CondDB_IOVSchema_h
2 #define CondCore_CondDB_IOVSchema_h
7 #include <boost/date_time/posix_time/posix_time.hpp>
11 namespace persistency {
22 column( INSERTION_TIME, boost::posix_time::ptime );
23 column( MODIFICATION_TIME, boost::posix_time::ptime );
27 explicit Table( coral::ISchema&
schema );
35 boost::posix_time::ptime& insertionTime, boost::posix_time::ptime& modificationTime );
38 cond::Time_t lastValidatedTime,
const boost::posix_time::ptime& insertionTime );
40 cond::Time_t lastValidatedTime,
const boost::posix_time::ptime& updateTime );
41 void updateValidity(
const std::string& name,
cond::Time_t lastValidatedTime,
const boost::posix_time::ptime& updateTime );
43 coral::ISchema& m_schema;
49 static constexpr unsigned int PAYLOAD_HASH_SIZE = 40;
57 column( INSERTION_TIME, boost::posix_time::ptime );
61 explicit Table( coral::ISchema&
schema );
69 const cond::Binary& payloadData,
const boost::posix_time::ptime& insertionTime);
71 const boost::posix_time::ptime& insertionTime );
73 coral::ISchema& m_schema;
82 column( INSERTION_TIME, boost::posix_time::ptime );
87 static std::string tableName(){
return SINCE::tableName(); }
89 return std::string(
"MAX(")+SINCE::fullyQualifiedName()+
")";
95 static std::string tableName(){
return SINCE::tableName(); }
98 return "("+SINCE::fullyQualifiedName()+
"/"+sgroupSize+
")*"+sgroupSize;
102 struct SEQUENCE_SIZE {
103 typedef unsigned int type;
105 static std::string tableName(){
return SINCE::tableName(); }
113 explicit Table( coral::ISchema&
schema );
117 size_t selectGroups(
const std::string&
tag, std::vector<cond::Time_t>& groups );
118 size_t selectSnapshotGroups(
const std::string& tag,
const boost::posix_time::ptime& snapshotTime,
119 std::vector<cond::Time_t>& groups );
121 std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs);
123 const boost::posix_time::ptime& snapshotTime,
124 std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs);
125 size_t selectLatest(
const std::string& tag, std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs);
128 bool getSnapshotSize(
const std::string& tag,
const boost::posix_time::ptime& snapshotTime,
size_t& size );
130 void insertMany(
const std::string& tag,
const std::vector<std::tuple<cond::Time_t,cond::Hash,boost::posix_time::ptime> >& iovs );
132 coral::ISchema& m_schema;
142 column( INSERTION_TIME, boost::posix_time::ptime );
146 explicit Table( coral::ISchema&
schema );
152 const boost::posix_time::ptime& insertionTime);
154 coral::ISchema& m_schema;
static constexpr unsigned int SINCE_GROUP_SIZE
PAYLOAD::Table m_payloadTable
unsigned long long Time_t
TAG_MIGRATION::Table m_tagMigrationTable
IPayloadTable & payloadTable()
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
ITagMigrationTable & tagMigrationTable()
IOVSchema(coral::ISchema &schema)
tuple size
Write out results.