Class SQLConnect.ConnectInstruction
- All Implemented Interfaces:
Callable
,ExportAgent
,Locatable
,IdentityComparable
,Traceable
- Enclosing class:
SQLConnect
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.expr.SimpleExpression
SimpleExpression.SimpleExpressionElaborator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Fields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
-
Constructor Summary
ConstructorsConstructorDescriptionConnectInstruction
(Expression database, Expression driver, Expression user, Expression password, Expression autoCommit) -
Method Summary
Modifier and TypeMethodDescriptioncall
(XPathContext context, Sequence[] arguments) Call the Callable.protected int
Determine the static cardinality of the expression.copy
(RebindingMap rebindings) Copy an expression.Return a distinguishing name for the expression, for use in diagnostics.int
A subclass must provide one of the methods evaluateItem(), iterate(), or process().Methods inherited from class net.sf.saxon.expr.SimpleExpression
copyOperandsFrom, evaluateItem, export, getElaborator, getItemType, getOperanda, iterate, operands, process, setArguments, setOperanda, simpleCopy
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dispatchTailCall, dynamicError, effectiveBooleanValue, equals, evaluateAsString, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, makeElaborator, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, supportsLazyEvaluation, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, withLocation
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
Field Details
-
DATABASE
public static final int DATABASE- See Also:
-
DRIVER
public static final int DRIVER- See Also:
-
USER
public static final int USER- See Also:
-
PASSWORD
public static final int PASSWORD- See Also:
-
AUTOCOMMIT
public static final int AUTOCOMMIT- See Also:
-
-
Constructor Details
-
ConnectInstruction
public ConnectInstruction(Expression database, Expression driver, Expression user, Expression password, Expression autoCommit)
-
-
Method Details
-
getImplementationMethod
public int getImplementationMethod()A subclass must provide one of the methods evaluateItem(), iterate(), or process(). This method indicates which of the three is provided.- Specified by:
getImplementationMethod
in classExpression
- Returns:
- the implementation method, for example
Expression.ITERATE_METHOD
orExpression.EVALUATE_METHOD
orExpression.PROCESS_METHOD
-
computeCardinality
protected int computeCardinality()Description copied from class:SimpleExpression
Determine the static cardinality of the expression. This implementation returns "zero or more", which can be overridden in a subclass.- Overrides:
computeCardinality
in classSimpleExpression
- Returns:
- the computed cardinality, as one of the values
StaticProperty.ALLOWS_ZERO_OR_ONE
,StaticProperty.EXACTLY_ONE
,StaticProperty.ALLOWS_ONE_OR_MORE
,StaticProperty.ALLOWS_ZERO_OR_MORE
. May also returnStaticProperty.ALLOWS_ZERO
if the result is known to be an empty sequence, orStaticProperty.ALLOWS_MANY
if if is known to return a sequence of length two or more.
-
getExpressionType
Description copied from class:SimpleExpression
Return a distinguishing name for the expression, for use in diagnostics. By default the class name is used.- Overrides:
getExpressionType
in classSimpleExpression
- Returns:
- a distinguishing name for the expression (defaults to the name of the implementation class)
-
copy
Description copied from class:SimpleExpression
Copy an expression. This makes a deep copy.- Overrides:
copy
in classSimpleExpression
- Parameters:
rebindings
- variables that need to be re-bound- Returns:
- the copy of the original expression
-
call
public ObjectValue<Connection> call(XPathContext context, Sequence[] arguments) throws XPathException Description copied from interface:Callable
Call the Callable.- Parameters:
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as Sequences.Generally it is advisable, if calling iterate() to process a supplied sequence, to call it only once; if the value is required more than once, it should first be converted to a
GroundedValue
by calling the utility method SequenceTool.toGroundedValue().If the expected value is a single item, the item should be obtained by calling Sequence.head(): it cannot be assumed that the item will be passed as an instance of
Item
orAtomicValue
.It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable.
- Returns:
- the result of the evaluation, in the form of a Sequence. It is the responsibility of the callee to ensure that the type of result conforms to the expected result type.
- Throws:
XPathException
- if a dynamic error occurs during the evaluation of the expression
-