ATLAS Offline Software
Public Member Functions | List of all members
pool::ICollectionDataEditor Class Referenceabstract

#include <CollectionBase/ICollectionDataEditor.h>

Inheritance diagram for pool::ICollectionDataEditor:
Collaboration diagram for pool::ICollectionDataEditor:

Public Member Functions

virtual void setRowCacheSize (int rowCacheSize=0)=0
 Sets the number of rows to cache before insertion into the collection. More...
 
virtual CollectionRowBufferrowBuffer ()=0
 Returns a reference to a collection row buffer for adding rows of data to the collection. More...
 
virtual CollectionRowBufferemptyRowBuffer ()=0
 Returns a reference to an empty collection row buffer for adding rows of data to the collection. More...
 
virtual void clearRowBuffers ()=0
 Clears all row buffers. More...
 
virtual void insertRow (const pool::CollectionRowBuffer &inputRowBuffer, bool updateRecordsCounter=true)=0
 Adds a new row of data to the collection. More...
 
virtual int updateRows (coral::AttributeList *attributeSetList=0, TokenList *tokenSetList=0, const std::string &whereClause="", coral::AttributeList *attributeBindData=0, pool::TokenList *tokenBindData=0)=0
 Updates the rows of the collection that satisfy a query. More...
 
virtual int deleteRows (const std::string &whereClause, coral::AttributeList *attributeBindData=0, pool::TokenList *tokenBindData=0, bool updateRecordsCounter=true)=0
 Deletes the rows of the collection that satisfy a query. More...
 
virtual ~ICollectionDataEditor ()
 Empty destructor. More...
 

Detailed Description

An interface used to add, update or delete data in a collection.

Definition at line 25 of file ICollectionDataEditor.h.

Constructor & Destructor Documentation

◆ ~ICollectionDataEditor()

virtual pool::ICollectionDataEditor::~ICollectionDataEditor ( )
inlinevirtual

Empty destructor.

Definition at line 98 of file ICollectionDataEditor.h.

98 {}

Member Function Documentation

◆ clearRowBuffers()

virtual void pool::ICollectionDataEditor::clearRowBuffers ( )
pure virtual

Clears all row buffers.

Should be applied before inserting rows for which some columns are expected to have null values.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ deleteRows()

virtual int pool::ICollectionDataEditor::deleteRows ( const std::string &  whereClause,
coral::AttributeList *  attributeBindData = 0,
pool::TokenList tokenBindData = 0,
bool  updateRecordsCounter = true 
)
pure virtual

Deletes the rows of the collection that satisfy a query.

Returns the number of rows deleted. Throws an exception if no where clause is provided as input. An option is provided to turn off the written and deleted records counters if the written records counter was turned off during record insertion to improve performance.

Parameters
whereClausePredicates of query.
attributeBindDataAttribute bind data for where clause.
tokenBindDataToken bind data for where clause.
updateRecordsCounterFlag indicating whether to decrement written records counter and increment deleted records counter.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ emptyRowBuffer()

virtual CollectionRowBuffer& pool::ICollectionDataEditor::emptyRowBuffer ( )
pure virtual

Returns a reference to an empty collection row buffer for adding rows of data to the collection.

If data will be provided for all columns use the method ‘rowBuffer’ instead since buffers do not need to be cleared in this case.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ insertRow()

virtual void pool::ICollectionDataEditor::insertRow ( const pool::CollectionRowBuffer inputRowBuffer,
bool  updateRecordsCounter = true 
)
pure virtual

Adds a new row of data to the collection.

An option is provided to turn off the written records counter to improve performance.

Parameters
inputRowBufferBuffer containing data for row to be added.
updateRecordsCounterFlag indicating whether to increment written records counter.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ rowBuffer()

virtual CollectionRowBuffer& pool::ICollectionDataEditor::rowBuffer ( )
pure virtual

Returns a reference to a collection row buffer for adding rows of data to the collection.

If data for one or more columns will not be provided use the method ‘emptyRowBuffer’ instead.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ setRowCacheSize()

virtual void pool::ICollectionDataEditor::setRowCacheSize ( int  rowCacheSize = 0)
pure virtual

Sets the number of rows to cache before insertion into the collection.

If the input argument is 0 (the default) bulk row insertion will not be applied.

Parameters
rowCacheSizeNumber of rows to cache before insertion into collection.

Implemented in pool::RootCollection::RootCollectionDataEditor.

◆ updateRows()

virtual int pool::ICollectionDataEditor::updateRows ( coral::AttributeList *  attributeSetList = 0,
TokenList tokenSetList = 0,
const std::string &  whereClause = "",
coral::AttributeList *  attributeBindData = 0,
pool::TokenList tokenBindData = 0 
)
pure virtual

Updates the rows of the collection that satisfy a query.

Returns the number of rows updated. Throws an exception if both the Attribute and Token set lists provided as input are empty.

Parameters
tokenSetListList of Tokens to set with associated values.
attributeSetListList of Attributes to set with associated values.
whereClausePredicates of query.
attributeBindDataAttribute bind data for where clause.
tokenBindDataToken bind data for where clause.

Implemented in pool::RootCollection::RootCollectionDataEditor.


The documentation for this class was generated from the following file: