Table of Contents

Class TColumnDefinition

Namespace
gudusoft.gsqlparser.nodes
Assembly
gudusoft.gsqlparser.dll

Define the characteristics of the column in create table.

public class TColumnDefinition : TParseTreeNode, Visitable
Inheritance
TColumnDefinition
Implements
Inherited Members

Constructors

TColumnDefinition()

public TColumnDefinition()

TColumnDefinition(TObjectName)

public TColumnDefinition(TObjectName columnName)

Parameters

columnName TObjectName

Properties

CollationName

public virtual string CollationName { get; set; }

Property Value

string

ColumnAttributes

public virtual TColumnAttributes ColumnAttributes { get; set; }

Property Value

TColumnAttributes

ColumnName

public virtual TObjectName ColumnName { get; set; }

Property Value

TObjectName

the name of a column of the table.

Comment

public virtual TObjectName Comment { get; set; }

Property Value

TObjectName

ComputedColumnExpression

public virtual TExpression ComputedColumnExpression { get; set; }

Property Value

TExpression

Constraints

public virtual TConstraintList Constraints { get; set; }

Property Value

TConstraintList

Datatype

public virtual TTypeName Datatype { get; set; }

Property Value

TTypeName

DefaultExpression

public virtual TExpression DefaultExpression { get; set; }

Property Value

TExpression

Encoding

public virtual string Encoding { get; set; }

Property Value

string

Identity

public virtual bool Identity { get; set; }

Property Value

bool

IdentityClause

public TIdentityClause IdentityClause { get; set; }

Property Value

TIdentityClause

Increment

public virtual TExpression Increment { get; set; }

Property Value

TExpression

Null

Indicate whether NULL keyword is appeared in the column definition. For this column, this property will return true. CREATE TABLE t1 ( c1 INT NULL )

For this column, this property will return false. CREATE TABLE t1 ( c1 INT )

Use Constraints to check NOT NULL constraint of this column.

CREATE TABLE t2 (
                         c2 INT NOT NULL
                     );

Assert.IsTrue(columnDefinition.Constraints.getConstraint(0).Constraint_type == EConstraintType.notnull);

public virtual bool Null { get; set; }

Property Value

bool

RowGuidCol

public virtual bool RowGuidCol { get; set; }

Property Value

bool

Seed

public virtual TExpression Seed { get; set; }

Property Value

TExpression

calculatedExpr

public TExpression calculatedExpr { get; set; }

Property Value

TExpression

columnComment

public TConstant columnComment { get; set; }

Property Value

TConstant

columnFormat

public EColumnFormat columnFormat { get; set; }

Property Value

EColumnFormat

columnStorage

public EColumnStorage columnStorage { get; set; }

Property Value

EColumnStorage

filestream

public bool filestream { get; set; }

Property Value

bool

generatedColumnStoreType

public EGeneratedColumnStoreType generatedColumnStoreType { get; set; }

Property Value

EGeneratedColumnStoreType

onNull

public bool onNull { get; set; }

Property Value

bool

persistedColumn

public bool persistedColumn { get; set; }

Property Value

bool

sparseColumn

public bool sparseColumn { get; set; }

Property Value

bool

Methods

accept(TParseTreeVisitor)

public override void accept(TParseTreeVisitor v)

Parameters

v TParseTreeVisitor

acceptChildren(TParseTreeVisitor)

public override void acceptChildren(TParseTreeVisitor v)

Parameters

v TParseTreeVisitor

addNewConstraint(TConstraint)

public virtual void addNewConstraint(TConstraint pConstraint)

Parameters

pConstraint TConstraint

doParse(TCustomSqlStatement, ESqlClause)

analyze this node

public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)

Parameters

psql TCustomSqlStatement
plocation ESqlClause

init(object)

Initialize a query tree node.

public override void init(object arg1)

Parameters

arg1 object

init(object, object)

public override void init(object arg1, object arg2)

Parameters

arg1 object
arg2 object

init(object, object, object)

public override void init(object arg1, object arg2, object arg3)

Parameters

arg1 object
arg2 object
arg3 object

setDefaultExpression(TExpression)

public void setDefaultExpression(TExpression e)

Parameters

e TExpression

setGeneratedColumnStoreType(TSourceToken)

public void setGeneratedColumnStoreType(TSourceToken st)

Parameters

st TSourceToken

setNull(bool)

public void setNull(bool b)

Parameters

b bool