-
- All Superinterfaces:
Constraint
,ConstraintEnforcementStep
,ConstraintFinalStep
,FieldOrConstraint
,Named
,QueryPart
,Serializable
public interface ConstraintForeignKeyOnStep extends ConstraintEnforcementStep
The step in theConstraint
construction DSL API that allows for addingON DELETE
andON UPDATE
clauses.Referencing
XYZ*Step
types directly from client codeIt is usually not recommended to reference any
XYZ*Step
types directly from client code, or assign them to local variables. When writing dynamic SQL, creating a statement's components dynamically, and passing them to the DSL API statically is usually a better choice. See the manual's section about dynamic SQL for details: https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql.Drawbacks of referencing the
XYZ*Step
types directly:- They're operating on mutable implementations (as of jOOQ 3.x)
- They're less composable and not easy to get right when dynamic SQL gets complex
- They're less readable
- They might have binary incompatible changes between minor releases
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConstraintForeignKeyOnStep
onDeleteCascade()
Add anON DELETE CASCADE
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onDeleteNoAction()
Add anON DELETE NO ACTION
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onDeleteRestrict()
Add anON DELETE RESTRICT
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onDeleteSetDefault()
Add anON DELETE SET DEFAULT
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onDeleteSetNull()
Add anON DELETE SET NULL
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onUpdateCascade()
Add anON UPDATE CASCADE
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onUpdateNoAction()
Add anON UPDATE NO ACTION
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onUpdateRestrict()
Add anON UPDATE RESTRICT
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onUpdateSetDefault()
Add anON UPDATE SET DEFAULT
clause to theFOREIGN KEY
constraint.ConstraintForeignKeyOnStep
onUpdateSetNull()
Add anON UPDATE SET NULL
clause to theFOREIGN KEY
constraint.-
Methods inherited from interface org.jooq.ConstraintEnforcementStep
enforced, notEnforced
-
Methods inherited from interface org.jooq.Named
getComment, getName, getQualifiedName, getUnqualifiedName
-
-
-
-
Method Detail
-
onDeleteNoAction
@Support ConstraintForeignKeyOnStep onDeleteNoAction()
Add anON DELETE NO ACTION
clause to theFOREIGN KEY
constraint.This is the standard action according to the SQL standard. If a given
SQLDialect
does not support setting this action explicitly, no explicit action will be specified and calling this method is equivalent to not calling any method at all.
-
onDeleteRestrict
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SYBASE}) ConstraintForeignKeyOnStep onDeleteRestrict()
Add anON DELETE RESTRICT
clause to theFOREIGN KEY
constraint.
-
onDeleteCascade
@Support ConstraintForeignKeyOnStep onDeleteCascade()
Add anON DELETE CASCADE
clause to theFOREIGN KEY
constraint.
-
onDeleteSetNull
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,SYBASE}) ConstraintForeignKeyOnStep onDeleteSetNull()
Add anON DELETE SET NULL
clause to theFOREIGN KEY
constraint.
-
onDeleteSetDefault
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) ConstraintForeignKeyOnStep onDeleteSetDefault()
Add anON DELETE SET DEFAULT
clause to theFOREIGN KEY
constraint.
-
onUpdateNoAction
@Support ConstraintForeignKeyOnStep onUpdateNoAction()
Add anON UPDATE NO ACTION
clause to theFOREIGN KEY
constraint.This is the standard action according to the SQL standard. If a given
SQLDialect
does not support setting this action explicitly, no explicit action will be specified and calling this method is equivalent to not calling any method at all.
-
onUpdateRestrict
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SYBASE}) ConstraintForeignKeyOnStep onUpdateRestrict()
Add anON UPDATE RESTRICT
clause to theFOREIGN KEY
constraint.
-
onUpdateCascade
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) ConstraintForeignKeyOnStep onUpdateCascade()
Add anON UPDATE CASCADE
clause to theFOREIGN KEY
constraint.
-
onUpdateSetNull
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) ConstraintForeignKeyOnStep onUpdateSetNull()
Add anON UPDATE SET NULL
clause to theFOREIGN KEY
constraint.
-
onUpdateSetDefault
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) ConstraintForeignKeyOnStep onUpdateSetDefault()
Add anON UPDATE SET DEFAULT
clause to theFOREIGN KEY
constraint.
-
-