Changes

Jump to navigation Jump to search
518 bytes added ,  12:24, 1 March 2016
no edit summary
This [[Module Library|XQuery Module]] contains functions to access BaseX server instances from XQuery. With this module, you can execute database commands and evaluate XQuery expressions.
Please note that the client module should always be used to address independent BaseX server instances. You can create deadlocks if you evaluate a query with a server instance, and if you are addressing the same server instance in your query. See the following example: <pre class="brush:xquery">(: Retrieve documents from database :)let $client-id := client:connect('localhost', 1984, 'admin', 'admin')let $docs := client:query($client-id, 'db:open("conflict")')(: Create database with same name :)return db:create('conflict', $docs, $docs ! db:path(.)) </pre> The read-only query cannot be processed, because the <code>conflict</code> database is currently write-locked by the main query. See [Transaction Management] for more background information.
=Conventions=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu