001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.*; 004import gudusoft.gsqlparser.stmt.TShowStmt; 005 006import java.util.ArrayList; 007 008 009public class TDummy extends TParseTreeNode { 010 public EDbVendor dbvendor; 011 public int int1 = 0; 012 public int int2 = 0; 013 public TSourceToken st1 = null; 014 public TSourceToken st2 = null; 015 public TSourceToken st3 = null; 016 public TParseTreeNode node1 = null; 017 public TParseTreeNode node2 = null; 018 public TParseTreeNode node3 = null; 019 public TParseTreeNodeList list1 = null; 020 public TParseTreeNodeList list2 = null; 021 public EDbObjectType objectType = EDbObjectType.table; 022 public EIndexType indexType; 023 public EJoinType joinType; 024 public ESortType sortType; 025 public ETableKind tableKind; 026 public TObjectNameList objectNameList; 027 public TPTNodeList<TObjectNameList> objectNameListTPTNodeList; 028 public ELockMode lockMode; 029 public ArrayList<TCreateTableOption> tableOptions; 030 public TShowStmt.EShowType showType; 031 public ArrayList arrayList1 = null; 032 public ArrayList<TSourceToken> tokens = new ArrayList<>(); 033 public void addTokens(ArrayList<TSourceToken> tokens){ 034 this.tokens.addAll(tokens); 035 } 036 037 /* 038 * used in sql server yacc rule file, when use TDummy to represent statements 039 * like commit,go and etc, this property to determine which kind of statement this 040 * dummy node represents for. 041 */ 042 public ESqlStatementType sqlstatementtype = ESqlStatementType.sstunknown; 043 044 045 public void init(Object arg1) 046 { 047 if (arg1 instanceof TParseTreeNodeList){ 048 list1 = (TParseTreeNodeList)arg1; 049 }else if (arg1 instanceof TSourceToken){ 050 st1 = (TSourceToken)arg1; 051 }else if (arg1 instanceof TConstant){ 052 node1 = (TConstant)arg1; 053 }else if (arg1 instanceof TParseTreeNode){ 054 node1 = (TParseTreeNode)arg1; 055 }else if (arg1 instanceof ArrayList){ 056 arrayList1 = (ArrayList) arg1; 057 } 058 } 059 060}