ATLAS Offline Software
|
#include <RootCollectionDataEditor.h>
Public Member Functions | |
RootCollectionDataEditor (const pool::ICollectionDescription &description, TTree *tree, coral::MessageStream &log) | |
virtual | ~RootCollectionDataEditor () |
virtual void | setRowCacheSize (int) |
Sets the number of rows to cache before insertion into the collection. More... | |
virtual CollectionRowBuffer & | rowBuffer () |
Returns a reference to a collection row buffer for adding rows of data to the collection. More... | |
virtual CollectionRowBuffer & | emptyRowBuffer () |
Returns a reference to an empty collection row buffer for adding rows of data to the collection. More... | |
virtual void | clearRowBuffers () |
Clears all row buffers. More... | |
virtual void | insertRow (const pool::CollectionRowBuffer &inputRowBuffer, bool updateRecordsCounter=false) |
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) |
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) |
Deletes the rows of the collection that satisfy a query. More... | |
Protected Attributes | |
const ICollectionDescription & | m_description |
Specification of collection properties. More... | |
CollectionRowBuffer | m_collectionRowBuffer |
Collection row buffer containing all Tokens and Attributes defined by collection. More... | |
TTree * | m_tree |
coral::MessageStream * | m_poolOut |
Definition at line 29 of file RootCollectionDataEditor.h.
pool::RootCollection::RootCollectionDataEditor::RootCollectionDataEditor | ( | const pool::ICollectionDescription & | description, |
TTree * | tree, | ||
coral::MessageStream & | log | ||
) |
|
inlinevirtual |
Definition at line 37 of file RootCollectionDataEditor.h.
|
virtual |
Clears all row buffers.
Should be applied before inserting rows for which some columns are expected to have null values.
Implements pool::ICollectionDataEditor.
|
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.
whereClause | Predicates of query. |
attributeBindData | Attribute bind data for where clause. |
tokenBindData | Token bind data for where clause. |
updateRecordsCounter | Flag indicating whether to decrement written records counter and increment deleted records counter. |
Implements pool::ICollectionDataEditor.
|
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.
Implements pool::ICollectionDataEditor.
|
virtual |
Adds a new row of data to the collection.
An option is provided to turn off the written records counter to improve performance.
inputRowBuffer | Buffer containing data for row to be added. |
updateRecordsCounter | Flag indicating whether to increment written records counter. |
Implements pool::ICollectionDataEditor.
|
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.
Implements pool::ICollectionDataEditor.
|
inlinevirtual |
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.
rowCacheSize | Number of rows to cache before insertion into collection. |
Implements pool::ICollectionDataEditor.
Definition at line 46 of file RootCollectionDataEditor.h.
|
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.
tokenSetList | List of Tokens to set with associated values. |
attributeSetList | List of Attributes to set with associated values. |
whereClause | Predicates of query. |
attributeBindData | Attribute bind data for where clause. |
tokenBindData | Token bind data for where clause. |
Implements pool::ICollectionDataEditor.
|
protected |
Collection row buffer containing all Tokens and Attributes defined by collection.
Definition at line 116 of file RootCollectionDataEditor.h.
|
protected |
Specification of collection properties.
Definition at line 113 of file RootCollectionDataEditor.h.
|
protected |
Definition at line 120 of file RootCollectionDataEditor.h.
|
protected |
Definition at line 118 of file RootCollectionDataEditor.h.