|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface enables the DataDirect XQuery plan explain feature.
Here is an example to generate an execution plan.
...
XQExpression exp = conn.createExpression();
ExtPlanExplain explain = (ExtPlanExplain)exp;
XQResultSequence seq = explain.explain("for $item in fn:doc('items.xml')/items/item");
seq.writeSequence(new FileOutputStream("queryplan.xml"), null);
seq.close();
exp.close();
...
| Field Summary | |
static String |
PLAN_EXPLAIN_AS_XHTML
Generate a plan explain in XHTML format. |
static String |
PLAN_EXPLAIN_AS_XML
Generate a plan explain in XML format. |
| Method Summary | |
XQResultSequence |
explain(InputStream query)
Request a plan explain for the specified query. |
XQResultSequence |
explain(Reader query)
Request a plan explain for the specified query. |
XQResultSequence |
explain(String query)
Request a plan explain for the specified query. |
void |
setPlanFormat(String format)
Set the returned plan format. |
void |
setResourceLocation(String resourceLocation)
Set the folder where the generated plan will reference required resources, like images, JavaScript, HTML stylesheets. |
| Field Detail |
public static final String PLAN_EXPLAIN_AS_XML
public static final String PLAN_EXPLAIN_AS_XHTML
| Method Detail |
public XQResultSequence explain(String query)
throws XQException
XQResultSequence contains the XML document
representing the execution plan. It can be processed as any other
result with the XQJ api.
query - the query for which the execution plan is requested
XQResultSequence containing an XML document
representing the execution plan.
XQException - the execution plan cannot be generated
public XQResultSequence explain(Reader query)
throws XQException
explain(String), but the query is
specified as a
query - the query for which the execution plan is requested
XQResultSequence containing an XML document
representing the execution plan.
XQException - the execution plan cannot be generated
public XQResultSequence explain(InputStream query)
throws XQException
explain(String), but the query is
specified as a java.io.InputStream.
query - the query for which the execution plan is requested
XQResultSequence containing an XML document
representing the execution plan.
XQException - the execution plan cannot be generated
public void setResourceLocation(String resourceLocation)
throws XQException
http://www.xquery.com/planExplain
resourceLocation - a directory reachable by a web browser containing resource files used by the generated plan description
XQException - a null value has been specified
public void setPlanFormat(String format)
throws XQException
PLAN_EXPLAIN_AS_XML or
PLAN_EXPLAIN_AS_XHTML. The default is PLAN_EXPLAIN_AS_XHTML.
format - the format in which the exeution plan should be generated. Must be
PLAN_EXPLAIN_AS_XML or PLAN_EXPLAIN_AS_XHTML
XQException - a null value has been specified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||