Class PgFunction

All Implemented Interfaces:
IHashable, IFunction, ISearchPath, IStatement

public final class PgFunction extends AbstractPgFunction
PostgreSQL function implementation. Represents a regular PostgreSQL function (as opposed to procedures or aggregates) with a return type and function body.
  • Constructor Details

    • PgFunction

      public PgFunction(String name)
      Creates a new PostgreSQL function.
      Parameters:
      name - function name
  • Method Details

    • getStatementType

      public DbObjType getStatementType()
      Description copied from interface: IStatement
      Gets the type of this database object.
      Returns:
      the database object type
    • needDrop

      public boolean needDrop(AbstractFunction newFunction)
      Description copied from class: AbstractFunction
      Determines whether this function needs to be dropped before creating the new version.
      Overrides:
      needDrop in class AbstractPgFunction
      Parameters:
      newFunction - the new function version to compare against
      Returns:
      true if the function needs to be dropped and recreated
    • getReturns

      public String getReturns()
      Description copied from interface: IFunction
      Gets the return type of this function.
      Specified by:
      getReturns in interface IFunction
      Overrides:
      getReturns in class AbstractFunction
      Returns:
      the return type, or null if not applicable
    • setReturns

      public void setReturns(String returns)
      Description copied from interface: IFunction
      Sets the return type of this function.
      Specified by:
      setReturns in interface IFunction
      Overrides:
      setReturns in class AbstractFunction
      Parameters:
      returns - the return type to set
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Overrides:
      computeHash in class AbstractPgFunction
      Parameters:
      hasher - the hasher instance to use for hash computation