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

#include <CollectionBase/ICollectionQuery.h>

Inheritance diagram for pool::ICollectionQuery:
Collaboration diagram for pool::ICollectionQuery:

Public Member Functions

virtual ~ICollectionQuery ()
 Default destructor. More...
 
virtual void addToOutputList (const std::string &columnName)=0
 Adds a column to the query select list. More...
 
virtual void addToOutputList (const std::vector< std::string > &columnNames)=0
 Adds one or more columns to the query select list. More...
 
virtual void selectAllAttributes ()=0
 Adds all Attribute columns to the query select list. More...
 
virtual void selectAllTokens ()=0
 Adds all Token columns to the query select list. More...
 
virtual void selectAll ()=0
 Adds all Token and Attribute columns to the query select list. More...
 
virtual void setCondition (const std::string &whereClause, coral::AttributeList *attributeBindData=0, TokenList *tokenBindData=0)=0
 Sets the predicates of the query. More...
 
virtual const std::string & whereClause () const =0
 Returns the where clause of the query. More...
 
virtual void setRowCacheSize (int rowCacheSize)=0
 Sets the cache size used to store the query result. More...
 
virtual pool::ICollectionCursorexecute ()=0
 Processes the query and returns a cursor over the query result. More...
 
virtual void skipEventReference (bool=true)
 Tell the query to not include the primary event reference in the result by default (it can still beselected manually) Only relevant for explicit collections with attributes. More...
 

Detailed Description

An interface used to query a collection.

Definition at line 26 of file ICollectionQuery.h.

Constructor & Destructor Documentation

◆ ~ICollectionQuery()

virtual pool::ICollectionQuery::~ICollectionQuery ( )
inlinevirtual

Default destructor.

Definition at line 30 of file ICollectionQuery.h.

30 {}

Member Function Documentation

◆ addToOutputList() [1/2]

virtual void pool::ICollectionQuery::addToOutputList ( const std::string &  columnName)
pure virtual

Adds a column to the query select list.

Parameters
columnNameName of Attribute column to select.

Implemented in pool::RootCollection::RootCollectionQuery, pool::RootCollection::RNTCollectionQuery, and pool::ImplicitCollectionIterator.

◆ addToOutputList() [2/2]

virtual void pool::ICollectionQuery::addToOutputList ( const std::vector< std::string > &  columnNames)
pure virtual

Adds one or more columns to the query select list.

Parameters
columnNamesNames of Attribute columns to select.

Implemented in pool::RootCollection::RootCollectionQuery, pool::RootCollection::RNTCollectionQuery, and pool::ImplicitCollectionIterator.

◆ execute()

virtual pool::ICollectionCursor& pool::ICollectionQuery::execute ( )
pure virtual

Processes the query and returns a cursor over the query result.

Implemented in pool::RootCollection::RootCollectionQuery, pool::RootCollection::RNTCollectionQuery, and pool::ImplicitCollectionIterator.

◆ selectAll()

virtual void pool::ICollectionQuery::selectAll ( )
pure virtual

Adds all Token and Attribute columns to the query select list.

Implemented in pool::ImplicitCollectionIterator, pool::RootCollection::RootCollectionQuery, and pool::RootCollection::RNTCollectionQuery.

◆ selectAllAttributes()

virtual void pool::ICollectionQuery::selectAllAttributes ( )
pure virtual

Adds all Attribute columns to the query select list.

Implemented in pool::ImplicitCollectionIterator, pool::RootCollection::RootCollectionQuery, and pool::RootCollection::RNTCollectionQuery.

◆ selectAllTokens()

virtual void pool::ICollectionQuery::selectAllTokens ( )
pure virtual

◆ setCondition()

virtual void pool::ICollectionQuery::setCondition ( const std::string &  whereClause,
coral::AttributeList *  attributeBindData = 0,
TokenList tokenBindData = 0 
)
pure virtual

Sets the predicates of the query.

The predicates may involve conditions on Attributes, Tokens or individual columns of a Token in a data or links table. In the case of Token column conditions the name of the column should be provided by the user in form "<Token name>.<column name>" where "<column name>" is the actual name of the column in the associated data or links table. If bind variables are used they should be preceded by the symbol ":" in the where clause and the bind data should be provided as Attribute or Token lists that use the bind variables as their names. For Token column conditions the input Attribute list should be used for this purpose, using "<column name>" as the Attribute name. If desired, the where clause can be constructed in fragments by repeated calls to ‘setCondition’. All necessary table names, primary key matching conditions and links table ID to data table ID matching conditions are added to the final query string internally before the query is executed.

Parameters
whereClauseThe predicates of the query.
attributeBindDataAttribute and Token column condition data to bind if bind variables are used in query.
tokenBindDataToken condition data to bind if bind variables are used in query.

Implemented in pool::RootCollection::RootCollectionQuery, pool::RootCollection::RNTCollectionQuery, and pool::ImplicitCollectionIterator.

◆ setRowCacheSize()

virtual void pool::ICollectionQuery::setRowCacheSize ( int  rowCacheSize)
pure virtual

Sets the cache size used to store the query result.

Parameters
rowCacheSizeNumber of rows stored in cache before cache is flushed.

Implemented in pool::ImplicitCollectionIterator, pool::RootCollection::RootCollectionQuery, and pool::RootCollection::RNTCollectionQuery.

◆ skipEventReference()

virtual void pool::ICollectionQuery::skipEventReference ( bool  = true)
inlinevirtual

Tell the query to not include the primary event reference in the result by default (it can still beselected manually) Only relevant for explicit collections with attributes.

Parameters
skipif true (the default) then skip the primary event reference

Reimplemented in pool::RootCollection::RootCollectionQuery, and pool::RootCollection::RNTCollectionQuery.

Definition at line 98 of file ICollectionQuery.h.

98 {}

◆ whereClause()

virtual const std::string& pool::ICollectionQuery::whereClause ( ) const
pure virtual

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