|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.server.Query
public abstract class Query
This class defines methods for executing queries.
It is implemented by ClientQuery
.
Results are either returned as string or serialized to the output
stream that has been specified via the constructor or via
Session.setOutputStream(OutputStream)
.
Field Summary | |
---|---|
protected TokenList |
cache
Cached results. |
protected java.io.OutputStream |
out
Client output stream. |
Constructor Summary | |
---|---|
Query()
|
Method Summary | |
---|---|
void |
bind(java.lang.String n,
java.lang.Object v)
Binds a value to an external variable. |
abstract void |
bind(java.lang.String n,
java.lang.Object v,
java.lang.String t)
Binds a value with an optional type to an external variable. |
protected abstract void |
cache()
Caches the query result. |
protected void |
cache(java.io.InputStream is)
Caches the incoming input. |
abstract void |
close()
Closes the query. |
void |
context(java.lang.Object v)
Binds a value to the context item. |
abstract void |
context(java.lang.Object v,
java.lang.String t)
Binds a value with an optional type to an external variable. |
abstract java.lang.String |
execute()
Returns the complete result of the query. |
abstract java.lang.String |
info()
Returns query info. |
boolean |
more()
Returns true if more items are available. |
java.lang.String |
next()
Returns the next item of the query. |
abstract java.lang.String |
options()
Returns the serialization options. |
Type |
type()
Returns the current XQuery type (must be called after next() . |
abstract boolean |
updating()
Returns true if the query may perform updates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.OutputStream out
protected TokenList cache
Constructor Detail |
---|
public Query()
Method Detail |
---|
public final void bind(java.lang.String n, java.lang.Object v) throws java.io.IOException
n
- name of variablev
- value to be bound
java.io.IOException
- I/O exceptionpublic abstract void bind(java.lang.String n, java.lang.Object v, java.lang.String t) throws java.io.IOException
n
- name of variablev
- value to be boundt
- data type (may be null
)
java.io.IOException
- I/O exceptionpublic final void context(java.lang.Object v) throws java.io.IOException
v
- value to be bound
java.io.IOException
- I/O exceptionpublic abstract void context(java.lang.Object v, java.lang.String t) throws java.io.IOException
v
- value to be boundt
- data type (may be null
)
java.io.IOException
- I/O exceptionpublic boolean more() throws java.io.IOException
true
if more items are available.
java.io.IOException
- I/O exceptionprotected abstract void cache() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic final java.lang.String next() throws java.io.IOException
null
.
java.io.IOException
- I/O exceptionpublic final Type type()
next()
.
protected void cache(java.io.InputStream is) throws java.io.IOException
is
- input stream
java.io.IOException
- I/O exceptionpublic abstract java.lang.String execute() throws java.io.IOException
null
.
java.io.IOException
- I/O exceptionpublic abstract java.lang.String options() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic abstract boolean updating() throws java.io.IOException
true
if the query may perform updates.
java.io.IOException
- I/O exceptionpublic abstract java.lang.String info() throws java.io.IOException
java.io.IOException
- I/O exceptionpublic abstract void close() throws java.io.IOException
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |