Class QueryPlan

java.lang.Object
org.basex.query.QueryPlan

public final class QueryPlan extends Object
Query plan builder.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • QueryPlan

      public QueryPlan(boolean compiled, boolean updating, boolean full)
      Constructor.
      Parameters:
      compiled - compiled flag
      updating - updating flag
      full - include comprehensive information
  • Method Details

    • root

      public FElem root()
      Returns the root node.
      Returns:
      root node
    • add

      public void add(FElem elem, Object... children)
      Adds children to the specified element.
      Parameters:
      elem - new element
      children - expressions to be added (null references will be ignored)
    • add

      public void add(FElem elem, ExprInfo... children)
      Adds children to the specified element.
      Parameters:
      elem - new element
      children - expressions (null references will be ignored)
    • create

      public FElem create(ExprInfo expr, Object... atts)
      Creates a new element node to be added to the query plan.
      Parameters:
      expr - calling expression
      atts - attribute names and values
      Returns:
      element
    • create

      public FElem create(String name, Var var)
      Creates a new element node to be added to the query plan.
      Parameters:
      name - name of element
      var - variable to attach (can be null)
      Returns:
      element
    • addAttribute

      public void addAttribute(FElem elem, Object name, Object value)
      Adds an attribute to the specified element if the specified value is not null.
      Parameters:
      elem - element to which the attribute will be added
      name - name
      value - value or null
    • addElement

      public void addElement(FElem elem, FElem child)
      Adds a child element to the specified element.
      Parameters:
      elem - element to which the attribute will be added
      child - child element
    • attachVariable

      public FElem attachVariable(FElem elem, Var var, boolean type)
      Attaches variable information to the specified element.
      Parameters:
      elem - element to which attributes will be added
      var - variable (can be null)
      type - include type information
      Returns:
      specified element