Interface IColumn
Interface for column-oriented SQL fragment generation
Namespace: FluentMigrator.Runner.Generators
Assembly: FluentMigrator.Runner.Core.dll
Syntax
public interface IColumn
  Methods
| Edit this page View SourceFormatCascade(string, Rule)
Formats the foreign key cascading SQL fragment
Declaration
[NotNull]
string FormatCascade(string onWhat, Rule rule)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | onWhat | The action this cascade clause applies to (update or delete)  | 
      
| Rule | rule | The cascade rule  | 
      
Returns
| Type | Description | 
|---|---|
| string | The formatted SQL fragment  | 
      
FormatForeignKey(ForeignKeyDefinition, Func<ForeignKeyDefinition, string>)
Formats the foreign key SQL fragment optionally using a custom foreign key name generator
Declaration
[NotNull]
string FormatForeignKey(ForeignKeyDefinition foreignKey, Func<ForeignKeyDefinition, string> fkNameGeneration)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ForeignKeyDefinition | foreignKey | The foreign key definition  | 
      
| Func<ForeignKeyDefinition, string> | fkNameGeneration | The custom foreign key name generator  | 
      
Returns
| Type | Description | 
|---|---|
| string | The SQL fragment  | 
      
Generate(ColumnDefinition)
Generates the complete column definition SQL fragment
Declaration
[NotNull]
string Generate(ColumnDefinition column)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ColumnDefinition | column | The column definition  | 
      
Returns
| Type | Description | 
|---|---|
| string | The SQL fragment  | 
      
Generate(IEnumerable<ColumnDefinition>, string)
Generate the SQL fragment for all column definitions
Declaration
[NotNull]
string Generate(IEnumerable<ColumnDefinition> columns, string tableName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IEnumerable<ColumnDefinition> | columns | The column definitions  | 
      
| string | tableName | The table name  | 
      
Returns
| Type | Description | 
|---|---|
| string | The SQL fragment  | 
      
GenerateForeignKeyName(ForeignKeyDefinition)
Generates the default foreign key name
Declaration
[NotNull]
string GenerateForeignKeyName(ForeignKeyDefinition foreignKey)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ForeignKeyDefinition | foreignKey | The foreign key definition  | 
      
Returns
| Type | Description | 
|---|---|
| string | The SQL fragment  |