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.SeeResolvedSchema
andUniqueConstraint
.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 String
asSummaryString()
Deprecated.Returns constraint's summary.boolean
equals(Object o)
Deprecated.List<String>
getColumns()
Deprecated.List of column names for which the primary key was defined.String
getName()
Constraint.ConstraintType
getType()
Deprecated.Tells what kind of constraint it is, e.g.int
hashCode()
Deprecated.boolean
isEnforced()
Constraints can either be enforced or non-enforced.static UniqueConstraint
primaryKey(String name, List<String> columns)
Deprecated.Creates a non enforcedConstraint.ConstraintType.PRIMARY_KEY
constraint.String
toString()
-
-
-
Method Detail
-
primaryKey
public static UniqueConstraint primaryKey(String name, List<String> columns)
Deprecated.Creates a non enforcedConstraint.ConstraintType.PRIMARY_KEY
constraint.
-
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:Constraint
Tells 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:
getName
in interfaceConstraint
-
isEnforced
public boolean isEnforced()
Description copied from interface:Constraint
Constraints 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:
isEnforced
in interfaceConstraint
-
-