> On 13 Feb 2019, at 16:38, Christian Grün <christian.gr...@gmail.com> wrote:
> Manual locks could either be assigned globally or > within a query: > > (# db:manuallock #) { > (# basex:write-lock BEP-Staging #) { > (# basex:read-lock BEP #) { > let $d:=db:open('BEP') > return db:create('BEP-staging',$d,$d!base-uri(.)) > } > } > } > > I wouldn’t call this syntax particularly appealing Yes - that’s certainly a monster. :) Would this work where the database names are only known at run time? So if I POST data to http://www.example.com/add/myDatabaseName Do we need something like: xquery:databaseRestrict($databaseName, addStuffFunction($data) ) which will raise an error if any database other than $databaseName is referenced by addStuffFunction. Just noting my thoughts - need to consider it a little more. Regards, James