Skip to content

DmColumnAlteration ​

Namespace: MJCZone.DapperMatic.Models

Assembly: MJCZone.DapperMatic

Summary ​

A change to an existing column that cannot lose data: a longer length, more precision without losing a digit, or allowing nulls.

sealed public

Contents ​

Constructors (1) | Methods (4) | Properties (4)

Constructors ​

DmColumnAlteration ​

Initializes a new instance of the DmColumnAlteration class.

csharp
DmColumnAlteration(
    string columnName,
    string sqlType,
    bool isNullable,
    String} changes)

Parameters ​

  • columnName (string) - The column to alter.
  • sqlType (string) - The column's data type after the change.
  • isNullable (bool) - Whether the column allows nulls after the change.
  • changes (String}) - What changes, in words, for example "length 50 to 200".

Methods ​

ToString ​

Returns a description of the alteration.

csharp
string ToString()

Returns ​

Type: string

A description of the alteration.

GetType ​

csharp
GetType()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

ColumnName ​

Gets the column to alter.

Type: string

SqlType ​

Gets the column's data type after the change, spelled the way the database reports it.

Type: string

IsNullable ​

Gets a value indicating whether the column allows nulls after the change.

Type: bool

Changes ​

Gets what changes, in words, for example "length 50 to 200".

Type: IReadOnlyList<string>