Access variable database without locking all databases
29 Mar
2019
29 Mar
'19
8:58 p.m.
Hi, I'm using BaseX as a database for a web application with RESTXQ API endpoints. Each endpoint has a database name specified as a path param, for example: declare %rest:GET %rest:path('data/{$database}/read') function readData($database as xs:string) { let $doc := fn:doc($database || '/data.xml') return $doc }; All of the queries inside the function are only run against a single database, but as described in the transaction management <http://docs.basex.org/wiki/Transaction_Management#Limitations> documentation, using fn:doc with a variable will lock all the databases. Is there any way around this? Any suggestions would be much appreciated. Thanks!
2568
Age (days ago)
2568
Last active (days ago)
0 comments
1 participants
participants (1)
-
Leah Chatkeonopadol