Show / Hide Table of Contents

# Class DbColumnWrapper

Wrapper around a DbColumn, which provides extra functionality, but can be used as a regular DbColumn

##### Inheritance

System.Object
System.Data.Common.DbColumn
DbColumnWrapper

##### Inherited Members

System.Data.Common.DbColumn.BaseSchemaName
System.Data.Common.DbColumn.Item[System.String]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace:Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts

###### Assembly:Microsoft.SqlTools.ServiceLayer.dll

##### Syntax

    public class DbColumnWrapper : DbColumn

### Constructors

| Improve this Doc View Source

#### DbColumnWrapper()

Default constructor, used for deserializing JSON RPC only

##### Declaration

    public DbColumnWrapper()

| Improve this Doc View Source

#### DbColumnWrapper(DbColumn)

Constructor for a DbColumnWrapper

##### Declaration

    public DbColumnWrapper(DbColumn column)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Data.Common.DbColumn | column | The column we're wrapping around

##### Remarks

Most of this logic is taken from SSMS ColumnInfo class

### Properties

| Improve this Doc View Source

#### AllowDBNull

##### Declaration

    public bool ? AllowDBNull { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### BaseCatalogName

##### Declaration

    public string BaseCatalogName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### BaseColumnName

##### Declaration

    public string BaseColumnName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### BaseServerName

##### Declaration

    public string BaseServerName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### BaseTableName

##### Declaration

    public string BaseTableName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ColumnName

Override for column name, if null or empty, we default to a "no column name" value

##### Declaration

    public string ColumnName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### ColumnOrdinal

##### Declaration

    public int ? ColumnOrdinal { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Int32> |

| Improve this Doc View Source

#### ColumnSize

##### Declaration

    public int ? ColumnSize { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Int32> |

| Improve this Doc View Source

#### DataType

##### Declaration

    public Type DataType { get; }

##### Property Value

Type | Description
--- | ---
System.Type |

| Improve this Doc View Source

#### DataTypeName

##### Declaration

    public string DataTypeName { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### IsAliased

##### Declaration

    public bool ? IsAliased { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsAutoIncrement

##### Declaration

    public bool ? IsAutoIncrement { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsBytes

Whether or not the column is bytes

##### Declaration

    public bool IsBytes { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsChars

Whether or not the column is a character type

##### Declaration

    public bool IsChars { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsExpression

##### Declaration

    public bool ? IsExpression { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsHidden

##### Declaration

    public bool ? IsHidden { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsIdentity

##### Declaration

    public bool ? IsIdentity { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsJson

Whether or not the column is JSON

##### Declaration

    public bool IsJson { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsKey

##### Declaration

    public bool ? IsKey { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsLong

Whether or not the column is a long type (eg, varchar(MAX))

##### Declaration

    public bool IsLong { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsReadOnly

##### Declaration

    public bool ? IsReadOnly { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsSqlVariant

Whether or not the column is a SqlVariant type

##### Declaration

    public bool IsSqlVariant { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsUdt

Whether or not the column is a user-defined type

##### Declaration

    public bool IsUdt { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsUnique

##### Declaration

    public bool ? IsUnique { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Boolean> |

| Improve this Doc View Source

#### IsXml

Whether or not the column is XML

##### Declaration

    public bool IsXml { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### NumericPrecision

##### Declaration

    public int ? NumericPrecision { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Int32> |

| Improve this Doc View Source

#### NumericScale

##### Declaration

    public int ? NumericScale { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Int32> |

| Improve this Doc View Source

#### UdtAssemblyQualifiedName

##### Declaration

    public string UdtAssemblyQualifiedName { get; }

##### Property Value

Type | Description
--- | ---
System.String |