Package io.trino.spi.connector
Record Class RelationColumnsMetadata
java.lang.Object
java.lang.Record
io.trino.spi.connector.RelationColumnsMetadata
@Experimental(eta="2024-01-01")
public record RelationColumnsMetadata(SchemaTableName name, Optional<List<ConnectorMaterializedViewDefinition.Column>> materializedViewColumns, Optional<List<ConnectorViewDefinition.ViewColumn>> viewColumns, Optional<List<ColumnMetadata>> tableColumns, boolean redirected)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRelationColumnsMetadata(SchemaTableName name, Optional<List<ConnectorMaterializedViewDefinition.Column>> materializedViewColumns, Optional<List<ConnectorViewDefinition.ViewColumn>> viewColumns, Optional<List<ColumnMetadata>> tableColumns, boolean redirected) Creates an instance of aRelationColumnsMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static RelationColumnsMetadatastatic RelationColumnsMetadatastatic RelationColumnsMetadataforTable(SchemaTableName name, List<ColumnMetadata> columns) static RelationColumnsMetadataforView(SchemaTableName name, List<ConnectorViewDefinition.ViewColumn> columns) final inthashCode()Returns a hash code value for this object.Returns the value of thematerializedViewColumnsrecord component.name()Returns the value of thenamerecord component.booleanReturns the value of theredirectedrecord component.Returns the value of thetableColumnsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theviewColumnsrecord component.
-
Constructor Details
-
RelationColumnsMetadata
public RelationColumnsMetadata(SchemaTableName name, Optional<List<ConnectorMaterializedViewDefinition.Column>> materializedViewColumns, Optional<List<ConnectorViewDefinition.ViewColumn>> viewColumns, Optional<List<ColumnMetadata>> tableColumns, boolean redirected) Creates an instance of aRelationColumnsMetadatarecord class.- Parameters:
name- the value for thenamerecord componentmaterializedViewColumns- the value for thematerializedViewColumnsrecord componentviewColumns- the value for theviewColumnsrecord componenttableColumns- the value for thetableColumnsrecord componentredirected- the value for theredirectedrecord component
-
-
Method Details
-
forMaterializedView
public static RelationColumnsMetadata forMaterializedView(SchemaTableName name, List<ConnectorMaterializedViewDefinition.Column> columns) -
forView
public static RelationColumnsMetadata forView(SchemaTableName name, List<ConnectorViewDefinition.ViewColumn> columns) -
forTable
-
forRedirectedTable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
materializedViewColumns
Returns the value of thematerializedViewColumnsrecord component.- Returns:
- the value of the
materializedViewColumnsrecord component
-
viewColumns
Returns the value of theviewColumnsrecord component.- Returns:
- the value of the
viewColumnsrecord component
-
tableColumns
Returns the value of thetableColumnsrecord component.- Returns:
- the value of the
tableColumnsrecord component
-
redirected
public boolean redirected()Returns the value of theredirectedrecord component.- Returns:
- the value of the
redirectedrecord component
-