org.exist.xquery
Class Optimize

java.lang.Object
  extended by org.exist.xquery.Pragma
      extended by org.exist.xquery.Optimize

public class Optimize
extends Pragma


Field Summary
static QName OPTIMIZE_PRAGMA
           
 
Constructor Summary
Optimize(XQueryContext context, QName pragmaName, String contents, boolean explicit)
           
 
Method Summary
 void after(XQueryContext context, Expression expression)
           
 void analyze(AnalyzeContextInfo contextInfo)
           
 void before(XQueryContext context, Expression expression)
           
 Sequence eval(Sequence contextSequence, Item contextItem)
           
static int getQNameIndexType(XQueryContext context, Sequence contextSequence, QName qname)
          Check every collection in the context sequence for an existing range index by QName.
 void resetState(boolean postOptimization)
           
 
Methods inherited from class org.exist.xquery.Pragma
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPTIMIZE_PRAGMA

public static final QName OPTIMIZE_PRAGMA
Constructor Detail

Optimize

public Optimize(XQueryContext context,
                QName pragmaName,
                String contents,
                boolean explicit)
         throws XPathException
Throws:
XPathException
Method Detail

analyze

public void analyze(AnalyzeContextInfo contextInfo)
             throws XPathException
Overrides:
analyze in class Pragma
Throws:
XPathException

eval

public Sequence eval(Sequence contextSequence,
                     Item contextItem)
              throws XPathException
Overrides:
eval in class Pragma
Throws:
XPathException

before

public void before(XQueryContext context,
                   Expression expression)
            throws XPathException
Specified by:
before in class Pragma
Throws:
XPathException

after

public void after(XQueryContext context,
                  Expression expression)
           throws XPathException
Specified by:
after in class Pragma
Throws:
XPathException

resetState

public void resetState(boolean postOptimization)
Overrides:
resetState in class Pragma

getQNameIndexType

public static int getQNameIndexType(XQueryContext context,
                                    Sequence contextSequence,
                                    QName qname)
Check every collection in the context sequence for an existing range index by QName.

Parameters:
contextSequence -
Returns:
the type of a usable index or Type.ITEM if there is no common index.


Copyright (C) Wolfgang Meier. All rights reserved.