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
columnNameTObjectName
Properties
CollationName
public virtual string CollationName { get; set; }
Property Value
ColumnAttributes
public virtual TColumnAttributes ColumnAttributes { get; set; }
Property Value
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
ComputedColumnExpression
public virtual TExpression ComputedColumnExpression { get; set; }
Property Value
Constraints
public virtual TConstraintList Constraints { get; set; }
Property Value
Datatype
public virtual TTypeName Datatype { get; set; }
Property Value
DefaultExpression
public virtual TExpression DefaultExpression { get; set; }
Property Value
Encoding
public virtual string Encoding { get; set; }
Property Value
Identity
public virtual bool Identity { get; set; }
Property Value
IdentityClause
public TIdentityClause IdentityClause { get; set; }
Property Value
Increment
public virtual TExpression Increment { get; set; }
Property Value
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
RowGuidCol
public virtual bool RowGuidCol { get; set; }
Property Value
Seed
public virtual TExpression Seed { get; set; }
Property Value
calculatedExpr
public TExpression calculatedExpr { get; set; }
Property Value
columnComment
public TConstant columnComment { get; set; }
Property Value
columnFormat
public EColumnFormat columnFormat { get; set; }
Property Value
columnStorage
public EColumnStorage columnStorage { get; set; }
Property Value
filestream
public bool filestream { get; set; }
Property Value
generatedColumnStoreType
public EGeneratedColumnStoreType generatedColumnStoreType { get; set; }
Property Value
onNull
public bool onNull { get; set; }
Property Value
persistedColumn
public bool persistedColumn { get; set; }
Property Value
sparseColumn
public bool sparseColumn { get; set; }
Property Value
Methods
accept(TParseTreeVisitor)
public override void accept(TParseTreeVisitor v)
Parameters
acceptChildren(TParseTreeVisitor)
public override void acceptChildren(TParseTreeVisitor v)
Parameters
addNewConstraint(TConstraint)
public virtual void addNewConstraint(TConstraint pConstraint)
Parameters
pConstraintTConstraint
doParse(TCustomSqlStatement, ESqlClause)
analyze this node
public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
Parameters
psqlTCustomSqlStatementplocationESqlClause
init(object)
Initialize a query tree node.
public override void init(object arg1)
Parameters
arg1object
init(object, object)
public override void init(object arg1, object arg2)
Parameters
init(object, object, object)
public override void init(object arg1, object arg2, object arg3)
Parameters
setDefaultExpression(TExpression)
public void setDefaultExpression(TExpression e)
Parameters
setGeneratedColumnStoreType(TSourceToken)
public void setGeneratedColumnStoreType(TSourceToken st)
Parameters
stTSourceToken
setNull(bool)
public void setNull(bool b)
Parameters
bbool