Package org.pgcodekeeper.core.schema
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.Methods inherited from interface org.pgcodekeeper.core.schema.IStatement
getBareName, getComment, getDatabase, getName, getParent, getQualifiedName, getStatementType
-
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
-