Appearance
ForeignKey Class
Definition
Maintain a FOREIGN KEY constraint with another table
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Constructors
| Name | Description |
|---|---|
ForeignKey() | Create empty instance |
ForeignKey(string keyName, string constrainedColumn, string referenceTable, string referenceColumn) | Create with Name, Column, and Table |
ForeignKey(string keyName, string constrainedColumn, string schema, string referenceTable, string referenceColumn) | Create with Name, Column, Schema, and Table |
Properties
| Name | Description |
|---|---|
Column | Constrained Column |
OnDelete | Action when a referenced row is deleted |
OnUpdate | Action when a referenced key is updated |
ReferenceColumn | Columns referenced in the foreign table |
TableName | Name of the foreign table |
Methods
| Name | Description |
|---|---|
ForeignKey Copy() | Creates a deep copy of this foreign key definition. |
string GetKeyName() | Returns the Name value, or generates a default FOREIGN KEY name using a pattern |
bool IsValidDefinition() | Verifies the validity of the requested FOREIGN KEY based on current values |