Top Description
org.jooq

public non-sealed Interface Constraint

extends FieldOrConstraint, TableElement
Known Direct Subinterfaces
org.jooq.ConstraintFinalStep, org.jooq.impl.QOM.PrimaryKey, org.jooq.impl.QOM.UniqueKey, org.jooq.impl.QOM.ForeignKey, org.jooq.impl.QOM.Check
Imports
org.jooq.impl.DSL

Deprecated

as a consequence of FieldOrConstraint being deprecated. See corresponding docs for further information.

A DDL constraint.

Constraint definitions can be used in DDL statements in order to specify the constraint, or in some DML statements that reference a given constraint.

Example:


// Assuming import static org.jooq.impl.DSL.*;

using(configuration)
   .alterTable(ACTOR)
   .add(constraint("actor_unique_name")
       .unique(ACTOR.FIRST_NAME, ACTOR.LAST_NAME))
   .execute();

Instances can be created using DSL#constraint(Name) and overloads.

Author
Lukas Eder