gudusoft.gsqlparser.nodes
Class TAlterTableOption

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

public class TAlterTableOption
extends TParseTreeNode


Constructor Summary
TAlterTableOption()
           
 
Method Summary
 void doParse(TCustomSqlStatement psql, ESqlClause plocation)
          analyze this node
 TColumnDefinitionList getColumnDefinitionList()
          List of TColumnDefinitionList, valid when getOptionType() is:
 TObjectName getColumnName()
          valid when getOptionType() is:
 TObjectNameList getColumnNameList()
          List of TObjectNameList, valid when getOptionType() is:
 TConstraintList getConstraintList()
          List of TConstraint, valid when getOptionType() is:
 TObjectName getConstraintName()
          valid when getOptionType() is:
 TMySQLIndexStorageType getMySQLIndexStorageType()
           
 TSourceToken getMySQLIndexTypeToken()
           
 TObjectName getNewColumnName()
          valid when getOptionType() is:
 TObjectName getNewConstraintName()
          valid when getOptionType() is:
 TObjectName getNewTableName()
           
 EAlterTableOptionType getOptionType()
           
 TObjectNameList getReferencedColumnList()
           
 TObjectName getReferencedObjectName()
           
 void init(java.lang.Object arg1)
          Initialize a query tree node.
 void init(java.lang.Object arg1, java.lang.Object arg2)
           
 void setColumnName(TObjectName columnName)
           
 void setConstraintName(TDummy pName)
           
 void setConstraintName(TObjectName constraintName)
           
 void setMySQLIndexStorageType(TMySQLIndexStorageType mySQLIndexStorageType)
           
 void setMySQLIndexTypeToken(TSourceToken mySQLIndexTypeToken)
           
 void setNewConstraintName(TObjectName newConstraintName)
           
 void setNewTableName(TObjectName newTableName)
          table name in alter table tablename rename to newtablename
 void setOptionType(EAlterTableOptionType optionType)
           
 void setReferencedColumnList(TObjectNameList referencedColumnList)
           
 void setReferencedObjectName(TObjectName referencedObjectName)
           
 
Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
accept, addAllMyTokensToTokenList, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, 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

TAlterTableOption

public TAlterTableOption()
Method Detail

getOptionType

public EAlterTableOptionType getOptionType()

setOptionType

public void setOptionType(EAlterTableOptionType optionType)

setMySQLIndexTypeToken

public void setMySQLIndexTypeToken(TSourceToken mySQLIndexTypeToken)

getMySQLIndexTypeToken

public TSourceToken getMySQLIndexTypeToken()

setMySQLIndexStorageType

public void setMySQLIndexStorageType(TMySQLIndexStorageType mySQLIndexStorageType)

getMySQLIndexStorageType

public TMySQLIndexStorageType getMySQLIndexStorageType()

setNewTableName

public void setNewTableName(TObjectName newTableName)
table name in alter table tablename rename to newtablename

Parameters:
newTableName -

getNewTableName

public TObjectName getNewTableName()

setReferencedColumnList

public void setReferencedColumnList(TObjectNameList referencedColumnList)

setReferencedObjectName

public void setReferencedObjectName(TObjectName referencedObjectName)

setColumnName

public void setColumnName(TObjectName columnName)

getConstraintList

public TConstraintList getConstraintList()
List of TConstraint, valid when getOptionType() is:

EAlterTableOptionType.AddConstraint

Returns:

getColumnNameList

public TObjectNameList getColumnNameList()
List of TObjectNameList, valid when getOptionType() is:

EAlterTableOptionType.SetUnUsedColumn

EAlterTableOptionType.AddConstraintIndex, columns of an index

EAlterTableOptionType.AddConstraintPK, columns of primary key

EAlterTableOptionType.AddConstraintUnique, columns of unique key

EAlterTableOptionType.AddConstraintFK, columns of foreign key

EAlterTableOptionType.DropConstraintUnique, available in Oracle

Returns:

getColumnDefinitionList

public TColumnDefinitionList getColumnDefinitionList()
List of TColumnDefinitionList, valid when getOptionType() is:

EAlterTableOptionType.AddColumn

EAlterTableOptionType.ModifyColumn

EAlterTableOptionType.ChangeColumn

Returns:

getColumnName

public TObjectName getColumnName()
valid when getOptionType() is:

EAlterTableOptionType.AlterColumn

EAlterTableOptionType.DropColumn

EAlterTableOptionType.RenameColumn

EAlterTableOptionType.ChangeColumn

EAlterTableOptionType.RenameTable, table name

EAlterTableOptionType.AddConstraintIndex, index name, optional

Returns:

getConstraintName

public TObjectName getConstraintName()
valid when getOptionType() is:

EAlterTableOptionType.AddConstraintPK, optional

EAlterTableOptionType.AddConstraintUnique, optional

EAlterTableOptionType.AddConstraintFK, optional

EAlterTableOptionType.ModifyConstraint

EAlterTableOptionType.RenameConstraint

EAlterTableOptionType.DropConstraint

EAlterTableOptionType.DropConstraintFK

EAlterTableOptionType.DropConstraintUnique, available in DB2

EAlterTableOptionType.DropConstraintCheck, available in DB2

EAlterTableOptionType.DropConstraintIndex, available in DB2

EAlterTableOptionType.DropConstraintKey, available in DB2

EAlterTableOptionType.AlterConstraintFK, available in DB2

EAlterTableOptionType.AlterConstraintCheck, available in DB2

Returns:

getNewColumnName

public TObjectName getNewColumnName()
valid when getOptionType() is:

EAlterTableOptionType.RenameColumn

Returns:

getNewConstraintName

public TObjectName getNewConstraintName()
valid when getOptionType() is:

EAlterTableOptionType.RenameConstraint

Returns:

getReferencedColumnList

public TObjectNameList getReferencedColumnList()

getReferencedObjectName

public TObjectName getReferencedObjectName()

init

public void init(java.lang.Object arg1)
Description copied from class: TParseTreeNode
Initialize a query tree node.

Overrides:
init in class TParseTreeNode

setNewConstraintName

public void setNewConstraintName(TObjectName newConstraintName)

setConstraintName

public void setConstraintName(TDummy pName)

setConstraintName

public void setConstraintName(TObjectName constraintName)

init

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

doParse

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

Overrides:
doParse in class TParseTreeNode