Class ColumnInfo
Contains metadata and details about a column in a database table.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Persistence.SqlSyntax
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ColumnInfo
Constructors
View SourceColumnInfo(string, string, int, bool, string)
Initializes a new instance of the ColumnInfo class with the specified table name, column name, ordinal position, nullability, and data type.
Declaration
public ColumnInfo(string tableName, string columnName, int ordinal, bool isNullable, string dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | The name of the table to which the column belongs. |
| string | columnName | The name of the column. |
| int | ordinal | The zero-based ordinal position of the column within the table. |
| bool | isNullable | A value indicating whether the column allows null values. |
| string | dataType | The data type of the column. |
ColumnInfo(string, string, int, string, string)
Initializes a new instance of the ColumnInfo class.
Declaration
public ColumnInfo(string tableName, string columnName, int ordinal, string isNullable, string dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | The name of the table that contains the column. |
| string | columnName | The name of the column. |
| int | ordinal | The zero-based ordinal position of the column within the table. |
| string | isNullable | A string indicating whether the column allows null values (e.g., "YES" or "NO"). |
| string | dataType | The data type of the column as defined in the database. |
ColumnInfo(string, string, int, string, string, string)
Initializes a new instance of the ColumnInfo class.
Declaration
public ColumnInfo(string tableName, string columnName, int ordinal, string columnDefault, string isNullable, string dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | The name of the table the column belongs to. |
| string | columnName | The name of the column. |
| int | ordinal | The ordinal position of the column in the table. |
| string | columnDefault | The default value of the column. |
| string | isNullable | Indicates whether the column allows null values. |
| string | dataType | The data type of the column. |
Properties
View SourceColumnDefault
Gets or sets the default value for the column.
Declaration
public string? ColumnDefault { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ColumnName
Gets or sets the name of the column.
Declaration
public string ColumnName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DataType
Gets or sets the database data type of the column.
Declaration
public string DataType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsNullable
Gets or sets a value indicating whether the column allows null values.
Declaration
public bool IsNullable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Ordinal
Gets or sets the ordinal position of the column.
Declaration
public int Ordinal { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TableName
Gets or sets the name of the table associated with the column.
Declaration
public string TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |