Table of Contents

Class SqlColumn

Namespace
LfrlAnvil.Sql.Objects
Assembly
LfrlAnvil.Sql.Core.dll

Represents an SQL table column.

public abstract class SqlColumn : SqlObject, ISqlColumn, ISqlObject
Inheritance
SqlColumn
Implements
Derived
Inherited Members

Constructors

SqlColumn(SqlTable, SqlColumnBuilder)

Creates a new SqlColumn instance.

protected SqlColumn(SqlTable table, SqlColumnBuilder builder)

Parameters

table SqlTable

Table that this column belongs to.

builder SqlColumnBuilder

Source builder.

Properties

ComputationStorage

Specifies the type of storage for this column's computation or null when this column is not computed.

public SqlColumnComputationStorage? ComputationStorage { get; }

Property Value

SqlColumnComputationStorage?

HasDefaultValue

Specifies whether or not this column has a default value.

public bool HasDefaultValue { get; }

Property Value

bool

IsNullable

Specifies whether or not this column accepts null values.

public bool IsNullable { get; }

Property Value

bool

Node

Underlying SqlColumnNode instance that represents this column.

public SqlColumnNode Node { get; }

Property Value

SqlColumnNode

Table

Table that this column belongs to.

public SqlTable Table { get; }

Property Value

SqlTable

TypeDefinition

ISqlColumnTypeDefinition instance that defines the data type of this column.

public SqlColumnTypeDefinition TypeDefinition { get; }

Property Value

SqlColumnTypeDefinition

Methods

Asc()

Creates a new SqlOrderByNode instance from this column with Asc ordering.

[Pure]
public SqlOrderByNode Asc()

Returns

SqlOrderByNode

New SqlOrderByNode instance.

Desc()

Creates a new SqlOrderByNode instance from this column with Desc ordering.

[Pure]
public SqlOrderByNode Desc()

Returns

SqlOrderByNode

New SqlOrderByNode instance.

ToString()

Returns a string representation of this SqlColumn instance.

[Pure]
public override string ToString()

Returns

string

String representation.