Class Function

  • All Implemented Interfaces:
    Direct Known Subclasses:
    ScalarFunction, TableFunction

    public abstract class Function
    extends java.lang.Object
    implements java.lang.Cloneable
    This is the root class of all kinds of functions in NanoDB. The class hierarchy for functions is somewhat complicated; these are the important details:
    • ScalarFunction is the parent class for any kind of function that returns a scalar value
      • SimpleFunction is the parent class for functions that take zero or more arguments, and compute and return a result
      • AggregateFunction is the parent class for functions that consume a (potentially large) collection of input values and compute a single aggregated value from the collection
    • TableFunction is the parent class for table-returning functions
    Functions must support cloning because the implementation classes often carry their own internal state values, and clearly the same function being invoked in two different parts of the same query, or being invoked concurrently by two different queries, shouldn't have a single shared set of state values. So, the simple thing to do is to just clone functions when they are retrieved from the FunctionDirectory.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Creates a copy of expression.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Function

        public Function()
    • Method Detail

      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Creates a copy of expression.
        clone in class java.lang.Object