1 #ifndef CondCore_DBCommon_SequenceManager_h
2 #define CondCore_DBCommon_SequenceManager_h
22 class CoralTransaction;
37 unsigned long long lastId );
53 unsigned long long& lastId );
std::map< std::string, unsigned long long > m_tableToId
Map of ids used.
std::string m_whereClause
The where clause pinning a sequence entry.
bool m_sequenceTableExists
Flag indicating whether the sequence table exists.
~SequenceManager()
Destructor.
bool existSequencesTable()
Whether sequence table exists.
std::string m_sequenceTableName
Sequence table name.
void createSequencesTable()
Creates the table holding the sequences.
bool lockEntry(coral::ISchema &schema, const std::string &reftableName, unsigned long long &lastId)
Locks the id entry in the ref table and returns the lastId value.
SequenceManager(cond::DbSession &coraldb, const std::string &sequenceTableName)
Constructor.
std::string m_setClause
The set clause for updating a sequence entry.
void clear()
Clears the internal state.
cond::DbSession m_coraldb
The coraldb in use.
coral::AttributeList * m_whereData
The data for the where clause.
unsigned long long incrementId(const std::string &reftableName)
Increments and returns a new valid oid for a table.
void updateId(const std::string &reftableName, unsigned long long lastId)
Updates the last used id.