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::DeleteOperation Class Reference

#include <RelationalOperation.h>

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

Public Member Functions

 DeleteOperation (const std::string &tableName, coral::ISchema &schema)
 
bool execute ()
 
bool isRequired ()
 
void reset ()
 
 ~DeleteOperation ()
 
- Public Member Functions inherited from ora::InputRelationalData
void addBlobData (const std::string &columnName)
 
void addData (const std::string &columnName, const std::type_info &columnType)
 
void addId (const std::string &columnName)
 
void addWhereId (const std::string &columnName)
 
void 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 143 of file RelationalOperation.h.

Constructor & Destructor Documentation

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

Definition at line 196 of file RelationalOperation.cc.

197  :
199  m_tableName( tableName ),
200  m_schema( schema ){
201 }
coral::ISchema & m_schema
ora::DeleteOperation::~DeleteOperation ( )

Definition at line 203 of file RelationalOperation.cc.

203  {
204 }

Member Function Documentation

bool ora::DeleteOperation::execute ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 211 of file RelationalOperation.cc.

References runTheMatrix::ret, findQualityFiles::size, and asciidump::table.

211  {
212  bool ret = false;
213  if( whereClause().size() ){
214  coral::ITable& table = m_schema.tableHandle( m_tableName );
215  long nr = table.dataEditor().deleteRows( whereClause(), whereData() );
216  ret = nr > 0;
217  }
218  return ret;
219 }
list table
Definition: asciidump.py:386
coral::AttributeList & whereData()
coral::ISchema & m_schema
tuple size
Write out results.
bool ora::DeleteOperation::isRequired ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 207 of file RelationalOperation.cc.

207  {
208  return false;
209 }
void ora::DeleteOperation::reset ( void  )
virtual

Member Data Documentation

coral::ISchema& ora::DeleteOperation::m_schema
private

Definition at line 154 of file RelationalOperation.h.

std::string ora::DeleteOperation::m_tableName
private

Definition at line 153 of file RelationalOperation.h.