Interface XQFunctionExpr

All Known Subinterfaces:
XQFunction
All Known Implementing Classes:
Closure, FItem, FuncItem, StaticFunc, XQArray, XQData, XQMap

public interface XQFunctionExpr
Interface for possibly non-compiled XQuery functions.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Method Summary

    Modifier and Type
    Method
    Description
    Annotations of this function.
    int
    Number of arguments this function takes.
    Name of this function, null means anonymous function.
    Type of this function.
    inline(Expr[] exprs, CompileContext cc)
    Tries to inline this function with the given arguments.
    paramName(int pos)
    Name of the parameter at the given position.
    boolean
    Checks if this function returns vacuous results (see Expr.vacuous()).
  • Method Details

    • arity

      int arity()
      Number of arguments this function takes.
      Returns:
      function arity
    • funcName

      QNm funcName()
      Name of this function, null means anonymous function.
      Returns:
      name or null
    • paramName

      QNm paramName(int pos)
      Name of the parameter at the given position.
      Parameters:
      pos - position of the parameter
      Returns:
      name of the parameter
    • funcType

      FuncType funcType()
      Type of this function.
      Returns:
      this function's type
    • annotations

      AnnList annotations()
      Annotations of this function.
      Returns:
      this function's annotations
    • inline

      Expr inline(Expr[] exprs, CompileContext cc) throws QueryException
      Tries to inline this function with the given arguments.
      Parameters:
      exprs - arguments
      cc - compilation context
      Returns:
      the expression to inline if successful, null otherwise
      Throws:
      QueryException - query exception
    • vacuousBody

      boolean vacuousBody()
      Checks if this function returns vacuous results (see Expr.vacuous()).
      Returns:
      result of check