[OPEN-ILS-DEV] Qstore and query schema: new infrastructure

Scott McKellar mck9 at swbell.net
Thu Jul 15 11:32:07 EDT 2010


The attached tarball includes documentation of some new infrastructure to
support user-defined queries of the Evergreen database.  The contemplated 
uses include:

-- Ad hoc investigations
-- reports and other periodic extracts
-- identifying rows for automated mass updates

The queries will be stored, in an abstract form, in a collection of
database tables, i.e. the query schema.  A new service, open-ils.qstore,
will load queries on request, construct the corresponding SQL, execute
the query, and return the results to the client.

This infrastructure supports a richer subset of SQL than cstore's
json_query method.  In particular it supports arbitrary expressions
pretty much anywhere an expression can make sense, such as an item in
the SELECT list, or a parameter of a function call.

A query may be parameterized with bind variables whose values are
assigned at run time.

The query schema and the qstore server are reasonably complete, and ready
for you to play with if you're interested.  No doubt there will be
further refinements and corrections in the light of experience. 

In the fullness of time we expect to have a UI and a qstore client or two,
but they don't exist yet.  Meanwhile you can manage the query schema with
psql, albeit tediously.  With the right entries in opensrf.xml you can
call the qstore methods with srfsh.  There is also a command-line utility,
test_qstore, which exercises most of the qstore logic: it can construct
the SQL for a specified query and optionally execute it.

Scott McKellar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qstore_docs.tar.gz
Type: application/gzip
Size: 68795 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100715/1189e85d/attachment-0001.bin 


More information about the Open-ils-dev mailing list