Package org.pgcodekeeper.core.schema.ms
Class MsClrFunction
java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractFunction
org.pgcodekeeper.core.schema.ms.AbstractMsClrFunction
org.pgcodekeeper.core.schema.ms.MsClrFunction
- All Implemented Interfaces:
IHashable,IFunction,ISearchPath,IStatement
Represents a Microsoft SQL CLR function.
CLR functions are implemented in .NET assemblies and can be called from SQL.
-
Field Summary
Fields inherited from class org.pgcodekeeper.core.schema.PgStatement
GO -
Constructor Summary
ConstructorsConstructorDescriptionMsClrFunction(String name, String assembly, String assemblyClass, String assemblyMethod) Creates a new MS CLR function definition. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeHash(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.booleanneedDrop(AbstractFunction newFunction) Determines whether this function needs to be dropped before creating the new version.voidsetFuncType(FuncTypes funcType) voidsetReturns(String returns) Sets the return type of this function.Methods inherited from class org.pgcodekeeper.core.schema.ms.AbstractMsClrFunction
addOption, getDbType, shallowCopyMethods inherited from class org.pgcodekeeper.core.schema.AbstractFunction
addArgument, appendAlterSQL, canDropBeforeCreate, compare, getArguments, getContainingSchema, getCreationSQL, getReturnsColumnsMethods inherited from class org.pgcodekeeper.core.schema.PgStatement
addAllDeps, addDep, addPrivilege, appendAlterComments, appendComments, appendOwnerSQL, canDrop, checkComments, clearPrivileges, compareChildren, deepCopy, equals, getAuthor, getBareName, getChildren, getComment, getDeps, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, getTypeName, hasChildren, hashCode, isLib, isOwned, isSubElement, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, toStringMethods inherited from interface org.pgcodekeeper.core.schema.ISearchPath
getDatabase, getSchemaNameMethods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getName, getParent, getQualifiedName
-
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
-
setFuncType
-
getReturns
Description copied from interface:IFunctionGets the return type of this function.- Specified by:
getReturnsin interfaceIFunction- Overrides:
getReturnsin classAbstractFunction- 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 classAbstractFunction- Parameters:
returns- the return type to set
-
needDrop
Description copied from class:AbstractFunctionDetermines whether this function needs to be dropped before creating the new version.- Specified by:
needDropin classAbstractFunction- Parameters:
newFunction- the new function version to compare against- Returns:
- true if the function needs to be dropped and recreated
-
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 classAbstractMsClrFunction- Parameters:
hasher- the hasher instance to use for hash computation
-