restxq and DB access
Hello, I'm trying to use restxq to generate web report from a DB and I just don't understand where to put the xqueries in the xqm files. Is there any example for this? In my configuration, I have this URL: http://httpserverIP:8080/BaseX72/rest/ showing: <rest:databases resources="2"> <rest:database resources="1" size="3827564582">logs</rest:database> <rest:database resources="1" size="102453817">streams</rest:database> </rest:databases> And http://httpserverIP:8080/BaseX72/restxq/ showing the page: Welcome to the RESTXQ Service bla... bla... But I can't find the way to have an xqm page that queries the above DBs (logs or stream). What shall I do to access data from the xqm files? It may be so obvious that I can't see it. ;-) Thanks, Cheers, Gilles.
Dear Gilles,
I’m trying to use restxq to generate web report from a DB and I just don’t understand where to put the xqueries in the xqm files.
you can put your queries in any *.xqm file located in the http root directory.
http://httpserverIP:8080/BaseX72/restxq/ showing the page: Welcome to the RESTXQ Service
As you have probably seen, this page also contains some XQuery functions, which you can modify and extend.
But I can’t find the way to have an xqm page that queries the above DBs (logs or stream).
Just use db:open(...) inside such a function (in other words, write usual XQuery code, and paste it into the RESTXQ functions). Hope this helps, Christian
participants (2)
-
Christian Grün -
Gilles CARRY