#include <OraDatabaseSchema.h>
Definition at line 30 of file OraDatabaseSchema.h.
ora::OraSequenceTable::OraSequenceTable |
( |
coral::ISchema & |
dbSchema | ) |
|
|
explicit |
ora::OraSequenceTable::~OraSequenceTable |
( |
| ) |
|
|
virtual |
bool ora::OraSequenceTable::add |
( |
const std::string & |
sequenceName | ) |
|
|
virtual |
Implements ora::ISequenceTable.
Definition at line 121 of file OraDatabaseSchema.cc.
123 coral::AttributeList insertData;
126 coral::AttributeList::iterator iAttribute = insertData.begin();
127 iAttribute->data< std::string >() = sequenceName;
129 iAttribute->data<
int >() = 0;
coral::ISchema & m_schema
static std::string sequenceNameColumn()
static std::string tableName()
static std::string sequenceValueColumn()
void ora::OraSequenceTable::create |
( |
| ) |
|
|
virtual |
Implements ora::IDatabaseTable.
Definition at line 182 of file OraDatabaseSchema.cc.
References idDealer::description, and ora::throwException().
184 throwException(
"ORA database sequence table already exists in this schema.",
185 "OraSequenceTable::create");
198 m_schema.createTable(
description ).privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select );
coral::ISchema & m_schema
static std::string sequenceNameColumn()
static std::string tableName()
static std::string sequenceValueColumn()
void throwException(const std::string &message, const std::string &methodName)
void ora::OraSequenceTable::drop |
( |
| ) |
|
|
virtual |
void ora::OraSequenceTable::erase |
( |
const std::string & |
sequenceName | ) |
|
|
virtual |
Implements ora::ISequenceTable.
Definition at line 170 of file OraDatabaseSchema.cc.
171 coral::AttributeList whereData;
175 m_schema.tableHandle(
tableName() ).dataEditor().deleteRows( whereClause, whereData );
coral::ISchema & m_schema
static std::string sequenceNameColumn()
static std::string tableName()
bool ora::OraSequenceTable::exists |
( |
| ) |
|
|
virtual |
bool ora::OraSequenceTable::getLastId |
( |
const std::string & |
sequenceName, |
|
|
int & |
lastId |
|
) |
| |
|
virtual |
Implements ora::ISequenceTable.
Definition at line 135 of file OraDatabaseSchema.cc.
References o2o::query.
138 query->limitReturnedRows( 1, 0 );
141 query->setForUpdate();
143 coral::AttributeList rowData;
145 rowData.begin()->data< std::string >() = sequenceName;
146 query->setCondition( whereClause, rowData );
147 coral::ICursor& cursor =
query->execute();
148 if ( cursor.next() ) {
149 lastId = cursor.currentRow().begin()->data<
int >();
coral::ISchema & m_schema
static std::string sequenceNameColumn()
static std::string tableName()
static std::string sequenceValueColumn()
std::string ora::OraSequenceTable::sequenceNameColumn |
( |
| ) |
|
|
static |
std::string ora::OraSequenceTable::sequenceValueColumn |
( |
| ) |
|
|
static |
void ora::OraSequenceTable::sinchronize |
( |
const std::string & |
sequenceName, |
|
|
int |
lastValue |
|
) |
| |
|
virtual |
Implements ora::ISequenceTable.
Definition at line 155 of file OraDatabaseSchema.cc.
157 coral::AttributeList updateData;
163 coral::AttributeList::iterator iAttribute = updateData.begin();
164 iAttribute->data< std::string >() = sequenceName;
167 m_schema.tableHandle(
tableName() ).dataEditor().updateRows( setClause,whereClause,updateData );
coral::ISchema & m_schema
static std::string sequenceNameColumn()
static std::string tableName()
static std::string sequenceValueColumn()
std::string ora::OraSequenceTable::tableName |
( |
| ) |
|
|
static |
coral::ISchema& ora::OraSequenceTable::m_schema |
|
private |