org.basex.query.expr
Class ForLet

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.expr.Single
              extended by org.basex.query.expr.ForLet
Direct Known Subclasses:
For, Let

public abstract class ForLet
extends Single

Abstract For/Let Clause.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Use
 
Field Summary
 Var var
          Variable.
 
Fields inherited from class org.basex.query.expr.Single
expr
 
Method Summary
 String color()
          Returns a color string for the expression.
 boolean removable(Var v, QueryContext ctx)
          Checks if the specified variable is removable.
 Expr remove(Var v)
          Removes the specified variable in a sub expression.
 Return returned(QueryContext ctx)
          Indicates the return type of an expression.
 boolean uses(Expr.Use u, QueryContext ctx)
          Indicates if an expression uses the specified type.
 
Methods inherited from class org.basex.query.expr.Single
comp, plan
 
Methods inherited from class org.basex.query.expr.Expr
addText, atomic, checkCtx, checkDbl, checkItr, duplicates, e, ebv, i, indexAccessible, indexEquivalent, iter, sameAs, size, test, v
 
Methods inherited from class org.basex.query.ExprInfo
info, name, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

var

public Var var
Variable.

Method Detail

uses

public final boolean uses(Expr.Use u,
                          QueryContext ctx)
Description copied from class: Expr
Indicates if an expression uses the specified type. Called by the compiler to perform certain optimizations. true is returned by default and thus assumed as "worst-case".

Overrides:
uses in class Single
Parameters:
u - use type to be checked
ctx - query context
Returns:
result of check

removable

public final boolean removable(Var v,
                               QueryContext ctx)
Description copied from class: Expr
Checks if the specified variable is removable.

Overrides:
removable in class Expr
Parameters:
v - variable to be removed
ctx - query context
Returns:
result of check

remove

public final Expr remove(Var v)
Description copied from class: Expr
Removes the specified variable in a sub expression.

Overrides:
remove in class Single
Parameters:
v - variable to be removed
Returns:
expression with removed variable

returned

public final Return returned(QueryContext ctx)
Description copied from class: Expr
Indicates the return type of an expression. Called by the compiler to check if expressions can be reformulated. null is returned by default.

Overrides:
returned in class Expr
Parameters:
ctx - query context
Returns:
result of check

color

public final String color()
Description copied from class: ExprInfo
Returns a color string for the expression.

Overrides:
color in class ExprInfo
Returns:
color