Class MsClrFunction

All Implemented Interfaces:
IFunction, ISearchPath, IStatement, IHashable

public class MsClrFunction extends MsAbstractClrFunction
Represents a Microsoft SQL CLR function. CLR functions are implemented in .NET assemblies and can be called from SQL.
  • Constructor Details

    • MsClrFunction

      public MsClrFunction(String name, String assembly, String assemblyClass, String assemblyMethod)
      Creates a new MS CLR function definition.
      Parameters:
      name - the function name
      assembly - the assembly name
      assemblyClass - the class name in assembly
      assemblyMethod - the method name in class
  • Method Details

    • getStatementType

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

      public String getDeclaration(Argument arg)
    • needDrop

      public boolean needDrop(IFunction newFunction)
      Description copied from interface: IFunction
      Determines whether this function needs to be dropped before creating the new version.
      Parameters:
      newFunction - the new function version to compare against
      Returns:
      true if the function needs to be dropped and recreated
    • setFuncType

      public void setFuncType(MsFunctionTypes funcType)
    • 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 MsAbstractCommonFunction
      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 MsAbstractCommonFunction
      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 MsAbstractClrFunction
      Parameters:
      hasher - the hasher instance to use for hash computation
    • compare

      public boolean compare(IStatement obj)
      Description copied from class: AbstractStatement
      This method does not account for nested child PgStatements. Shallow version of AbstractStatement.equals(Object)
      Specified by:
      compare in interface IStatement
      Overrides:
      compare in class MsAbstractCommonFunction