public final class CmpV extends Cmp
| Modifier and Type | Class and Description |
|---|---|
static class |
CmpV.OpV
Comparators.
|
| Constructor and Description |
|---|
CmpV(InputInfo ii,
Expr e1,
Expr e2,
CmpV.OpV o)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Expr |
comp(QueryContext ctx)
Compiles and optimizes the expression, assigns data types and
cardinalities.
|
Expr |
compEbv(QueryContext ctx)
This method is called at compile time by expressions that perform
effective boolean value tests (e.g.
|
java.lang.String |
description()
Returns a string description of the expression.
|
CmpV |
invert()
If possible, inverts the operands of the expression.
|
Bln |
item(QueryContext ctx,
InputInfo ii)
Evaluates the expression and returns the resulting item or
a
null reference, if the expression yields an empty sequence. |
void |
plan(Serializer ser)
Serializes the expression tree.
|
java.lang.String |
toString() |
allAreValues, count, indexEquivalent, removable, remove, toString, usescheckBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkIO, checkItem, checkItr, checkItr, checkMap, checkNode, checkNoEmpty, checkStr, checkType, checkUp, checkUp, checkWrite, compBln, ebv, iter, optPre, preEval, size, test, type, valueaddText, hasFreeVars, indexAccessible, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, sameAspublic Expr comp(QueryContext ctx) throws QueryException
Exprcomp in class Arrctx - query contextQueryException - query exceptionpublic Expr compEbv(QueryContext ctx)
ExprThis method is called at compile time by expressions that perform
effective boolean value tests (e.g. If or Preds).
If the arguments of the called expression return a boolean anyway,
the expression will be simplified.
Example in CmpV:
if($x eq true()) is rewritten to if($x), if $x
will always yield a single boolean.
public Bln item(QueryContext ctx, InputInfo ii) throws QueryException
Exprnull reference, if the expression yields an empty sequence.
If this method is not overwritten, Expr.iter(org.basex.query.QueryContext) must be implemented
by an expression, as it may be called by this method.item in class ParseExprctx - query contextii - input infoQueryException - query exceptionpublic CmpV invert()
Cmppublic void plan(Serializer ser) throws java.io.IOException
ExprInfopublic java.lang.String description()
ExprInfoExprInfo.toString() method,
arguments are not included in the output.description in class ExprInfo