Hi Luke,

> However, when I execute an XQuery I would like it to run on a particular 
> database. Is there anyway to achieve this without passing the database as an 
> argument to the query?

If you address a database in your URL, it will be bound to the context
of your query, which can be obtained via a simple dot (.). For
example, run the following query to get the number of documents in
your 'Test' database:

  http://localhost:8984/rest/Test?query=count(.)

I have added another example in our documentation [1]. The given query
can also be written to a file and evaluated with 'run'.

Hope this helps,
Christian

[1] http://docs.basex.org/wiki/REST#GET_Method

Reply via email to