-
- All Superinterfaces:
Constraint,ConstraintEnforcementStep,ConstraintFinalStep,FieldOrConstraint,Named,QueryPart,Serializable
public interface ConstraintForeignKeyOnStep extends ConstraintEnforcementStep
The step in theConstraintconstruction DSL API that allows for addingON DELETEandON UPDATEclauses.Referencing
XYZ*Steptypes directly from client codeIt is usually not recommended to reference any
XYZ*Steptypes 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*Steptypes 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 @NotNull ConstraintForeignKeyOnSteponDeleteCascade()Add anON DELETE CASCADEclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponDeleteNoAction()Add anON DELETE NO ACTIONclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponDeleteRestrict()Add anON DELETE RESTRICTclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponDeleteSetDefault()Add anON DELETE SET DEFAULTclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponDeleteSetNull()Add anON DELETE SET NULLclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponUpdateCascade()Add anON UPDATE CASCADEclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponUpdateNoAction()Add anON UPDATE NO ACTIONclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponUpdateRestrict()Add anON UPDATE RESTRICTclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponUpdateSetDefault()Add anON UPDATE SET DEFAULTclause to theFOREIGN KEYconstraint.@NotNull ConstraintForeignKeyOnSteponUpdateSetNull()Add anON UPDATE SET NULLclause to theFOREIGN KEYconstraint.-
Methods inherited from interface org.jooq.ConstraintEnforcementStep
enforced, notEnforced
-
Methods inherited from interface org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
-
-
-
Method Detail
-
onDeleteNoAction
@NotNull @Support @NotNull ConstraintForeignKeyOnStep onDeleteNoAction()
Add anON DELETE NO ACTIONclause to theFOREIGN KEYconstraint.This is the standard action according to the SQL standard. If a given
SQLDialectdoes 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
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SYBASE}) @NotNull ConstraintForeignKeyOnStep onDeleteRestrict()
Add anON DELETE RESTRICTclause to theFOREIGN KEYconstraint.
-
onDeleteCascade
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull ConstraintForeignKeyOnStep onDeleteCascade()
Add anON DELETE CASCADEclause to theFOREIGN KEYconstraint.
-
onDeleteSetNull
@NotNull @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}) @NotNull ConstraintForeignKeyOnStep onDeleteSetNull()
Add anON DELETE SET NULLclause to theFOREIGN KEYconstraint.
-
onDeleteSetDefault
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) @NotNull ConstraintForeignKeyOnStep onDeleteSetDefault()
Add anON DELETE SET DEFAULTclause to theFOREIGN KEYconstraint.
-
onUpdateNoAction
@NotNull @Support @NotNull ConstraintForeignKeyOnStep onUpdateNoAction()
Add anON UPDATE NO ACTIONclause to theFOREIGN KEYconstraint.This is the standard action according to the SQL standard. If a given
SQLDialectdoes 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
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SYBASE}) @NotNull ConstraintForeignKeyOnStep onUpdateRestrict()
Add anON UPDATE RESTRICTclause to theFOREIGN KEYconstraint.
-
onUpdateCascade
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) @NotNull ConstraintForeignKeyOnStep onUpdateCascade()
Add anON UPDATE CASCADEclause to theFOREIGN KEYconstraint.
-
onUpdateSetNull
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) @NotNull ConstraintForeignKeyOnStep onUpdateSetNull()
Add anON UPDATE SET NULLclause to theFOREIGN KEYconstraint.
-
onUpdateSetDefault
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,FIREBIRD,H2,HANA,HSQLDB,INGRES,MEMSQL,MYSQL,POSTGRES,SQLITE,SQLSERVER,SYBASE}) @NotNull ConstraintForeignKeyOnStep onUpdateSetDefault()
Add anON UPDATE SET DEFAULTclause to theFOREIGN KEYconstraint.
-
-