001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.ESqlClause; 004import gudusoft.gsqlparser.TCustomSqlStatement; 005 006/** 007 * SQL Server compute clause item 008 * 009 */ 010public class TComputeClauseItem extends TParseTreeNode { 011 private TPTNodeList<TComputeExpr> computerExprList = null; 012 private TExpressionList byExprlist = null; 013 014 public TPTNodeList<TComputeExpr> getComputerExprList() { 015 return computerExprList; 016 } 017 018 public TExpressionList getByExprlist() { 019 return byExprlist; 020 } 021 022 public void init(Object arg1,Object arg2) 023 { 024 if (arg1 != null){ 025 computerExprList = (TPTNodeList<TComputeExpr>)arg1; 026 } 027 028 if (arg2 != null){ 029 030 byExprlist = (TExpressionList)arg2; 031 } 032 } 033 034 public void doParse(TCustomSqlStatement psql, ESqlClause plocation){ 035 if (computerExprList != null){ 036 computerExprList.doParse(psql,plocation); 037 } 038 039 if (byExprlist != null){ 040 byExprlist.doParse(psql,plocation); 041 } 042 } 043 044 public void accept(TParseTreeVisitor v){ 045 v.preVisit(this); 046 v.postVisit(this); 047 } 048 049 public void acceptChildren(TParseTreeVisitor v){ 050 v.preVisit(this); 051 v.postVisit(this); 052 } 053 054 public void setComputerExprList(TPTNodeList<TComputeExpr> computerExprList) { 055 this.computerExprList = computerExprList; 056 } 057 058 public void setByExprlist(TExpressionList byExprlist) { 059 this.byExprlist = byExprlist; 060 } 061}