This class describes an expression that can be prepared for multiple subsequent executions. More...
Public Member Functions | |
void | bindAtomicValue (QName varName, String value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindBoolean (QName varName, boolean value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindByte (QName varName, byte value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDocument (QName varName, String value, String baseURI, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDocument (QName varName, Reader value, String baseURI, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDocument (QName varName, InputStream value, String baseURI, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDocument (QName varName, XMLStreamReader value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDocument (QName varName, Source value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindDouble (QName varName, double value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindFloat (QName varName, float value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindInt (QName varName, int value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindItem (QName varName, XQItem value) throws XQException |
Binds a value to the given external variable. | |
void | bindLong (QName varName, long value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindNode (QName varName, Node value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindObject (QName varName, Object value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindSequence (QName varName, XQSequence value) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindShort (QName varName, short value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | bindString (QName varName, String value, XQItemType type) throws XQException |
Binds a value to the given external variable or the context item. | |
void | cancel () throws XQException |
Attempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of an ZorbaXQPreparedExpression. | |
void | close () throws XQException |
Closes the expression object and release all resources associated with this prepared expression. | |
XQResultSequence | executeQuery () throws XQException |
Executes the prepared query expression. | |
QName[] | getAllExternalVariables () throws XQException |
Retrieves all the external variables defined in the prolog of the prepared expression. | |
QName[] | getAllUnboundExternalVariables () throws XQException |
Retrieves the names of all unbound external variables. | |
TimeZone | getImplicitTimeZone () throws XQException |
Gets the implicit timezone. | |
XQStaticContext | getStaticContext () throws XQException |
Gets an ZorbaXQStaticContext representing the values for all expression properties. | |
XQSequenceType | getStaticResultType () throws XQException |
Gets the static type information of the result sequence. | |
XQSequenceType | getStaticVariableType (QName varName) throws XQException |
Retrieves the static type of a given external variable. | |
boolean | isClosed () |
Checks if the prepared expression in a closed state. | |
void | setImplicitTimeZone (TimeZone value) throws XQException |
Sets the implicit timezone. | |
ZorbaXQPreparedExpression (XQConnection conn, String string) throws XQException | |
ZorbaXQPreparedExpression (XQConnection conn, Reader reader) throws XQException | |
ZorbaXQPreparedExpression (XQConnection conn, InputStream input) throws XQException | |
ZorbaXQPreparedExpression (XQConnection conn, String string, XQStaticContext sc) throws XQException | |
ZorbaXQPreparedExpression (XQConnection conn, Reader reader, XQStaticContext sc) throws XQException | |
ZorbaXQPreparedExpression (XQConnection conn, InputStream input, XQStaticContext sc) throws XQException |
This class describes an expression that can be prepared for multiple subsequent executions.
A prepared expression can be created from the connection.
The preparation of the expression does the static analysis of the expression using the static context information.
The dynamic context information, such as values for bind variables, can then be set using the setter methods. When setting values for bind variables, these variables should be present as external variables in the prolog of the prepared expression.
The static type information of the query can also be retrieved if the XQuery implementation provides it using the getStaticResultType method.
When the expression is executed using the executeQuery method, if the execution is successful, then an ZorbaXQResultSequence object is returned. The ZorbaXQResultSequence object is tied to the ZorbaXQPreparedExpression from which it was prepared and is closed implicitly if that expression is either closed or if re-executed.
The ZorbaXQPreparedExpression object is dependent on the ZorbaXQConnection object from which it was created and is only valid for the duration of that object. Thus, if the ZorbaXQConnection object is closed then this ZorbaXQPreparedExpression object will be implicitly closed and it can no longer be used.
An XQJ driver is not required to provide finalizer methods for the connection and other objects. Hence it is strongly recommended that users call close method explicitly to free any resources. It is also recommended that they do so under a final block to ensure that the object is closed even when there are exceptions. Not closing this object implicitly or explicitly might result in serious memory leaks.
When the ZorbaXQPreparedExpression is closed any ZorbaXQResultSequence object obtained from it is also implicitly closed.
Example -
Definition at line 84 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 96 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 113 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 131 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 149 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 166 of file ZorbaXQPreparedExpression.java.
|
inline |
Definition at line 184 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the casting from xs:string rules outlined in 17.1.1 Casting from xs:string and xs:untypedAtomic, XQuery 1.0 and XPath 2.0 Functions and Operators. If the cast fails, or if there is a mismatch between the static and dynamic types, an XQException is thrown either by this method or during query evaluation.
varName | - the name of the external variable to bind to |
value | - the lexical string value of the type |
type | - the item type of the bind |
XQException | - if (1) any of the arguments are null, (2) given type is not an atomic type, (3) the conversion of the value to an XDM instance failed, (4) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (5) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (6) the expression is in a closed state |
Definition at line 416 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 824 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 849 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.
The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.
If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
baseURI | - an optional base URI, can be null. It can be used, for example, to resolve relative URIs and to include in error messages. |
type | - the type of the value for the created document node. If null is specified, it behaves as if XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, ZorbaXQItemType.XQBASETYPE_XS_UNTYPED)) were passed in as the type parameter. That is, the type represents the XQuery sequence type document-node(element(*, xs:untyped)) |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 501 of file ZorbaXQPreparedExpression.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQPreparedExpression.bindDocument().
|
inline |
Binds a value to the given external variable or the context item.
If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.
The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.
If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
baseURI | - an optional base URI, can be null. It can be used, for example, to resolve relative URIs and to include in error messages. |
type | - the type of the value for the created document node. If null is specified, it behaves as if XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, ZorbaXQItemType.XQBASETYPE_XS_UNTYPED)) were passed in as the type parameter. That is, the type represents the XQuery sequence type document-node(element(*, xs:untyped)) |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 543 of file ZorbaXQPreparedExpression.java.
References org.zorbaxquery.api.xqj.ZorbaXQPreparedExpression.bindDocument().
|
inline |
Binds a value to the given external variable or the context item.
If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.
The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.
If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
baseURI | - an optional base URI, can be null. It can be used, for example, to resolve relative URIs and to include in error messages. |
type | - the type of the value for the created document node. If null is specified, it behaves as if XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, ZorbaXQItemType.XQBASETYPE_XS_UNTYPED)) were passed in as the type parameter. That is, the type represents the XQuery sequence type document-node(element(*, xs:untyped)) |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 589 of file ZorbaXQPreparedExpression.java.
References org.zorbaxquery.api.xqj.ZorbaXQPreparedExpression.bindDocument().
|
inline |
Binds a value to the given external variable or the context item.
If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.
The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.
If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
type | - the type of the value for the created document node. If null is specified, it behaves as if XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, ZorbaXQItemType.XQBASETYPE_XS_UNTYPED)) were passed in as the type parameter. That is, the type represents the XQuery sequence type document-node(element(*, xs:untyped)) |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 628 of file ZorbaXQPreparedExpression.java.
References org.zorbaxquery.api.xqj.ZorbaXQPreparedExpression.bindDocument().
|
inline |
Binds a value to the given external variable or the context item.
Binds a value to the given external variable or the context item from the given Source. An XQJ implementation must at least support the following implementations:
If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.
The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.
If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
type | - the type of the value for the created document node. If null is specified, it behaves as if XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, ZorbaXQItemType.XQBASETYPE_XS_UNTYPED)) were passed in as the type parameter. That is, the type represents the XQuery sequence type document-node(element(*, xs:untyped)) |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 691 of file ZorbaXQPreparedExpression.java.
References org.zorbaxquery.api.xqj.ZorbaXQPreparedExpression.bindDocument().
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 874 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 899 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 924 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable.
The dynamic type of the value is derived from the ZorbaXQItem. In case of a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
XQException | - if (1) any of the arguments are null, (2) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (3) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, (4) the expression is in a closed state, or (5) the specified item is closed |
Definition at line 740 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 949 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 974 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 798 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The input sequence is consumed from its current position to the end, after which the input sequence's position will be set to point after the last item. The dynamic type of the value is derived from the items in the sequence. In case of a mismatch between the static and dynamic types, an XQException is be raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
XQException | - if (1) any of the arguments are null, (2) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (3) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, (4) the expression is in a closed state, or (5) the specified item is closed |
Definition at line 764 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be bound, cannot be null |
type | - the type of the value to be bound to the external variable. The default type of the value is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 1000 of file ZorbaXQPreparedExpression.java.
|
inline |
Binds a value to the given external variable or the context item.
The value is converted into an instance of the specified type, which must represent an xs:string or a type derived by restriction from xs:string. If the specified type is null, it defaults to xs:string. Subsequently the value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0,. If the conversion fails, or if there is a mismatch between the static and dynamic types, an XQException is raised either by this method, or during query evaluation.
varName | - the name of the external variable to bind to, cannot be null |
value | - the value to be converted, cannot be null |
type | - the type of the value to be bound to the external variable. The default type, xs:string, is used in case null is specified |
XQException | - if (1) the varName or value argument is null, (2) the conversion of the value to an XDM instance failed, (3) in case of an ZorbaXQPreparedExpression, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an ZorbaXQPreparedExpression, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state |
Definition at line 449 of file ZorbaXQPreparedExpression.java.
|
inline |
Attempts to cancel the execution if both the XQuery engine and XQJ driver support aborting the execution of an ZorbaXQPreparedExpression.
This method can be used by one thread to cancel an ZorbaXQPreparedExpression, that is being executed in another thread. If cancellation is not supported or the attempt to cancel the execution was not successful, the method returns without any error. If the cancellation is successful, an XQException is thrown, to indicate that it has been aborted, by executeQuery, executeCommand or any method accessing the ZorbaXQResultSequence returned by executeQuery. If applicable, any open ZorbaXQResultSequence and XQResultItem objects will also be implicitly closed in this case.
XQException | - if the prepared expression is in a closed state |
Definition at line 209 of file ZorbaXQPreparedExpression.java.
|
inline |
Closes the expression object and release all resources associated with this prepared expression.
This also closes any result sequences obtained from this expression. Once the expression is closed, all methods on this object other than the close or isClosed will raise exceptions. Calling close on an XQExpression object that is already closed has no effect.
XQException | - if there are errors when closing the expression |
Definition at line 229 of file ZorbaXQPreparedExpression.java.
|
inline |
Executes the prepared query expression.
Calling this method implicitly closes any previous result sequence obtained from this expression.
XQException | - if (1) there are errors when executing the prepared expression, (2) the prepared expression is in a closed state, or (3) the query execution is cancelled |
Definition at line 247 of file ZorbaXQPreparedExpression.java.
|
inline |
Retrieves all the external variables defined in the prolog of the prepared expression.
XQException | - if the prepared expression is in a closed state |
Definition at line 265 of file ZorbaXQPreparedExpression.java.
|
inline |
Retrieves the names of all unbound external variables.
Gets the static type information of the result sequence. If an implementation does not do static typing of the query, then this method must return an ZorbaXQSequenceType object corresponding to the XQuery sequence type item()*.
XQException | - if the prepared expression is in a closed state |
Definition at line 304 of file ZorbaXQPreparedExpression.java.
|
inline |
Gets the implicit timezone.
XQException | - if the expression is in a closed state |
Definition at line 399 of file ZorbaXQPreparedExpression.java.
|
inline |
Gets an ZorbaXQStaticContext representing the values for all expression properties.
Note that these properties cannot be changed; in order to change, a new ZorbaXQPreparedExpression needs to be created.
XQException | - if the expression is in a closed state |
Definition at line 385 of file ZorbaXQPreparedExpression.java.
|
inline |
Gets the static type information of the result sequence.
If an implementation does not do static typing of the query, then this method must return an ZorbaXQSequenceType object corresponding to the XQuery sequence type item()*.
XQException | - if the prepared expression is in a closed state |
Definition at line 336 of file ZorbaXQPreparedExpression.java.
|
inline |
Retrieves the static type of a given external variable.
varName | - the name of the external variable |
XQException | - if (1) the variable does not exist in the static context of the expression, or (2) the sequence is in a closed state, or (3) the name parameter is null |
Definition at line 349 of file ZorbaXQPreparedExpression.java.
|
inline |
Checks if the prepared expression in a closed state.
Definition at line 218 of file ZorbaXQPreparedExpression.java.
|
inline |
Sets the implicit timezone.
value | - time zone to be set |
XQException | - if the expression is in a closed state |
Definition at line 721 of file ZorbaXQPreparedExpression.java.