zorba::StaticCollectionManager#include <zorba/static_collection_manager.h> Inherited from: zorba::CollectionManager Using the StaticCollectionManager one can retrieve information about statically declared collections and indexes as well as manage them. The StaticCollectionManager can be retrieved from (1) a compiled XQuery or (2) a StaticContext object. In both cases, this class provides access to information for the collections and indexes that are declared in (1) all the modules (transitively) imported by the main query or (2) the module that resulted in the compilation of the StaticContext, respectively. Moreover, this class allows to create or delete such collections and indexes.Public Functions
Public FunctionsavailableCollectionsItemSequence_t availableCollections() const =0 This function returns a sequence of names of the collections that are available. If this is an instance of the StaticCollectionManager class (i.e. returned by any of the getStaticCollectionManager methods), the collections returned by this function are also statically declared. ReturnsThe list of names of the available collections.availableIndexesItemSequence_t availableIndexes() const =0 This function returns a sequence of names of the indexes that are available.
ReturnsThe list of names of the available indexes.createCollectionvoid createCollection(const Item &aName)=0 This function creates the collection with the given name.
Parameters
Parameters
createCollectionvoid createCollection(const Item &aName, const ItemSequence_t &aContents)=0 This function creates the collection with the given name. Moreover, it adds copies of the sequence aContents to the new collection. Parameters
Parameters
createIndexvoid createIndex(const Item &aQName)=0 Create the index with the given name.
Parameters
Parameters
declaredCollectionsItemSequence_t declaredCollections() const =0 List all the collections that are declared in the XQuery or the StaticContext that was used to retrieve this StaticCollectionManager.
Returnsa sequence of QNames of all said collectionsdeclaredIndexesItemSequence_t declaredIndexes() const =0 List all the indexes that are declared in the XQuery or the StaticContext that was used to retrieve this StaticCollectionManager.
Returnsa sequence of QNames of all said indexesdeleteCollectionvoid deleteCollection(const Item &aName)=0 This function removes the collection with the given name.
Parameters
Parameters
deleteIndexvoid deleteIndex(const Item &aQName)=0 Create the index with the given name.
Parameters
Parameters
getCollectionCollection_t getCollection(const Item &aName) const =0 Returns a instance of the Collection class which can be used to modify and retrieve the contents of the collection identified by the given name.
Parameters
Parameters
isAvailableCollectionbool isAvailableCollection(const Item &aName) const =0 This function returns true if a collection with the given name is available. If this is an instance of the StaticCollectionManager class (i.e. returned by any of the getStaticCollectionManager() methods), the collection also needs to be statically declared. Parameters
Returnstrue if the collection is available and false otherwise.isAvailableIndexbool isAvailableIndex(const Item &aQName) const =0 This function returns true if a index with the given name is available.
Parameters
Returnstrue if the index is available and false otherwise.isDeclaredCollectionbool isDeclaredCollection(const Item &aQName) const =0 Checks if a collection with a given QName is declared in the XQuery or the StaticContext that was used to retrieve this StaticCollectionManager.
Returnstrue if a collection with the given name is declared, false otherwise.isDeclaredIndexbool isDeclaredIndex(const Item &aQName) const =0 Checks if a index with a given QName is declared in the XQuery or the StaticContext that was used to retrieve this StaticCollectionManager.
Returnstrue if a collection with the given name is declared, false otherwise.registerDiagnosticHandlervoid registerDiagnosticHandler(DiagnosticHandler *aDiagnosticHandler)=0 Register a DiagnosticHandler to which errors occuring during the management of collections are reported. If no DiagnosticHandler has been set using this function or the corresponding function of the XmlDataManager then subclasses of the ZorbaException class are thrown to report errors. Parameters
~StaticCollectionManager ~StaticCollectionManager()
|