BaseXdb/basex — pull request #650 by JensErat (2013-03-02 23:26:53+00:00)
Title: [ADD] Core, Locking: Add lock:(read|write) option

Didn't use `db:` namespace as this has semantics of permanent database options to override, which would either break or enable persistent locks in BaseX config.

Putting following code into the prequel of some XQuery

declare option lock:read "foo";
declare option lock:read "bar";
declare option lock:write "foobar,42";

will put read locks on *foo* and *bar* and write locks on *foobar* and *42*. Arbitrary strings are allowed which also can refer to databases. This should be added to documentation.

BaseX database locking does not yet support read and write locks at the same time, this should be finished within the next days, I will add documentation for this option after that code is merged (and thus these options are fully functional). Until then, it is ignored whether read/write locks are requested but checked whether the query is an updating one.