Table of Contents

Method CreateForeignKey

Namespace
YndigoBlue.Velocity.Model
Assembly
YndigoBlue.Velocity.dll

CreateForeignKey(string, string, string, string, string, ForeignKeyRuleType, ForeignKeyRuleType)

Creates a foreign key constraint referencing a column in another table.

public ForeignKey CreateForeignKey(string name, string sourceColumn, string lookupSchema, string lookupTable, string lookupColumn, ForeignKeyRuleType deleteRule, ForeignKeyRuleType updateRule)

Parameters

name string

The constraint name.

sourceColumn string

The column in this table that holds the foreign key value.

lookupSchema string

The schema containing the referenced table.

lookupTable string

The name of the referenced table.

lookupColumn string

The column in the referenced table.

deleteRule ForeignKeyRuleType

The rule applied to this row when the referenced row is deleted.

updateRule ForeignKeyRuleType

The rule applied to this row when the referenced key is updated.

Returns

ForeignKey

The newly created ForeignKey.

CreateForeignKey(string, string[], string, string, string[], ForeignKeyRuleType, ForeignKeyRuleType)

Creates a composite foreign key constraint referencing columns in another table.

public ForeignKey CreateForeignKey(string name, string[] sourceColumns, string lookupSchema, string lookupTable, string[] lookupColumns, ForeignKeyRuleType deleteRule, ForeignKeyRuleType updateRule)

Parameters

name string

The constraint name.

sourceColumns string[]

The columns in this table that hold the foreign key values.

lookupSchema string

The schema containing the referenced table.

lookupTable string

The name of the referenced table.

lookupColumns string[]

The columns in the referenced table.

deleteRule ForeignKeyRuleType

The rule applied when the referenced row is deleted.

updateRule ForeignKeyRuleType

The rule applied when the referenced key is updated.

Returns

ForeignKey

The newly created ForeignKey.

CreateForeignKey(string, IEnumerable<string>, string, string, IEnumerable<string>, ForeignKeyRuleType, ForeignKeyRuleType)

Creates a composite foreign key constraint referencing columns in another table.

public ForeignKey CreateForeignKey(string name, IEnumerable<string> sourceColumns, string lookupSchema, string lookupTable, IEnumerable<string> lookupColumns, ForeignKeyRuleType deleteRule, ForeignKeyRuleType updateRule)

Parameters

name string

The constraint name.

sourceColumns IEnumerable<string>

The columns in this table that hold the foreign key values.

lookupSchema string

The schema containing the referenced table.

lookupTable string

The name of the referenced table.

lookupColumns IEnumerable<string>

The columns in the referenced table.

deleteRule ForeignKeyRuleType

The rule applied when the referenced row is deleted.

updateRule ForeignKeyRuleType

The rule applied when the referenced key is updated.

Returns

ForeignKey

The newly created ForeignKey.