public class TPreparedXQuery extends TXQuery
TPreparedXQuery represents a Tamino xquery expression. It wraps a Tamino xquery expression.
With with 4.4 Tamino enables seperate compilation and execution of XQueries. Tamino Java APIs support this feature through TPreparedXQuery. Live time of a prepared query is bounded to the enclosing session. All prepared queries die with closing the session.
Example- // Get tamino connection, use local transaction mode connection = getConnection(); connection.useLocalTransactionMode(); // Get XML object accessor accessor = connection.newXMLObjectAccessor(); // Prepare XQuery using connection object TPreparedXQuery query = connection.prepareQuery("declare variable $y as xs:string external for $q in input()/Acount[ID=$y] return $q"); // Bind external variables query.bindString(new QName( "y"),"111-222-333"); // Execute prepared XQuery TResponse response = accessor.xquery(query);
extVarialbles
Constructor and Description |
---|
TPreparedXQuery(java.lang.String expression)
Initializes the query with the given XQuery expression.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHandle()
Returns the handle to Prepared XQuery.
|
void |
setHandle(java.lang.String handle)
Sets the handle of Prepared XQuery, that was returned by server after executing _PREPARE command.
|
bindBase64Binary, bindBoolean, bindByte, bindDate, bindDateTime, bindDecimal, bindDouble, bindDuration, bindEntity, bindFloat, bindGDay, bindGMonth, bindGMonthDay, bindGYear, bindGYearMonth, bindHexBinary, bindID, bindIDRef, bindInt, bindInteger, bindLanguage, bindLong, bindName, bindNCName, bindNegativeInteger, bindNMToken, bindNonNegativeInteger, bindNonPositiveInteger, bindNormalizedString, bindNotation, bindPositiveInteger, bindQName, bindSequence, bindSequence, bindShort, bindString, bindTime, bindToken, bindUnsignedByte, bindUnsignedInt, bindUnsignedLong, bindUnsignedShort, bindURI, equals, getExpression, getMediaType, getOutputMethod, getQuerySearchMode, getSensitive, hashCode, newInstance, setExpression, setMediaType, setOutputMethod, setQuerySearchMode, setSensitive, toString
Copyright (c) 2016 Software AG. All Rights Reserved.