@PublicEvolving public final class UniqueConstraint extends Object
ConstraintType
Constraint.ConstraintType
Modifier and Type | Method and Description |
---|---|
String |
asSummaryString()
Returns constraint's summary.
|
boolean |
equals(Object o) |
List<String> |
getColumns()
List of column names for which the primary key was defined.
|
String |
getName() |
Constraint.ConstraintType |
getType()
Tells what kind of constraint it is, e.g.
|
int |
hashCode() |
boolean |
isEnforced()
Constraints can either be enforced or non-enforced.
|
static UniqueConstraint |
primaryKey(String name,
List<String> columns)
Creates a non enforced
ConstraintType#PRIMARY_KEY constraint. |
String |
toString() |
public static UniqueConstraint primaryKey(String name, List<String> columns)
ConstraintType#PRIMARY_KEY
constraint.public List<String> getColumns()
public Constraint.ConstraintType getType()
Constraint
public final String asSummaryString()
CONSTRAINT [constraint-name] [constraint-type] ([constraint-definition]) E.g CONSTRAINT pk PRIMARY KEY (`f0`, `f1`) NOT ENFORCED
public boolean equals(Object o)
public int hashCode()
public String getName()
getName
in interface Constraint
public boolean isEnforced()
Constraint
isEnforced
in interface Constraint
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.