|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The XDBCStatement encapsulates a single XQuery query, This includes statically declared namespaces as well as inline function definitions.
The result of executing an XQuery statement is a sequence of XQuery values drawn from the database. Elements that are XML nodes may be processed by a standard SAX or DOM implementation.
| Method Summary | |
void |
cancel()
Cancel the execution of this XQuery statement. |
void |
clearVariables()
Clears the value of all external variables for this statement. |
void |
clearWarnings()
Clear all the warnings reported on this XQuery statement. |
void |
close()
Release this XQuery statement's database and XDBC resources immediately instead of waiting for this to be done by the Java runtime. |
XDBCResultSequence |
executeQuery(String xquery)
Evaluate an XQuery query and return a sequence of results. |
int |
getBufferSize()
Returns the current buffer size, which is the number of bytes that that should be fetched from the database in a single read of results. |
XDBCConnection |
getConnection()
Retrieves the connection object that generated this statement. |
int |
getQueryTimeout()
Retrieve the number of seconds the driver will wait for an XQuery statement object to execute. |
int |
getResultSequenceConcurrency()
Gets the concurrency setting for the XDBCResultSequence objects generated by evaluating this statement. |
XDBCWarning |
getWarnings()
Retrieves the warnings reported by calls on this XQuery statement. |
XDBCResultSequence |
invoke(String module,
String database,
XDBCXName[] argNames)
Invokes an XQuery module and return a sequence of results. |
boolean |
isClosed()
Tests if this XDBCStatement is closed. |
void |
setAnyURI(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setBase64Binary(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setBoolean(XDBCXName name,
boolean value)
Binds the variable's value to the argument value. |
void |
setBufferSize(int size)
Gives the XDBC driver a hint about the number of bytes that should be fetched from the database in a single read of results. |
void |
setDate(XDBCXName name,
Date value)
Binds the variable's value to the argument value. |
void |
setDate(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setDateTime(XDBCXName name,
Date value)
Binds the variable's value to the argument value. |
void |
setDateTime(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setDayTimeDuration(XDBCXName name,
XDBCDuration value)
Binds the variable's value to the argument value. |
void |
setDecimal(XDBCXName name,
BigDecimal value)
Binds the variable's value to the argument value. |
void |
setDecimal(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setDouble(XDBCXName name,
double value)
Binds the variable's value to the argument value. |
void |
setDuration(XDBCXName name,
XDBCDuration value)
Binds the variable's value to the argument value. |
void |
setFloat(XDBCXName name,
float value)
Binds the variable's value to the argument value. |
void |
setGDay(XDBCXName name,
GregorianCalendar value)
Binds the variable's value to the argument value. |
void |
setGMonth(XDBCXName name,
GregorianCalendar value)
Binds the variable's value to the argument value. |
void |
setGMonthDay(XDBCXName name,
GregorianCalendar value)
Binds the variable's value to the argument value. |
void |
setGYear(XDBCXName name,
GregorianCalendar value)
Binds the variable's value to the argument value. |
void |
setGYearMonth(XDBCXName name,
GregorianCalendar value)
Binds the variable's value to the argument value. |
void |
setHexBinary(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setInteger(XDBCXName name,
BigInteger value)
Binds the variable's value to the argument value. |
void |
setInteger(XDBCXName name,
int value)
Binds the variable's value to the argument value. |
void |
setInteger(XDBCXName name,
long value)
Binds the variable's value to the argument value. |
void |
setNull(XDBCXName name)
Removes any value from the variable, effectively clearing the value of the variable. |
void |
setQName(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setQName(XDBCXName name,
XDBCXName value)
Binds the variable's value to the argument value. |
void |
setQueryTimeout(int seconds)
Sets the maximum number of seconds the driver will wait for an XDBCStatement to execute. |
void |
setString(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setTime(XDBCXName name,
Date value)
Binds the variable's value to the argument value. |
void |
setTime(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setUntypedAtomic(XDBCXName name,
String value)
Binds the variable's value to the argument value. |
void |
setYearMonthDuration(XDBCXName name,
XDBCDuration value)
Binds the variable's value to the argument value. |
| Method Detail |
public XDBCResultSequence executeQuery(String xquery)
throws XDBCException
xquery - a String XQuery expression to be evaluated.
XDBCException - if a database access error occurs.
public XDBCResultSequence invoke(String module,
String database,
XDBCXName[] argNames)
throws XDBCException
module - the path to the module to be evaluated. This is
resolved against the root of the XDBC server.database - the name or id of a database to use as the
context for executing the module. Default is null, which
means use the XDBC server's default database.argNames - an ordered array of XDBCXName objects representing
the names of arguments to the module. Null means no arguments.
XDBCException - if a database access error occurs.
public void cancel()
throws XDBCException
XDBCException - if a database access error occurs.
public void close()
throws XDBCException
Calling this method frees up resources immediately and its use is strongly encouraged.
XDBCException - if a database access error occurs.
public XDBCConnection getConnection()
throws XDBCException
XDBCException - if a database access error occurs.
public int getResultSequenceConcurrency()
throws XDBCException
XDBCException - if a database access error occurs.XDBC_CONCUR_READ_ONLY,
XDBC_CONCUR_UPDATABLE
public XDBCWarning getWarnings()
throws XDBCException
XDBCException - if a database access error occurs.
public void clearWarnings()
throws XDBCException
XDBCException - if a database access error occurs.
public boolean isClosed()
throws XDBCException
XDBCException - if a database access error occurspublic void setBufferSize(int size)
This setting applies to all subsequence XDBCResultSequences created from this statement. However, unlike similar methods on the XDBCResultSequence object, these must be set before the statement is executed to have any effect.
Since this is a hint only, the XDBC driver may choose to ignore this value.
size - the integer number of bytes to fetch at one time; must be
greater than 0.getBufferSize()public int getBufferSize()
setBufferSize(int)
public void setQueryTimeout(int seconds)
throws XDBCException
After this number of seconds, an XDBCException is thrown.
seconds - integer number of seconds to wait; a value of zero
means unlimited; must be zero or positive.
XDBCException - if a database access error occurs
public int getQueryTimeout()
throws XDBCException
XDBCException - if a database access error occurs.
public void clearVariables()
throws XDBCException
XDBCException
public void setNull(XDBCXName name)
throws XDBCException
name - the XDBCXName of the variable to set.
XDBCException
public void setAnyURI(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setBase64Binary(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setBoolean(XDBCXName name,
boolean value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java boolean value to set.
XDBCException
public void setDateTime(XDBCXName name,
Date value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java Date value to set.
XDBCException
public void setDateTime(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setDecimal(XDBCXName name,
BigDecimal value)
throws XDBCException
Note that this conversion may involve some loss of precision due to differences in Java and XQuery types.
name - the XDBCXName of the variable to set.value - the Java BigDecimal value to set.
XDBCException
public void setDecimal(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setInteger(XDBCXName name,
BigInteger value)
throws XDBCException
Note that this conversion may involve some loss of precision due to differences in Java and XQuery types.
name - the XDBCXName of the variable to set.value - the Java BigInteger value to set.
XDBCException
public void setInteger(XDBCXName name,
int value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java int value to set.
XDBCException
public void setInteger(XDBCXName name,
long value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java long value to set.
XDBCException
public void setDouble(XDBCXName name,
double value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java double value to set.
XDBCException
public void setDuration(XDBCXName name,
XDBCDuration value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the XDBCDuration value to set.
XDBCException
public void setDayTimeDuration(XDBCXName name,
XDBCDuration value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the XDBCDuration value to set.
XDBCException
public void setYearMonthDuration(XDBCXName name,
XDBCDuration value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the XDBCDuration value to set.
XDBCException
public void setFloat(XDBCXName name,
float value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java float value to set.
XDBCException
public void setGDay(XDBCXName name,
GregorianCalendar value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java GregorianCalendar value to set.
XDBCException
public void setGMonth(XDBCXName name,
GregorianCalendar value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java GregorianCalendar value to set.
XDBCException
public void setGMonthDay(XDBCXName name,
GregorianCalendar value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java GregorianCalendar value to set.
XDBCException
public void setGYear(XDBCXName name,
GregorianCalendar value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java GregorianCalendar value to set.
XDBCException
public void setGYearMonth(XDBCXName name,
GregorianCalendar value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java GregorianCalendar value to set.
XDBCException
public void setHexBinary(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setQName(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setQName(XDBCXName name,
XDBCXName value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the XDBCXName value to set.
XDBCException
public void setString(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setDate(XDBCXName name,
Date value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java Date value to set.
XDBCException
public void setDate(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setTime(XDBCXName name,
Date value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java Date value to set.
XDBCException
public void setTime(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
public void setUntypedAtomic(XDBCXName name,
String value)
throws XDBCException
name - the XDBCXName of the variable to set.value - the Java String value to set.
XDBCException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||