Interface IFunction
- All Superinterfaces:
ISearchPath,IStatement
- All Known Implementing Classes:
MetaFunction,MsAbstractClrFunction,MsAbstractCommonFunction,MsAbstractFunction,MsClrFunction,MsClrProcedure,MsFunction,MsProcedure,PgAbstractFunction,PgAggregate,PgFunction,PgProcedure
Interface for database functions, procedures, and aggregates.
Provides access to function arguments, return types, and return columns.
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of function arguments.Gets the return type of this function.Gets the return columns for table-valued functions.booleanDetermines whether this function needs to be dropped before creating the new version.voidsetReturns(String returns) Sets the return type of this function.Methods 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, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getStatementType, getTwin, getTypeName, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopy
-
Method Details
-
getReturns
String getReturns()Gets the return type of this function.- Returns:
- the return type, or null if not applicable
-
getReturnsColumns
Gets the return columns for table-valued functions.- Returns:
- a map of column names to their types
-
getArguments
Gets the list of function arguments.- Returns:
- the list of arguments
-
setReturns
Sets the return type of this function.- Parameters:
returns- the return type to set
-
needDrop
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
-