oracle.xml.xquery

## Interface OXQExpression

All Superinterfaces:
  OXQDynamicContext

    public interface OXQExpression
    extends OXQDynamicContext

Extensions to `javax.xml.xquery.XQExpression`.

Use method `OXQView.getExpression(XQExpression)` to access these extensions. For example:

     OXQDataSource ds = new OXQDataSource();
     XQConnection con = ds.getConnection();
     XQExpression expr = con.createExpression();
     OXQExpression oexpr = OXQView.getExpression(expr);
     ...

Since:
  12.1

### Method Summary

All Methods Instance Methods Abstract Methods
`XQResultSequence` `executeQuery(OXQEntity query)` Executes a query expression.
`XQExpression` `getXQView()` Returns the `XQExpression` instance corresponding to this instance.

### Methods inherited from interface oracle.xml.xquery.OXQDynamicContext

`bindBigDecimal, bindBigInteger, bindBinary, bindCalendar, bindDocument, bindDuration, bindQName, getConnection, getDebugListener, getDefaultCollection, getDefaultResourceCollection, getPageManager, getUpdateMode, getUserExtension, setDebugListener, setDefaultCollection, setDefaultResourceCollection, setPageManager, setUpdateMode, setUserExtension, unbindAllExternalVariablesAndContextItem`

### Method Detail

#### getXQView

    XQExpression getXQView()

Returns the `XQExpression` instance corresponding to this instance.

Specified by:
  `getXQView` in interface `OXQDynamicContext`
Returns:
  the expression

#### executeQuery

    XQResultSequence executeQuery(OXQEntity query)
                           throws XQException

Executes a query expression. This implicitly closes any previous result sequences obtained from this expression.

Parameters:
  `query` - the XQuery expression. The permitted entity `data` is the same as what is permitted for `MODULE` entities except that collections are not allowed. Cannot be `null`. See the `OXQEntity` documentation for a description of what `data` may be for `MODULE` entities.
Returns:
  an `XQResultSequence` object containing the result of the query execution
Throws:
  `XQException` - if (1) there are errors when executing the query, (2) the expression is in a closed state, (3) the execution is cancelled, (4) the query parameter is `null`

Copyright © 2003, 2020, Oracle and/or its affiliates.