#include <SchemaUtils.h>
Definition at line 21 of file SchemaUtils.h.
ora::Serializer::Serializer |
( |
| ) |
|
Definition at line 58 of file SchemaUtils.cc.
std::auto_ptr< coral::ISessionProxy > m_session
std::auto_ptr< coral::ConnectionService > m_connServ
ora::Serializer::~Serializer |
( |
| ) |
|
|
virtual |
void ora::Serializer::lock |
( |
const std::string & |
connectionString | ) |
|
Definition at line 68 of file SchemaUtils.cc.
References AlCaHLTBitMon_QueryRunRegistry::data, o2o::query, python.IdGenerator::schema, AlCaHLTBitMon_QueryRunRegistry::string, table, and HLT_25ns14e33_v1_cff::tableName.
70 m_connServ->configuration().setConnectionTimeOut(0);
75 coral::TableDescription descr(
"OraDb" );
77 descr.insertColumn(
"P_LOCK",
78 coral::AttributeSpecification::typeNameForType<int>() );
79 descr.setNotNullConstraint(
"P_LOCK" );
80 descr.setPrimaryKey( std::vector<std::string>( 1,
"P_LOCK" ) );
81 coral::ITable&
table = schema.createTable( descr );
82 table.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select );
84 coral::ITable& table = schema.tableHandle(
tableName() );
86 std::auto_ptr<coral::IQuery>
query( table.newQuery() );
87 query->addToOutputList(
"P_LOCK" );
88 query->defineOutputType(
"P_LOCK", coral::AttributeSpecification::typeNameForType<int>());
89 query->setCondition( condition, coral::AttributeList() );
90 query->setForUpdate();
91 coral::ICursor& cursor =
query->execute();
92 coral::AttributeList
data;
93 data.extend<
int>(
"P_LOCK" );
94 data[
"P_LOCK"].data<
int>() = 1;
98 table.dataEditor().updateRows( setCLause, condition , data );
101 table.dataEditor().insertRow( data );
std::auto_ptr< coral::ISessionProxy > m_session
std::auto_ptr< coral::ConnectionService > m_connServ
static const std::string & tableName()
void ora::Serializer::release |
( |
| ) |
|
const std::string & ora::Serializer::tableName |
( |
| ) |
|
|
static |
std::auto_ptr<coral::ConnectionService> ora::Serializer::m_connServ |
|
private |
bool ora::Serializer::m_lock |
|
private |
std::auto_ptr<coral::ISessionProxy> ora::Serializer::m_session |
|
private |