CMS 3D CMS Logo

IOVSchema.cc
Go to the documentation of this file.
4 #include "IOVSchema.h"
5 
6 namespace cond {
7 
8  namespace persistency {
9 
10  cond::Hash makeHash(const std::string& objectType, const cond::Binary& data) {
12  EVP_MD_CTX* mdctx = EVP_MD_CTX_new();
13  const EVP_MD* md = EVP_get_digestbyname("SHA1");
14  if (!EVP_DigestInit_ex(mdctx, md, nullptr)) {
15  throwException("SHA1 initialization error.", "IOVSchema::makeHash");
16  }
17  if (!EVP_DigestUpdate(mdctx, objectType.c_str(), objectType.size())) {
18  throwException("SHA1 processing error (1).", "IOVSchema::makeHash");
19  }
20  if (!EVP_DigestUpdate(mdctx, data.data(), data.size())) {
21  throwException("SHA1 processing error (2).", "IOVSchema::makeHash");
22  }
23  unsigned char hash[EVP_MAX_MD_SIZE];
24  unsigned int md_len = 0;
25  if (!EVP_DigestFinal_ex(mdctx, hash, &md_len)) {
26  throwException("SHA1 finalization error.", "IOVSchema::makeHash");
27  }
28  EVP_MD_CTX_free(mdctx);
29  char tmp[EVP_MAX_MD_SIZE * 2 + 1];
30  // re-write bytes in hex
31  if (md_len > 20) {
32  md_len = 20;
33  }
34  for (unsigned int i = 0; i < md_len; i++) {
35  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
36  }
37  tmp[md_len * 2] = 0;
38  return tmp;
39  }
40 
41  TAG::Table::Table(coral::ISchema& schema) : m_schema(schema) {
42  if (exists()) {
43  std::set<std::string> columns;
44  int ncols = m_schema.tableHandle(tname).description().numberOfColumns();
45  for (int i = 0; i < ncols; i++)
46  columns.insert(m_schema.tableHandle(tname).description().columnDescription(i).name());
48  }
49  }
50 
51  bool TAG::Table::Table::exists() { return existsTable(m_schema, tname); }
52 
54  if (exists()) {
55  throwException("TAG table already exists in this schema.", "TAG::Table::create");
56  }
58  TIME_TYPE,
67  descr(tname);
68  descr.setPrimaryKey<NAME>();
69  createTable(m_schema, descr.get());
70  m_isProtectable = true;
71  }
72 
74  Query<NAME> q(m_schema);
75  q.addCondition<NAME>(name);
76  for (auto row : q) {
77  }
78 
79  return q.retrievedRows();
80  }
81 
83  cond::TimeType& timeType,
84  std::string& objectType,
85  cond::SynchronizationType& synchronizationType,
86  cond::Time_t& endOfValidity,
87  cond::Time_t& lastValidatedTime,
88  int& protectionCode) {
89  if (isProtectable()) {
91  m_schema);
92  q.addCondition<NAME>(name);
93  for (const auto& row : q)
94  std::tie(timeType, objectType, synchronizationType, endOfValidity, lastValidatedTime, protectionCode) = row;
95  return q.retrievedRows();
96  } else {
98  q.addCondition<NAME>(name);
99  for (const auto& row : q)
100  std::tie(timeType, objectType, synchronizationType, endOfValidity, lastValidatedTime) = row;
101  protectionCode = 0;
102 
103  return q.retrievedRows();
104  }
105  }
106 
109  boost::posix_time::ptime& insertionTime,
110  boost::posix_time::ptime& modificationTime) {
112  q.addCondition<NAME>(name);
113  for (const auto& row : q)
114  std::tie(description, insertionTime, modificationTime) = row;
115  return q.retrievedRows();
116  }
117 
119  cond::TimeType timeType,
120  const std::string& objectType,
121  cond::SynchronizationType synchronizationType,
122  cond::Time_t endOfValidity,
123  const std::string& description,
124  cond::Time_t lastValidatedTime,
125  const boost::posix_time::ptime& insertionTime) {
126  if (isProtectable()) {
127  RowBuffer<NAME,
128  TIME_TYPE,
129  OBJECT_TYPE,
132  DESCRIPTION,
137  dataToInsert(std::tie(name,
138  timeType,
139  objectType,
140  synchronizationType,
141  endOfValidity,
142  description,
143  lastValidatedTime,
144  insertionTime,
145  insertionTime,
147  insertInTable(m_schema, tname, dataToInsert.get());
148  } else {
149  RowBuffer<NAME,
150  TIME_TYPE,
151  OBJECT_TYPE,
154  DESCRIPTION,
158  dataToInsert(std::tie(name,
159  timeType,
160  objectType,
161  synchronizationType,
162  endOfValidity,
163  description,
164  lastValidatedTime,
165  insertionTime,
166  insertionTime));
167  insertInTable(m_schema, tname, dataToInsert.get());
168  }
169  }
170 
172  cond::SynchronizationType synchronizationType,
173  cond::Time_t& endOfValidity,
174  cond::Time_t lastValidatedTime,
175  const boost::posix_time::ptime& updateTime) {
178  std::tie(synchronizationType, endOfValidity, lastValidatedTime, updateTime));
179  buffer.addWhereCondition<NAME>(name);
180  updateTable(m_schema, tname, buffer);
181  }
182 
184  const std::string& description,
185  const boost::posix_time::ptime& updateTime) {
187  buffer.setColumnData<DESCRIPTION, MODIFICATION_TIME>(std::tie(description, updateTime));
188  buffer.addWhereCondition<NAME>(name);
189  updateTable(m_schema, tname, buffer);
190  }
191 
193  cond::Time_t lastValidatedTime,
194  const boost::posix_time::ptime& updateTime) {
196  buffer.setColumnData<LAST_VALIDATED_TIME, MODIFICATION_TIME>(std::tie(lastValidatedTime, updateTime));
197  buffer.addWhereCondition<NAME>(name);
198  updateTable(m_schema, tname, buffer);
199  }
200 
202  if (!isProtectable()) {
203  throwException("Tag in this schema are not protectable.", "TAG::Table::create");
204  }
205  Query<PROTECTION_CODE> q(m_schema);
206  q.addCondition<NAME>(name);
207  int newCode = 0;
208  for (const auto& row : q)
209  std::tie(newCode) = row;
210  newCode |= code;
212  buffer.setColumnData<PROTECTION_CODE>(std::tie(newCode));
213  buffer.addWhereCondition<NAME>(name);
214  updateTable(m_schema, tname, buffer);
215  }
216 
218  if (!isProtectable()) {
219  throwException("Tag in this schema are not protectable.", "TAG::Table::unsetProtectionCode");
220  }
221  Query<PROTECTION_CODE> q(m_schema);
222  q.addCondition<NAME>(name);
223  int presentCode = 0;
224  for (const auto& row : q)
225  std::tie(presentCode) = row;
226  int newCode = presentCode & (~code);
228  buffer.setColumnData<PROTECTION_CODE>(std::tie(newCode));
229  buffer.addWhereCondition<NAME>(name);
230  updateTable(m_schema, tname, buffer);
231  }
232 
233  IOV::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
234 
235  bool IOV::Table::exists() { return existsTable(m_schema, tname); }
236 
238  if (exists()) {
239  throwException("IOV table already exists in this schema.", "IOV::Schema::create");
240  }
241 
244  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
245  descr.setForeignKey<PAYLOAD_HASH, PAYLOAD::HASH>("PAYLOAD_HASH_FK");
246  createTable(m_schema, descr.get());
247  }
248 
250  const boost::posix_time::ptime& snapshotTime,
251  unsigned long long gSize,
252  std::vector<cond::Time_t>& groups) {
253  Query<SINCE_GROUP> q(m_schema, true);
254  q.addCondition<TAG_NAME>(tag);
255  if (!snapshotTime.is_not_a_date_time()) {
256  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
257  }
258  q.groupBy(SINCE_GROUP::group(gSize));
259  q.addOrderClause<SINCE_GROUP>();
260  for (auto row : q) {
261  groups.push_back(std::get<0>(row));
262  }
263  return q.retrievedRows();
264  }
265 
267  cond::Time_t lowerSinceGroup,
268  cond::Time_t upperSinceGroup,
269  const boost::posix_time::ptime& snapshotTime,
270  std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
271  Query<SINCE, PAYLOAD_HASH> q(m_schema);
272  q.addCondition<TAG_NAME>(tag);
273  if (lowerSinceGroup > 0)
274  q.addCondition<SINCE>(lowerSinceGroup, ">=");
275  if (upperSinceGroup < cond::time::MAX_VAL)
276  q.addCondition<SINCE>(upperSinceGroup, "<");
277  if (!snapshotTime.is_not_a_date_time()) {
278  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
279  }
280  q.addOrderClause<SINCE>();
281  q.addOrderClause<INSERTION_TIME>(false);
282  size_t initialSize = iovs.size();
283  for (auto row : q) {
284  // starting from the second iov in the array, skip the rows with older timestamp
285  if (iovs.size() - initialSize && std::get<0>(iovs.back()) == std::get<0>(row))
286  continue;
287  iovs.push_back(row);
288  }
289  return iovs.size() - initialSize;
290  }
291 
293  const boost::posix_time::ptime& snapshotTime,
295  cond::Hash& hash) {
296  Query<SINCE, PAYLOAD_HASH> q(m_schema);
297  q.addCondition<TAG_NAME>(tag);
298  if (!snapshotTime.is_not_a_date_time()) {
299  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
300  }
301  q.addOrderClause<SINCE>(false);
302  q.addOrderClause<INSERTION_TIME>(false);
303  q.limitReturnedRows(1);
304  for (auto row : q) {
305  since = std::get<0>(row);
306  hash = std::get<1>(row);
307  return true;
308  }
309  return false;
310  }
311 
312  bool IOV::Table::getSize(const std::string& tag, const boost::posix_time::ptime& snapshotTime, size_t& size) {
313  Query<SEQUENCE_SIZE> q(m_schema);
314  q.addCondition<TAG_NAME>(tag);
315  if (!snapshotTime.is_not_a_date_time()) {
316  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
317  }
318  for (auto row : q) {
319  size = std::get<0>(row);
320  return true;
321  }
322  return false;
323  }
324 
326  cond::Time_t begin,
328  const boost::posix_time::ptime& snapshotTime,
329  std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
330  Query<MAX_SINCE> q0(m_schema);
331  q0.addCondition<TAG_NAME>(tag);
332  q0.addCondition<SINCE>(begin, "<=");
333  if (!snapshotTime.is_not_a_date_time()) {
334  q0.addCondition<INSERTION_TIME>(snapshotTime, "<=");
335  }
336  cond::Time_t lower_since = 0;
337  for (auto row : q0) {
338  lower_since = std::get<0>(row);
339  }
340  if (!lower_since)
341  return false;
342  Query<SINCE, PAYLOAD_HASH> q1(m_schema);
344  q1.addCondition<SINCE>(lower_since, ">=");
345  if (!snapshotTime.is_not_a_date_time()) {
347  }
348  q1.addCondition<SINCE>(end, "<=");
349  q1.addOrderClause<SINCE>();
350  q1.addOrderClause<INSERTION_TIME>(false);
351  size_t initialSize = iovs.size();
352  for (auto row : q1) {
353  // starting from the second iov in the array, skip the rows with older timestamp
354  if (iovs.size() - initialSize && std::get<0>(iovs.back()) == std::get<0>(row))
355  continue;
356  iovs.push_back(row);
357  }
358  return iovs.size() - initialSize;
359  }
360 
363  cond::Hash payloadHash,
364  const boost::posix_time::ptime& insertTimeStamp) {
366  std::tie(tag, since, payloadHash, insertTimeStamp));
367  insertInTable(m_schema, tname, dataToInsert.get());
368  }
369 
371  const std::string& tag,
372  const std::vector<std::tuple<cond::Time_t, cond::Hash, boost::posix_time::ptime> >& iovs) {
374  for (auto row : iovs)
375  inserter.insert(std::tuple_cat(std::tie(tag), row));
376  inserter.flush();
377  }
378 
381  buffer.addWhereCondition<TAG_NAME>(tag);
382  buffer.addWhereCondition<SINCE>(since);
383  buffer.addWhereCondition<PAYLOAD_HASH>(payloadId);
384  deleteFromTable(m_schema, tname, buffer);
385  }
386 
387  void IOV::Table::eraseMany(const std::string& tag, const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
389  for (auto iov : iovs)
390  deleter.erase(std::tuple_cat(std::tie(tag), iov));
391  deleter.flush();
392  }
393 
396  buffer.addWhereCondition<TAG_NAME>(tag);
397  deleteFromTable(m_schema, tname, buffer);
398  }
399 
400  TAG_LOG::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
401 
402  bool TAG_LOG::Table::exists() { return existsTable(m_schema, tname); }
403 
405  if (exists()) {
406  throwException("TAG_LOG table already exists in this schema.", "TAG_LOG::create");
407  }
410  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
411  createTable(m_schema, descr.get());
412  }
413 
415  const boost::posix_time::ptime& eventTime,
416  const std::string& userName,
417  const std::string& hostName,
418  const std::string& command,
419  const std::string& action,
420  const std::string& userText) {
422  std::tie(tag, eventTime, userName, hostName, command, action, userText));
423  insertInTable(m_schema, tname, dataToInsert.get());
424  }
425 
426  TAG_AUTHORIZATION::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
427 
428  bool TAG_AUTHORIZATION::Table::exists() { return existsTable(m_schema, tname); }
429 
431  if (exists()) {
432  throwException("TAG_AUTHORIZATION table already exists in this schema.", "TAG_AUTHORIZATION::create");
433  }
436  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
437  createTable(m_schema, descr.get());
438  }
439 
441  const std::string& credential,
442  int credentialType,
443  int accessType) {
444  Query<ACCESS_TYPE> q(m_schema);
445  q.addCondition<TAG_NAME>(tagName);
446  q.addCondition<CREDENTIAL>(credential);
447  q.addCondition<CREDENTIAL_TYPE>(credentialType);
448  int allowedAccess = 0;
449  for (auto row : q) {
450  allowedAccess = std::get<0>(row);
451  }
452  return allowedAccess & accessType;
453  }
454 
456  const std::string& credential,
457  int credentialType,
458  int accessType) {
460  std::tie(tagName, accessType, credential, credentialType));
461  insertInTable(m_schema, tname, dataToInsert.get());
462  }
463 
465  const std::string& credential,
466  int credentialType) {
468  buffer.addWhereCondition<TAG_NAME>(tagName);
469  buffer.addWhereCondition<CREDENTIAL>(credential);
470  buffer.addWhereCondition<CREDENTIAL_TYPE>(credentialType);
471  deleteFromTable(m_schema, tname, buffer);
472  }
473 
474  void TAG_AUTHORIZATION::Table::removeEntriesForCredential(const std::string& credential, int credentialType) {
476  buffer.addWhereCondition<CREDENTIAL>(credential);
477  buffer.addWhereCondition<CREDENTIAL_TYPE>(credentialType);
478  deleteFromTable(m_schema, tname, buffer);
479  }
480 
481  PAYLOAD::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
482 
483  bool PAYLOAD::Table::exists() { return existsTable(m_schema, tname); }
484 
486  if (exists()) {
487  throwException("Payload table already exists in this schema.", "PAYLOAD::Schema::create");
488  }
489 
491  descr.setPrimaryKey<HASH>();
492  createTable(m_schema, descr.get());
493  }
494 
495  bool PAYLOAD::Table::select(const cond::Hash& payloadHash) {
496  Query<HASH> q(m_schema);
497  q.addCondition<HASH>(payloadHash);
498  for (auto row : q) {
499  }
500 
501  return q.retrievedRows();
502  }
503 
504  bool PAYLOAD::Table::getType(const cond::Hash& payloadHash, std::string& objectType) {
505  Query<OBJECT_TYPE> q(m_schema);
506  q.addCondition<HASH>(payloadHash);
507  for (auto row : q) {
508  objectType = std::get<0>(row);
509  }
510 
511  return q.retrievedRows();
512  }
513 
514  bool PAYLOAD::Table::select(const cond::Hash& payloadHash,
515  std::string& objectType,
516  cond::Binary& payloadData,
517  cond::Binary& streamerInfoData) {
519  q.addCondition<HASH>(payloadHash);
520  for (const auto& row : q) {
521  std::tie(payloadData, streamerInfoData, objectType) = row;
522  }
523  return q.retrievedRows();
524  }
525 
526  bool PAYLOAD::Table::insert(const cond::Hash& payloadHash,
527  const std::string& objectType,
528  const cond::Binary& payloadData,
529  const cond::Binary& streamerInfoData,
530  const boost::posix_time::ptime& insertionTime) {
531  std::string version("dummy");
532  cond::Binary sinfoData(streamerInfoData);
533  if (!sinfoData.size())
534  sinfoData.copy(std::string("0"));
536  std::tie(payloadHash, objectType, payloadData, sinfoData, version, insertionTime));
537  bool failOnDuplicate = false;
538  return insertInTable(m_schema, tname, dataToInsert.get(), failOnDuplicate);
539  }
540 
542  const cond::Binary& payloadData,
543  const cond::Binary& streamerInfoData,
544  const boost::posix_time::ptime& insertionTime) {
545  cond::Hash payloadHash = makeHash(payloadObjectType, payloadData);
546  // the check on the hash existance is only required to avoid the error message printing in SQLite! once this is removed, this check is useless...
547  if (!select(payloadHash)) {
548  insert(payloadHash, payloadObjectType, payloadData, streamerInfoData, insertionTime);
549  }
550  return payloadHash;
551  }
552 
553  IOVSchema::IOVSchema(coral::ISchema& schema)
554  : m_tagTable(schema),
555  m_iovTable(schema),
556  m_tagLogTable(schema),
557  m_tagAccessPermissionTable(schema),
558  m_payloadTable(schema) {}
559 
561  if (!m_tagTable.exists())
562  return false;
563  if (!m_payloadTable.exists())
564  return false;
565  if (!m_iovTable.exists())
566  return false;
567  return true;
568  }
569 
571  bool created = false;
572  if (!exists()) {
573  m_tagTable.create();
575  m_iovTable.create();
578  created = true;
579  }
580  return created;
581  }
582 
584 
586 
588 
590  if (!m_tagTable.isProtectable()) {
591  throwException("Tag in this schema are not protectable.", "IOVSchema::tagAccessPermissionTable");
592  }
594  }
595 
597 
598  } // namespace persistency
599 } // namespace cond
size
Write out results.
bool getLastIov(const std::string &tag, const boost::posix_time::ptime &snapshotTime, cond::Time_t &since, cond::Hash &hash) override
Definition: IOVSchema.cc:292
bool select(const cond::Hash &payloadHash)
Definition: IOVSchema.cc:495
void openssl_init()
Definition: openssl_init.cc:5
void update(const std::string &name, cond::SynchronizationType synchronizationType, cond::Time_t &endOfValidity, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:171
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:41
void insert(const std::string &tag, const boost::posix_time::ptime &eventTime, const std::string &userName, const std::string &hostName, const std::string &command, const std::string &action, const std::string &userText) override
Definition: IOVSchema.cc:414
const coral::TableDescription & get()
Definition: DbCore.h:338
static constexpr char const * name
Definition: IOVSchema.h:23
void insert(const P &params)
Definition: DbCore.h:687
void insert(const std::string &name, cond::TimeType timeType, const std::string &objectType, cond::SynchronizationType synchronizationType, cond::Time_t endOfValidity, const std::string &description, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &insertionTime) override
Definition: IOVSchema.cc:118
#define EVP_MD_CTX_free
Definition: openssl_init.h:7
void setAccessPermission(const std::string &tagName, const std::string &credential, int credentialType, int accessType) override
Definition: IOVSchema.cc:455
PAYLOAD::Table m_payloadTable
Definition: IOVSchema.h:264
coral::ISchema & m_schema
Definition: IOVSchema.h:68
TimeType
Definition: Time.h:19
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:233
void eraseOne(const std::string &tag, cond::Time_t since, cond::Hash payloadId) override
Definition: IOVSchema.cc:379
static constexpr char const * tname
Definition: IOVSchema.h:73
static std::string group(unsigned long long groupSize)
Definition: IOVSchema.h:121
IPayloadTable & payloadTable() override
Definition: IOVSchema.cc:596
cond::Hash insertIfNew(const std::string &objectType, const cond::Binary &payloadData, const cond::Binary &streamerInfoData, const boost::posix_time::ptime &insertionTime) override
Definition: IOVSchema.cc:541
void setForeignKey(const std::string &name)
Definition: DbCore.h:333
static constexpr char const * tname
Definition: IOVSchema.h:219
TAG_AUTHORIZATION::Table m_tagAccessPermissionTable
Definition: IOVSchema.h:263
unsigned long long Time_t
Definition: Time.h:14
size_t size() const
Definition: Binary.cc:48
static constexpr char const * tname
Definition: IOVSchema.h:13
bool getMetadata(const std::string &name, std::string &description, boost::posix_time::ptime &insertionTime, boost::posix_time::ptime &modificationTime) override
Definition: IOVSchema.cc:107
bool select(const std::string &name) override
Definition: IOVSchema.cc:73
void unsetProtectionCode(const std::string &name, int code) override
Definition: IOVSchema.cc:217
#define EVP_MD_CTX_new
Definition: openssl_init.h:6
Query & addCondition(const T &value, const std::string condition="=")
Definition: DbCore.h:528
void insertOne(const std::string &tag, cond::Time_t since, cond::Hash payloadHash, const boost::posix_time::ptime &insertTime) override
Definition: IOVSchema.cc:361
void erase(const std::string &tag) override
Definition: IOVSchema.cc:394
void removeEntriesForCredential(const std::string &credential, int credentialType) override
Definition: IOVSchema.cc:474
std::string Hash
Definition: Types.h:43
void copy(const std::string &source)
Definition: Binary.cc:32
void removeAccessPermission(const std::string &tagName, const std::string &credential, int credentialType) override
Definition: IOVSchema.cc:464
static constexpr int COND_DBTAG_NO_PROTECTION_CODE
Definition: Auth.h:48
const coral::AttributeList & get() const
Definition: DbCore.h:201
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
bool getRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, const boost::posix_time::ptime &snapshotTime, std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:325
ITagLogTable & tagLogTable() override
Definition: IOVSchema.cc:587
size_t select(const std::string &tag, cond::Time_t lowerGroup, cond::Time_t upperGroup, const boost::posix_time::ptime &snapshotTime, std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:266
Query & addOrderClause(bool ascending=true)
Definition: DbCore.h:543
void updateMetadata(const std::string &name, const std::string &description, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:183
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:481
TAG_LOG::Table m_tagLogTable
Definition: IOVSchema.h:262
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:400
IOVSchema(coral::ISchema &schema)
Definition: IOVSchema.cc:553
void updateValidity(const std::string &name, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:192
void setProtectionCode(const std::string &name, int code) override
Definition: IOVSchema.cc:201
bool getSize(const std::string &tag, const boost::posix_time::ptime &snapshotTime, size_t &size) override
Definition: IOVSchema.cc:312
void insertMany(const std::string &tag, const std::vector< std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > > &iovs) override
Definition: IOVSchema.cc:370
list command
Definition: mps_check.py:25
static constexpr char const * tname
Definition: IOVSchema.h:110
Definition: plugin.cc:23
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
bool getType(const cond::Hash &payloadHash, std::string &objectType) override
Definition: IOVSchema.cc:504
cond::Hash makeHash(const std::string &objectType, const cond::Binary &data)
Definition: IOVSchema.cc:10
size_t getGroups(const std::string &tag, const boost::posix_time::ptime &snapshotTime, unsigned long long groupSize, std::vector< cond::Time_t > &groups) override
Definition: IOVSchema.cc:249
SynchronizationType
Definition: Types.h:27
static constexpr size_t size
Definition: IOVSchema.h:114
bool insert(const cond::Hash &payloadHash, const std::string &objectType, const cond::Binary &payloadData, const cond::Binary &streamerInfoData, const boost::posix_time::ptime &insertionTime)
Definition: IOVSchema.cc:526
IIOVTable & iovTable() override
Definition: IOVSchema.cc:585
static constexpr char const * tname
Definition: IOVSchema.h:189
bool getAccessPermission(const std::string &tagName, const std::string &credential, int credentialType, int accessType) override
Definition: IOVSchema.cc:440
tmp
align.sh
Definition: createJobs.py:716
ITagAccessPermissionTable & tagAccessPermissionTable() override
Definition: IOVSchema.cc:589
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
ITagTable & tagTable() override
Definition: IOVSchema.cc:583
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
void eraseMany(const std::string &tag, const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:387