CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::UpdateOperation Class Reference

#include <RelationalOperation.h>

Inheritance diagram for ora::UpdateOperation:
ora::InputRelationalData ora::IRelationalOperation ora::IRelationalData

Public Member Functions

bool execute ()
 
bool isRequired ()
 
void reset ()
 
 UpdateOperation (const std::string &tableName, coral::ISchema &schema)
 
 ~UpdateOperation ()
 
- Public Member Functions inherited from ora::InputRelationalData
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)
 
int addWhereId (const std::string &columnName, ConditionType cond)
 
coral::AttributeList & data ()
 
 InputRelationalData ()
 
std::string & updateClause ()
 
std::string & whereClause ()
 
coral::AttributeList & whereData ()
 
virtual ~InputRelationalData ()
 
- Public Member Functions inherited from ora::IRelationalData
virtual ~IRelationalData ()
 
- Public Member Functions inherited from ora::IRelationalOperation
virtual ~IRelationalOperation ()
 

Private Attributes

coral::ISchema & m_schema
 
std::string m_tableName
 

Detailed Description

Definition at line 126 of file RelationalOperation.h.

Constructor & Destructor Documentation

ora::UpdateOperation::UpdateOperation ( const std::string &  tableName,
coral::ISchema &  schema 
)
explicit

Definition at line 185 of file RelationalOperation.cc.

ora::UpdateOperation::~UpdateOperation ( )

Definition at line 192 of file RelationalOperation.cc.

192  {
193 }

Member Function Documentation

bool ora::UpdateOperation::execute ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 200 of file RelationalOperation.cc.

References data, run_regression::ret, findQualityFiles::size, and table.

200  {
201  bool ret = false;
202  if( updateClause().size() && whereClause().size() ){
203  coral::ITable& table = m_schema.tableHandle( m_tableName );
204  long nr = table.dataEditor().updateRows( updateClause(), whereClause(), data() );
205  ret = nr > 0;
206  }
207  return ret;
208 }
coral::ISchema & m_schema
#define table(NAME)
Definition: DbCore.h:49
coral::AttributeList & data()
tuple size
Write out results.
bool ora::UpdateOperation::isRequired ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 196 of file RelationalOperation.cc.

196  {
197  return true;
198 }
void ora::UpdateOperation::reset ( void  )
virtual

Member Data Documentation

coral::ISchema& ora::UpdateOperation::m_schema
private

Definition at line 138 of file RelationalOperation.h.

std::string ora::UpdateOperation::m_tableName
private

Definition at line 137 of file RelationalOperation.h.