Hi Ankit,
> I was exploring BaseX for my XML based product. I was wondering whether
> there is Prepared Statement Like facility incorporated in BaseX,
>
> With the same QueryProcessor instance, is it possible to execute it multiple
> times with different binding values for given variable.
We are working on caching precompiled XQuery expressions; for now, you
need to create new QueryProcessor instances. In practice, however,
this rarely leads to problems, because QueryProcessor instances are
very light-weight. The following BaseX call creates 100,000 instances
of the QueryProcessor, it takes around 2 seconds:
> basex -V -r100000 "1"
Parsing: 0.01 ms (avg)
Compiling: 0.0 ms (avg)
Evaluating: 0.0 ms (avg)
Printing: 0.01 ms (avg)
Total Time: 0.02 ms (avg)
Obviously, the query "1" is very simple, but usually, parsing only
gets relevant if the queries to be parsed take many KBs or even MBs
(such as can be the case in RESTXQ applications).
Best,
Christian