[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/use_pos into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Validation queue job use_pos-2011-12-12T19-56-27.566Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/use_pos-2011-12-12T19-56-27.566Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/use_pos into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/use_pos into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve, 2 Pending. -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Validation queue job use_pos-2011-12-12T19-13-35.075Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/use_pos-2011-12-12T19-13-35.075Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/use_pos into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/use_pos into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/use_pos into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 removed obsolete code guarded by the USE_POS macro -- https://code.launchpad.net/~zorba-coders/zorba/use_pos/+merge/85368 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2011-12-01 16:19:52 + +++ ChangeLog 2011-12-12 17:30:21 + @@ -1,5 +1,8 @@ Zorba - The XQuery Processor +version 2.2 + * Added index management function to the C++ api's StaticCollectionManager. + version 2.1 New Features: === modified file 'include/zorba/static_collection_manager.h' --- include/zorba/static_collection_manager.h 2011-09-12 22:42:28 + +++ include/zorba/static_collection_manager.h 2011-12-12 17:30:21 + @@ -23,14 +23,14 @@ namespace zorba { /** \brief Using the StaticCollectionManager one can retrieve information - * about statically declared collections as well as manage them. + * 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 that are declared in (1) all the + * 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. + * Moreover, this class allows to create or delete such collections and indexes. * */ class ZORBA_DLL_PUBLIC StaticCollectionManager : public CollectionManager @@ -56,6 +56,69 @@ virtual bool isDeclaredCollection(const Item& aQName) const = 0; +/** + * Create the index with the given name. + * + * @param aName The name of the index to create. + * + * @throw zerr:ZDDY0021 if a index with the given name is not declared. + * + * @throw zerr:ZDDY0022 if a index with the given name already exists. + */ +virtual void +createIndex(const Item& aQName) = 0; + +/** + * Create the index with the given name. + * + * @param aName The name of the index to create. + * + * @throw zerr:ZDDY0021 if a index with the given name is not declared. + * + * @throw zerr:ZDDY0009 if a index with the given name does not exist + */ +virtual void +deleteIndex(const Item& aQName) = 0; + +/** + * This function returns a sequence of names of the indexes + * that are available. + * + * @return The list of names of the available indexes. + */ +virtual ItemSequence_t +availableIndexes() const = 0; + +/** + * This function returns true if a index with the given name is available. + * + * @param aName The name of the index that is being checked. + * + * @return true if the index is available and false otherwise. + */ +virtual bool +isAvailableIndex(const Item& aQName) const = 0; + +/** + * List all the indexes that are declared in the XQuery or the + * StaticContext that was used to retrieve this StaticCollectionManager. + * + * @return a sequence of QNames of all said indexes + */ +virtual ItemSequence_t +declaredIndexes() 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. + * + * @return true if a collection with the given name is declared, + * false otherwise. + */ +virtual bool +isDeclaredIndex(const Item& aQName) const = 0; + virtual ~StaticCollectionManager() {} }; /* class StaticCollectionManager */ === modified file 'src/api/staticcollectionmanagerimpl.cpp' --- src/api/staticcollectionmanagerimpl.cpp 2011-09-16 13:26:06 + +++ src/api/staticcollectionmanagerimpl.cpp 2011-12-12 17:30:21 + @@ -68,6 +68,7 @@ theFactory(aFactory), theColDDLNamespace("http://www.zorba-xquery.com/modules/store/static/collections/ddl";), theColDMLNamespace("http://www.zorba-xquery.com/modules/store/static/collections/dml";), + theIdxDDLNamespace("http://www.zorba-xquery.com/modules/store/static/indexes/ddl";), theDiagnosticHandler(aDiagnosticHandler) { // the context passed as parameter is not used anywhere in here. @@ -104,6 +105,7 @@ Zorba_CompilerHints_t lHints; std::ostringstream lProlog; lProlog << "import module namespace d = '" << theColDDLNamespace << "';"; + lProlog << "import module namespace iddl = '" << theIdxDDLNamespace << "';"; aCtx->loadProlog(lProlog.str(), lHints); } @@ -245,6 +247,165 @@ } +/***