Hi,
this feature isnt enabled for the run command yet.
We put that on our todo-list and get it done as fast as
possible.
You could also have a look into our language bindings (for
other ways then REST) [1], here you can
also bind variables to queries.
If your query is not to large, i guess the network traffic
for sending the query for each request should not be too
much.
Kind regards,
Andreas
[1]
http://www.inf.uni-konstanz.de/dbis/basex/bindings
Am 31.12.10 16:18, schrieb software developer:
Hi,
The parameters are not bound to variables when a query
is invoked via the run parameter.
For example, I store my query in myquery.xq on the
server side; if the query contains
current-time()
invocation of the URL
http://localhost:8984/basex/jax-rx?wrap=no&run=myquery.xq&var=$x=21%01$y=2
<http://localhost:8984/basex/jax-rx?wrap=no&run=myquery.xq&var=$x=21%01$y=2>
results in display of current date-time
but if the query contains
declare variable $x as xs:integer external;
declare variable $y as xs:integer external;
$x*$y
I get the error
Stopped at line 1, column 34 in myquery.xq:
[XQDY0002] No value defined for "$x as xs:integer".
The parameters are correctly bound to variables when a
query is invoked via the query parameter named query as
you described, but that is not what I am after. Is this
a bug? Is there a workaround?