Running 'Explain Query' from Tamino4J

Hi,
I am building an application where I would like to run the Tamino Explain Query feature that is available within the tool. I noticed that can be action for Tamino X-Query using TQueryBuilder, but I’m using W3C’s XQuery and wondered if it was still possible? :roll:

My overall intention is to check the query is valid before trying to use it. This way I would be able to provide more information to the user! :wink:

Thanks

Ryan

Hi,

explain in XQuery works a little bit different, i.e. with a pragma, e.g.
{?explain?} input()/entry[@name=“Hoch Franz”]

However, I wonder whether it’s really a benefit in your case - do mean you want to check for syntactical correctness? This is done by the XQuery processor before it generates the explain output…

Regards

Harald

Harald,
I tried putting {?explain?} at the beginning of the query and running it as normal, but no joy! If I run it in the Tamino Utility it brings back an empty result set rather than an explain. Tamino must be focusing on a different part of the response data for the explain and for the data! Any idea how to get hold of this? Have you managed to do an explain using the java api?

My idea for using this is I’m going to store xqueries that we use a lot and I want to run them through an explain before saving so that I can guarantee the ones stored work.

Thanks for your help

Ryan

Hi,
I’m still struggling to get this to work :(. Does anyone know how to do this using the Tamino Java API? Placing the explain doesn’t do anything, Tamino seems to ignore it or cause and error.

Thanks Ryan

The Tamino API for Java does not give access to the result of explain, sorry

Only if you run such a query in the Tamino Interactive Interface or via HTTP, you will see the result

Regards

Harald