gudusoft.gsqlparser.nodes
Class TColumnDefinition

java.lang.Object
  extended by gudusoft.gsqlparser.nodes.TParseTreeNode
      extended by gudusoft.gsqlparser.nodes.TColumnDefinition
All Implemented Interfaces:
Visitable

public class TColumnDefinition
extends TParseTreeNode

Define the characteristics of the column.


Constructor Summary
TColumnDefinition()
           
TColumnDefinition(TObjectName columnName)
           
 
Method Summary
 void accept(TParseTreeVisitor v)
           
 void doParse(TCustomSqlStatement psql, ESqlClause plocation)
          analyze this node
 java.lang.String getCollationName()
           
 TObjectName getColumnName()
           
 TExpression getComputedColumnExpression()
           
 TConstraintList getConstraints()
           
 TTypeName getDatatype()
          When create table by using a subquery, then you can omit column and datatype unless you are creating an index-organized table.
 TExpression getDefaultExpression()
          The DEFAULT clause lets you specify a value to be assigned to the column if a subsequent INSERT statement omits a value for the column.
 TExpression getIncrement()
           
 TExpression getSeed()
           
 void init(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
           
 boolean isIdentity()
           
 boolean isNull()
           
 boolean isRowGuidCol()
           
 void setCollationName(java.lang.String collationName)
           
 void setComputedColumnExpression(TExpression computedColumnExpression)
           
 void setDefaultExpression(TExpression defaultExpression)
           
 void setNull(boolean aNull)
           
 
Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, init, setDummyTag, setEndToken, setEndToken, setGsqlparser, setNodeType, setStartToken, setStartToken, setString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TColumnDefinition

public TColumnDefinition()

TColumnDefinition

public TColumnDefinition(TObjectName columnName)
Method Detail

init

public void init(java.lang.Object arg1,
                 java.lang.Object arg2,
                 java.lang.Object arg3)
Overrides:
init in class TParseTreeNode

getColumnName

public TObjectName getColumnName()
Returns:
the name of a column of the table.

getDatatype

public TTypeName getDatatype()
When create table by using a subquery, then you can omit column and datatype unless you are creating an index-organized table.

If you specify AS subquery when creating an index-organized table, then you must specify column, and you must omit datatype.

So datetype can be null.

Returns:
the datatype of a column.

getConstraints

public TConstraintList getConstraints()
Returns:
constraint list of this column if any.

setDefaultExpression

public void setDefaultExpression(TExpression defaultExpression)

getDefaultExpression

public TExpression getDefaultExpression()
The DEFAULT clause lets you specify a value to be assigned to the column if a subsequent INSERT statement omits a value for the column.

Returns:
The DEFAULT expression can include any SQL function as long as the function does not return a literal argument, a column reference, or a nested function invocation.

setNull

public void setNull(boolean aNull)

isNull

public boolean isNull()

isRowGuidCol

public boolean isRowGuidCol()
Returns:
SQL Server ROWGUIDCOL

accept

public void accept(TParseTreeVisitor v)
Specified by:
accept in interface Visitable
Overrides:
accept in class TParseTreeNode

setCollationName

public void setCollationName(java.lang.String collationName)

getCollationName

public java.lang.String getCollationName()

getIncrement

public TExpression getIncrement()

getSeed

public TExpression getSeed()

isIdentity

public boolean isIdentity()
Returns:
is identity column of sql server.

setComputedColumnExpression

public void setComputedColumnExpression(TExpression computedColumnExpression)

getComputedColumnExpression

public TExpression getComputedColumnExpression()
Returns:
computed_column_expression of sql server.

doParse

public void doParse(TCustomSqlStatement psql,
                    ESqlClause plocation)
Description copied from class: TParseTreeNode
analyze this node

Overrides:
doParse in class TParseTreeNode