test
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
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 143 of file RelationalOperation.h.

Constructor & Destructor Documentation

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

Definition at line 213 of file RelationalOperation.cc.

214  :
216  m_tableName( tableName ),
217  m_schema( schema ){
218 }
coral::ISchema & m_schema
ora::DeleteOperation::~DeleteOperation ( )

Definition at line 220 of file RelationalOperation.cc.

220  {
221 }

Member Function Documentation

bool ora::DeleteOperation::execute ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 228 of file RelationalOperation.cc.

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

228  {
229  bool ret = false;
230  if( whereClause().size() ){
231  coral::ITable& table = m_schema.tableHandle( m_tableName );
232  long nr = table.dataEditor().deleteRows( whereClause(), whereData() );
233  ret = nr > 0;
234  }
235  return ret;
236 }
coral::AttributeList & whereData()
#define table(NAME)
Definition: DbCore.h:49
coral::ISchema & m_schema
tuple size
Write out results.
bool ora::DeleteOperation::isRequired ( )
virtual

Implements ora::IRelationalOperation.

Definition at line 224 of file RelationalOperation.cc.

224  {
225  return false;
226 }
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.