#include <RelationalOperation.h>
Public Member Functions | |
int | addBlobData (const std::string &columnName) |
int | addData (const std::string &columnName, const std::type_info &columnType) |
int | addId (const std::string &columnName) |
int | addWhereId (const std::string &columnName, ConditionType cond) |
int | addWhereId (const std::string &columnName) |
coral::AttributeList & | data () |
InputRelationalData () | |
std::string & | updateClause () |
std::string & | whereClause () |
coral::AttributeList & | whereData () |
virtual | ~InputRelationalData () |
Private Attributes | |
coral::AttributeList | m_data |
std::string | m_setClause |
std::string | m_whereClause |
Definition at line 58 of file RelationalOperation.h.
ora::InputRelationalData::InputRelationalData | ( | ) |
Definition at line 34 of file RelationalOperation.cc.
: m_data(), m_setClause(""), m_whereClause(""){ }
ora::InputRelationalData::~InputRelationalData | ( | ) | [virtual] |
Definition at line 40 of file RelationalOperation.cc.
{ }
int ora::InputRelationalData::addBlobData | ( | const std::string & | columnName | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 66 of file RelationalOperation.cc.
References ora::existAttribute(), and getHLTprescales::index.
{ int index = existAttribute( columnName, m_data ); if(index == -1){ m_data.extend<coral::Blob>( columnName ); index = m_data.size()-1; if(!m_setClause.empty()) m_setClause += ", "; m_setClause += ( columnName +"= :"+columnName ); } return index; }
int ora::InputRelationalData::addData | ( | const std::string & | columnName, |
const std::type_info & | columnType | ||
) | [virtual] |
Implements ora::IRelationalData.
Definition at line 54 of file RelationalOperation.cc.
References ora::existAttribute(), and getHLTprescales::index.
{ int index = existAttribute( columnName, m_data ); if(index == -1){ m_data.extend( columnName, columnType ); index = m_data.size()-1; if(!m_setClause.empty()) m_setClause += ", "; m_setClause += ( columnName +"= :"+columnName ); } return index; }
int ora::InputRelationalData::addId | ( | const std::string & | columnName | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 43 of file RelationalOperation.cc.
References ora::existAttribute(), and getHLTprescales::index.
Referenced by ora::DependentClassWriter::build(), ora::UpdateBuffer::UpdateBuffer(), and ora::WriteBuffer::WriteBuffer().
{ int index = existAttribute( columnName, m_data ); if(index == -1){ m_data.extend<int>( columnName ); index = m_data.size()-1; if(!m_setClause.empty()) m_setClause += ", "; m_setClause += ( columnName +"= :"+columnName ); } return index; }
int ora::InputRelationalData::addWhereId | ( | const std::string & | columnName, |
ConditionType | cond | ||
) |
Definition at line 88 of file RelationalOperation.cc.
References ora::conditionOfType(), ora::existAttribute(), and getHLTprescales::index.
{ int index = existAttribute( columnName, m_data ); if( index == -1 ){ m_data.extend<int>( columnName ); index = m_data.size()-1; if(!m_whereClause.empty()) m_whereClause += " AND "; m_whereClause += ( columnName +conditionOfType(condType)+" :"+columnName ); } return index; }
int ora::InputRelationalData::addWhereId | ( | const std::string & | columnName | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 77 of file RelationalOperation.cc.
References ora::existAttribute(), and getHLTprescales::index.
Referenced by ora::RelationalDeleter::build(), ora::deleteArrayElements(), and ora::UpdateBuffer::UpdateBuffer().
{ int index = existAttribute( columnName, m_data ); if(index == -1){ m_data.extend<int>( columnName ); index = m_data.size()-1; } if(!m_whereClause.empty()) m_whereClause += " AND "; m_whereClause += ( columnName +"= :"+columnName ); return index; }
coral::AttributeList & ora::InputRelationalData::data | ( | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 99 of file RelationalOperation.cc.
Referenced by ora::UpdateBuffer::update(), ora::DependentClassWriter::write(), and ora::WriteBuffer::write().
{ return m_data; }
std::string & ora::InputRelationalData::updateClause | ( | ) |
Definition at line 108 of file RelationalOperation.cc.
{ return m_setClause; }
std::string & ora::InputRelationalData::whereClause | ( | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 112 of file RelationalOperation.cc.
{ return m_whereClause; }
coral::AttributeList & ora::InputRelationalData::whereData | ( | ) | [virtual] |
Implements ora::IRelationalData.
Definition at line 103 of file RelationalOperation.cc.
Referenced by ora::deleteArrayElements(), and ora::UpdateBuffer::update().
{ // data and where data are hosted in the same buffer (as for update operation) return m_data; }
coral::AttributeList ora::InputRelationalData::m_data [private] |
Definition at line 90 of file RelationalOperation.h.
std::string ora::InputRelationalData::m_setClause [private] |
Definition at line 91 of file RelationalOperation.h.
std::string ora::InputRelationalData::m_whereClause [private] |
Definition at line 92 of file RelationalOperation.h.