Class JdbcType
java.lang.Object
org.pgcodekeeper.core.loader.jdbc.JdbcType
Represents a PostgreSQL data type with schema qualification and array type handling.
Provides methods for generating qualified type names and managing type dependencies.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds this type as a dependency to the specified statement if it's a user type.Returns the full type name with empty target schema.getFullName(String targetSchemaName) Returns the full type name with schema qualification and array notation.Returns the GenericColumn representation containing the type's schema and name.Returns the schema-qualified type name with empty target schema.getSchemaQualifiedName(String targetSchemaName) Returns the schema-qualified type name, applying aliases for pg_catalog types.
-
Field Details
-
DATA_TYPE_ALIASES
-
-
Constructor Details
-
JdbcType
public JdbcType(long oid, String typeName, long typelem, long typarray, String parentSchema, String elemname, long lastSysOid) Creates a new JDBC type representation. Array types have names beginning with underscore and have 0 in typarray column. Vector types have non-zero typarray values and are not converted to simple arrays.- Parameters:
oid- the type OIDtypeName- the type nametypelem- the element type OID for arraystyparray- the array type OIDparentSchema- the schema containing this typeelemname- the element type name for arrayslastSysOid- the last system OID for dependency checking
-
-
Method Details
-
getSchemaQualifiedName
Returns the schema-qualified type name, applying aliases for pg_catalog types.- Parameters:
targetSchemaName- the target schema name for qualification comparison- Returns:
- the qualified type name
-
getSchemaQualifiedName
Returns the schema-qualified type name with empty target schema.- Returns:
- the qualified type name
-
getFullName
Returns the full type name with schema qualification and array notation. If the type's schema differs from targetSchemaName, the returned name is schema-qualified. Array types have "[]" appended to the end.- Parameters:
targetSchemaName- the target schema name for qualification comparison- Returns:
- the full type name with array notation if applicable
-
getFullName
Returns the full type name with empty target schema.- Returns:
- the full type name with array notation if applicable
-
getQualifiedName
Returns the GenericColumn representation containing the type's schema and name.- Returns:
- the GenericColumn for this type
-
addTypeDepcy
Adds this type as a dependency to the specified statement if it's a user type.- Parameters:
st- the statement to add the dependency to
-