Zorba is an open source query processor written in C++,[1] implementing
Zorba is distributed under Apache License, Version 2.0.The project is mainly supported by the FLWOR Foundation, Oracle, and 28msec.
Zorba provides the implementation of the following W3C specifications:
Zorba also provides implementations of:
Scripting Extension is an open specification that provides semantic for side-effects in XQuery or JSONiq programs.It also provides a user-friendly syntax for imperative programming within such programs.The following code snippet is an example of the Scripting syntax. It computes a sequence containing all the Fibonacci numbers that are less than 100.
while ($c lt 100) $fibseq
The following is an example of CRUD operations using Scripting, XQuery, and XQuery Update.
(: Delete :)delete node $stores/store[state != "NY"];
Data Definition Facility provides a semantic for persistent artifacts such as collections and indexes in XQuery or JSONiq programs.For instance, the following code snippets declares a collection named entries and an index on that collection named entry.
import module namespace db = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
declare namespace an = "http://www.zorba-xquery.com/annotations";
(: Declares a collection named entries :)declare collection g:entries as element(entry);(: Declares a variable that points to the g:entries collection :)declare variable $g:entries := xs:QName('g:entries');
(: Declares an index named entry on top of the entries collection :)declare %an:automatic %value-equality index g:entry on nodes db:collection(xs:QName('g:entries')) by xs:string(@id) as xs:string;
Zorba provides a pluggable store so it can be used on different kind of environments: disk, database, browser.By default, Zorba is built with a main memory store.28msec implements a store on top of MongoDB.The XQuery in the Browser project has built a browser plugin for Zorba and leverages the DOM as its store.
Zorba is usable through different host languages: C++, C, XQJ / Java, PHP, Python, C#, Ruby, and even XQuery/JSONiq.
Zorba is also available as a command-line tool.
XQDT is an XQuery plugin for the Eclipse (IDE). It fully supports Zorba API and syntax.
Zorba provides more than 70 XQuery modules for building applications. Some of these modules are: