Interface XQFunction

All Superinterfaces:
XQFunctionExpr
All Known Implementing Classes:
FItem, FuncItem, StaticFunc, XQArray, XQData, XQMap

public interface XQFunction extends XQFunctionExpr
Interface for XQuery functions.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Method Details

    • invoke

      default Value invoke(QueryContext qc, InputInfo ii, Value... args) throws QueryException
      Calls the function with the given arguments and takes care of tail calls. Must not be overwritten.
      Parameters:
      qc - query context
      ii - input info
      args - arguments for the call
      Returns:
      result of the function call
      Throws:
      QueryException - query exception
    • invokeTail

      default Value invokeTail(QueryContext qc, InputInfo ii, Value... args) throws QueryException
      Tail-calls the given function with the given arguments. Must not be overwritten.
      Parameters:
      qc - query context
      ii - input info
      args - arguments for the call
      Returns:
      result of the function call
      Throws:
      QueryException - query exception
    • invokeInternal

      Value invokeInternal(QueryContext qc, InputInfo ii, Value[] args) throws QueryException
      Internally invokes this function with the given arguments.
      Parameters:
      qc - query context
      ii - input info
      args - arguments
      Returns:
      resulting value
      Throws:
      QueryException - query exception
    • stackFrameSize

      int stackFrameSize()
      Size of this function's stack frame.
      Returns:
      stack frame size