예제 #1
0
 public void Remove(SelectColumn value)
 {
     List.Remove(value);
 }
예제 #2
0
 public bool Contains(SelectColumn value)
 {
     return List.Contains(value);
 }
예제 #3
0
 public int IndexOf(SelectColumn value)
 {
     return List.IndexOf(value);
 }
예제 #4
0
 public void Insert(int index, SelectColumn value)
 {
     List.Insert(index, value);
 }
예제 #5
0
 public bool Contains(SelectColumn value)
 {
     return(List.Contains(value));
 }
예제 #6
0
 public int Add(SelectColumn value)
 {
     return List.Add(value);
 }
예제 #7
0
 public void Insert(int index, SelectColumn value)
 {
     List.Insert(index, value);
 }
예제 #8
0
 public void Remove(SelectColumn value)
 {
     List.Remove(value);
 }
예제 #9
0
 public int IndexOf(SelectColumn value)
 {
     return(List.IndexOf(value));
 }
예제 #10
0
 public int Add(SelectColumn value)
 {
     return(List.Add(value));
 }
예제 #11
0
	public SelectColumn  derived_column() //throws RecognitionException, TokenStreamException
{
		SelectColumn selectColumn = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST derived_column_AST = null;
		
			selectColumn = new SelectColumn();
			IExpression expression = null;
			string columnName = null;
		
		
		expression=value_exp();
		if (0 == inputState.guessing)
		{
			astFactory.addASTChild(ref currentAST, returnAST);
		}
		if (0==inputState.guessing)
		{
			selectColumn.Expression = expression;
		}
		{
			if ((LA(1)==SQL2RW_as))
			{
				AST tmp64_AST = null;
				tmp64_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp64_AST);
				match(SQL2RW_as);
				columnName=column_name();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				if (0==inputState.guessing)
				{
					selectColumn.Alias = columnName;
				}
			}
			else if ((LA(1)==SQL2RW_from||LA(1)==SQL2RW_into||LA(1)==COMMA)) {
			}
			else
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			
		}
		derived_column_AST = currentAST.root;
		returnAST = derived_column_AST;
		return selectColumn;
	}
예제 #12
0
	public SelectColumn  select_sublist() //throws RecognitionException, TokenStreamException
{
		SelectColumn selectColumn = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST select_sublist_AST = null;
		
			string tableName;
		
		
		bool synPredMatched162 = false;
		if (((LA(1)==SQL2NRW_ada||LA(1)==SQL2RW_module||LA(1)==REGULAR_ID||LA(1)==DELIMITED_ID||LA(1)==INTRODUCER) && (LA(2)==SQL2NRW_ada||LA(2)==PERIOD||LA(2)==REGULAR_ID||LA(2)==DELIMITED_ID||LA(2)==INTRODUCER)))
		{
			int _m162 = mark();
			synPredMatched162 = true;
			inputState.guessing++;
			try {
				{
					table_name();
					match(PERIOD);
					match(ASTERISK);
				}
			}
			catch (RecognitionException)
			{
				synPredMatched162 = false;
			}
			rewind(_m162);
			inputState.guessing--;
		}
		if ( synPredMatched162 )
		{
			tableName=table_name();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp62_AST = null;
			tmp62_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp62_AST);
			match(PERIOD);
			AST tmp63_AST = null;
			tmp63_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp63_AST);
			match(ASTERISK);
			if (0==inputState.guessing)
			{
				
							selectColumn = new SelectColumn();
							tableName = ".*";
							selectColumn.Name = tableName;
						
			}
			select_sublist_AST = currentAST.root;
		}
		else if ((tokenSet_9_.member(LA(1))) && (tokenSet_13_.member(LA(2)))) {
			selectColumn=derived_column();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			select_sublist_AST = currentAST.root;
		}
		else
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = select_sublist_AST;
		return selectColumn;
	}
예제 #13
0
	public SelectColumnCollection  select_list() //throws RecognitionException, TokenStreamException
{
		SelectColumnCollection selectColumnCollection;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST select_list_AST = null;
		
			selectColumnCollection = new SelectColumnCollection();
			SelectColumn selectColumn = null;
		
		
		if ((LA(1)==ASTERISK))
		{
			AST tmp60_AST = null;
			tmp60_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp60_AST);
			match(ASTERISK);
			if (0==inputState.guessing)
			{
				
						selectColumn = new SelectColumn();
						selectColumn.Name = "*";
						selectColumn.Alias = "*";
						selectColumnCollection.Add(selectColumn);
					
			}
			select_list_AST = currentAST.root;
		}
		else if ((tokenSet_12_.member(LA(1)))) {
			selectColumn=select_sublist();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			if (0==inputState.guessing)
			{
				selectColumnCollection.Add(selectColumn);
			}
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==COMMA))
					{
						AST tmp61_AST = null;
						tmp61_AST = astFactory.create(LT(1));
						astFactory.addASTChild(ref currentAST, tmp61_AST);
						match(COMMA);
						selectColumn=select_sublist();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
						if (0==inputState.guessing)
						{
							selectColumnCollection.Add(selectColumn);
						}
					}
					else
					{
						goto _loop159_breakloop;
					}
					
				}
_loop159_breakloop:				;
			}    // ( ... )*
			select_list_AST = currentAST.root;
		}
		else
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		returnAST = select_list_AST;
		return selectColumnCollection;
	}