Class UniqueConstraint
- java.lang.Object
-
- org.apache.flink.table.legacy.api.constraints.UniqueConstraint
-
- All Implemented Interfaces:
Constraint
@Deprecated @Internal public final class UniqueConstraint extends Object
Deprecated.SeeResolvedSchemaandUniqueConstraint.A unique key constraint. It can be declared also as a PRIMARY KEY.- See Also:
Constraint.ConstraintType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.legacy.api.constraints.Constraint
Constraint.ConstraintType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringasSummaryString()Deprecated.Returns constraint's summary.booleanequals(Object o)Deprecated.List<String>getColumns()Deprecated.List of column names for which the primary key was defined.StringgetName()Constraint.ConstraintTypegetType()Deprecated.Tells what kind of constraint it is, e.g.inthashCode()Deprecated.booleanisEnforced()Constraints can either be enforced or non-enforced.static UniqueConstraintprimaryKey(String name, List<String> columns)Deprecated.Creates a non enforcedConstraint.ConstraintType.PRIMARY_KEYconstraint.StringtoString()
-
-
-
Method Detail
-
primaryKey
public static UniqueConstraint primaryKey(String name, List<String> columns)
Deprecated.Creates a non enforcedConstraint.ConstraintType.PRIMARY_KEYconstraint.
-
getColumns
public List<String> getColumns()
Deprecated.List of column names for which the primary key was defined.
-
getType
public Constraint.ConstraintType getType()
Deprecated.Description copied from interface:ConstraintTells what kind of constraint it is, e.g. PRIMARY KEY, UNIQUE, ...
-
asSummaryString
public final String asSummaryString()
Deprecated.Returns constraint's summary. All constraints summary will be formatted asCONSTRAINT [constraint-name] [constraint-type] ([constraint-definition]) E.g CONSTRAINT pk PRIMARY KEY (f0, f1)
-
equals
public boolean equals(Object o)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
getName
public String getName()
- Specified by:
getNamein interfaceConstraint
-
isEnforced
public boolean isEnforced()
Description copied from interface:ConstraintConstraints can either be enforced or non-enforced. If a constraint is enforced it will be checked whenever any SQL statement is executed that results in data or schema changes. If the constraint is not enforced the owner of the data is responsible for ensuring data integrity. Flink will rely the information is valid and might use it for query optimisations.- Specified by:
isEnforcedin interfaceConstraint
-
-