|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Progress
org.basex.query.QueryProcessor
public final class QueryProcessor
This abstract class contains various methods which allow querying in the database. A variety of hierarchical parsers (XPath, XQuery, etc..) can be implemented on top of this class.
Field Summary | |
---|---|
QueryContext |
ctx
Expression context. |
Constructor Summary | |
---|---|
QueryProcessor(String qu,
Context cx)
Default constructor. |
|
QueryProcessor(String qu,
Nodes nodes,
Context cx)
Constructor with an initial context set. |
Method Summary | |
---|---|
void |
close()
Closes the processor. |
void |
compile()
Compiles the query. |
String |
det()
Returns short information on this process. |
String |
info(boolean all)
Returns query background information. |
Iter |
iter()
Returns a result iterator. |
void |
module(String ns,
String file)
Adds a module reference. |
void |
parse()
Parses the query. |
void |
plan(Serializer ser)
Returns the query plan in the dot notation. |
double |
prog()
Returns progress information. |
Result |
query()
Evaluates the specified query and returns the result. |
Nodes |
queryNodes()
Evaluates the specified query and returns the result nodes. |
void |
setQuery(String qu)
Sets a new query. |
String |
tit()
Returns short information on this process. |
Methods inherited from class org.basex.core.Progress |
---|
abort, checkStop, detail, progress, progress, stop, title |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final QueryContext ctx
Constructor Detail |
---|
public QueryProcessor(String qu, Context cx)
qu
- query to processcx
- database contextpublic QueryProcessor(String qu, Nodes nodes, Context cx)
qu
- querynodes
- initial context setcx
- database contextMethod Detail |
---|
public void parse() throws QueryException
QueryException
- query exceptionpublic void compile() throws QueryException
QueryException
- query exceptionpublic Iter iter() throws QueryException
QueryException
- query exceptionpublic Result query() throws QueryException
QueryException
- query exceptionpublic Nodes queryNodes() throws QueryException
QueryException
- query exceptionpublic void module(String ns, String file)
ns
- module namespacefile
- file namepublic void setQuery(String qu)
qu
- querypublic void close() throws IOException
IOException
- I/O exceptionpublic String info(boolean all)
all
- show all information
public void plan(Serializer ser) throws Exception
ser
- serializer
Exception
- exceptionpublic String tit()
Progress
tit
in class Progress
public String det()
Progress
det
in class Progress
public double prog()
Progress
prog
in class Progress
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |