Rest Query's on File

Thursday, 24 April 2014 · 2 messages
M
Marcus24 Apr 2014 18:12 #
Just had the problem that Rest Query's on File/Path in a database not Working anymore (don't know right but i think it is since 7.8). A few Versions before there was the possibility to directly query on a path / file in a database e.g. http://basex:8984/rest/mydata/210/?query=<q>..... throws [BXDB0005] Query must yield database nodes. now i need to define path in query and start on Database
e.g. http://basex:8984/rest/mydata/?query=<q>{ for $i in
db:open('mydata',"210")/record .....
btw.
e.g. http://basex:8984/rest/mydata/210/?query=<q>{ for $i in
db:open('mydata',"210")/record .....
would also throw [BXDB0005] Query must yield database nodes. Is it a bug? Greetings Marcus
CG
Christian Grün24 Apr 2014 21:17 #
Hi Marcus, it should still be possible to query a path/file in a database. I didn't manage to raise the bugs you were reporting. Could you send us a self-contained or complete, but minimized example? Thanks, Christian
Quoted text · Marcus · 36 lines
On Thu, Apr 24, 2014 at 6:12 PM, Marcus <marcus at phpexpert.net> wrote: > Just had the problem that Rest Query's on File/Path in a database not > Working anymore (don't know right but i think it is since 7.8). > > A few Versions before there was the possibility to directly query on a path > / file in a database > > e.g. http://basex:8984/rest/mydata/210/?query=<q>..... > > throws > > [BXDB0005] Query must yield database nodes. > > > now i need to define path in query and start on Database > > e.g. http://basex:8984/rest/mydata/?query=<q>{ for $i in > db:open('mydata',"210")/record ..... > > btw. > > e.g. http://basex:8984/rest/mydata/210/?query=<q>{ for $i in > db:open('mydata',"210")/record ..... > > would also throw > > [BXDB0005] Query must yield database nodes. > > > > Is it a bug? > > > Greetings Marcus > >

⚡Generated with XQuery