Class MsClrFunction
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractCommonFunction
org.pgcodekeeper.core.database.ms.schema.MsAbstractClrFunction
org.pgcodekeeper.core.database.ms.schema.MsClrFunction
- All Implemented Interfaces:
IFunction,ISearchPath,IStatement,IHashable
Represents a Microsoft SQL CLR function.
CLR functions are implemented in .NET assemblies and can be called from SQL.
-
Constructor Summary
ConstructorsConstructorDescriptionMsClrFunction(String name, String assembly, String assemblyClass, String assemblyMethod) Creates a new MS CLR function definition. -
Method Summary
Modifier and TypeMethodDescriptionbooleancompare(IStatement obj) This method does not account for nested child PgStatements.voidcomputeHash(Hasher hasher) Computes the hash of the implementing object using the provided hasher.getDeclaration(Argument arg) Gets the return type of this function.Gets the type of this database object.booleanDetermines whether this function needs to be dropped before creating the new version.voidsetFuncType(MsFunctionTypes funcType) voidsetReturns(String returns) Sets the return type of this function.Methods inherited from class org.pgcodekeeper.core.database.ms.schema.MsAbstractClrFunction
addOptionMethods inherited from class org.pgcodekeeper.core.database.ms.schema.MsAbstractCommonFunction
addArgument, appendAlterSQL, canDropBeforeCreate, getArguments, getCreationSQL, getReturnsColumnsMethods inherited from class org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
appendOwnerSQL, formatSql, getQuoter, getRenameCommand, getSeparator, isOwnedMethods inherited from class org.pgcodekeeper.core.database.base.schema.AbstractStatement
addDependency, addPrivilege, appendAlterComments, appendComments, appendPrivileges, canDrop, checkComments, clearPrivileges, compareChildren, deepCopy, equals, fillChildrenList, fillDescendantsList, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, hasChildren, hashCode, isLib, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, shallowCopy, toStringMethods inherited from interface org.pgcodekeeper.core.database.api.schema.ISearchPath
getContainingSchema, getDatabase, getSchemaName, toObjectReferenceMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendOwnerSQL, canDrop, clearPrivileges, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getTwin, getTypeName, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopy
-
Constructor Details
-
MsClrFunction
Creates a new MS CLR function definition.- Parameters:
name- the function nameassembly- the assembly nameassemblyClass- the class name in assemblyassemblyMethod- the method name in class
-
-
Method Details
-
getStatementType
Description copied from interface:IStatementGets the type of this database object.- Returns:
- the database object type
-
getDeclaration
-
needDrop
Description copied from interface:IFunctionDetermines 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
-
getReturns
Description copied from interface:IFunctionGets the return type of this function.- Specified by:
getReturnsin interfaceIFunction- Overrides:
getReturnsin classMsAbstractCommonFunction- Returns:
- the return type, or null if not applicable
-
setReturns
Description copied from interface:IFunctionSets the return type of this function.- Specified by:
setReturnsin interfaceIFunction- Overrides:
setReturnsin classMsAbstractCommonFunction- Parameters:
returns- the return type to set
-
computeHash
Description copied from interface:IHashableComputes the hash of the implementing object using the provided hasher. The implementation should call appropriateputmethods on the hasher for all fields that should contribute to the hash value.- Specified by:
computeHashin interfaceIHashable- Overrides:
computeHashin classMsAbstractClrFunction- Parameters:
hasher- the hasher instance to use for hash computation
-
compare
Description copied from class:AbstractStatementThis method does not account for nested child PgStatements. Shallow version ofAbstractStatement.equals(Object)- Specified by:
comparein interfaceIStatement- Overrides:
comparein classMsAbstractCommonFunction
-