Detect Basex Query Type

Friday, 17 January 2014 · 2 messages
A
Alireza17 Jan 2014 16:09 #
Hi, We would like to detect if a basex query is read query or update query and then only allow read user queries to be executed. We receive a user query from an incoming request like this: http://host:port?query= "xquery" The goal is to check if "xquery" in the url above is a read or update query. We thought about checking the content of the query string and look for update operation keywords such |||||||||||| as insert, delete, etc. Is there any other better way to do that? Best, Alireza
CG
Christian Grün17 Jan 2014 16:53 #
Hi Alireza,
Quoted text · Alireza · 3 lines
> We would like to detect if a basex query is read query or update query and > then only allow read user queries to be executed. We receive a user > query from an incoming request like this: http://host:port?query= "xquery"
There is currently no way to to this. What we are usually doing is to create a new user that has read-only access on certain databases (or no db at all). Feel free to have a look at our user management [1], and just ask if you need more details. Christian [1] http://docs.basex.org/wiki/User_Management
Quoted text · Alireza · 17 lines
> The goal is to check if "xquery" in the url above is a read or update query. > > We thought about checking the content of the query string and look for > update > operation keywords such as insert, delete, etc. Is there any other better > way to do that? > > Best, > Alireza > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery