public class ForeignKeyDeleteAction
extends java.lang.Object
The delete action applies to a secondary database that is configured to
have a foreign key integrity constraint. The delete action is specified by
calling SecondaryConfig.setForeignKeyDeleteAction(com.sleepycat.db.ForeignKeyDeleteAction)
.
When a record in the foreign key database is deleted, it is checked to
see if it is referenced by any record in the associated secondary database.
If the key is referenced, the delete action is applied. By default, the
delete action is ABORT
.
SecondaryConfig
Modifier and Type | Field and Description |
---|---|
static ForeignKeyDeleteAction |
ABORT
When a referenced record in the foreign key database is deleted, abort
the transaction by throwing a
DatabaseException . |
static ForeignKeyDeleteAction |
CASCADE
When a referenced record in the foreign key database is deleted, delete
the primary database record that references it.
|
static ForeignKeyDeleteAction |
NULLIFY
When a referenced record in the foreign key database is deleted, set the
reference to null in the primary database record that references it,
thereby deleting the secondary key.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
public static ForeignKeyDeleteAction ABORT
DatabaseException
.public static ForeignKeyDeleteAction CASCADE
public static ForeignKeyDeleteAction NULLIFY
Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved.