Interface ICast
- All Superinterfaces:
IStatement
Interface for database type cast operations.
Defines functionality for casting between different data types in various contexts.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumIndicates what contexts the cast can be invoked in. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets the context in which this cast can be invoked.static StringgetSimpleName(String source, String target) Creates a simple name for a cast from source to target type.Gets the source type of the cast.Gets the target type of the cast.default ObjectReferenceMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDatabase, 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
-
Field Details
-
CAST_NAME
Template for cast names in the format "source AS target".- See Also:
-
-
Method Details
-
getSource
String getSource()Gets the source type of the cast.- Returns:
- the source type name
-
getTarget
String getTarget()Gets the target type of the cast.- Returns:
- the target type name
-
getContext
ICast.CastContext getContext()Gets the context in which this cast can be invoked.- Returns:
- the cast context
-
getSimpleName
Creates a simple name for a cast from source to target type.- Parameters:
source- the source typetarget- the target type- Returns:
- the formatted cast name
-
toObjectReference
- Specified by:
toObjectReferencein interfaceIStatement
-