sqlparser/language.cpp
// AND or OR in boolean expression
AND or OR in boolean expression
AND or OR in boolean expression
bool SqlParser::ParseBooleanAndOr(int scope, Token *stmt_start, int *conditions_count, int *rowlimit)
{
	bool exists = false;
	while(true)
	{
		Token *next = GetNextToken();
		if(next == NULL)
			break;
		if(Token::Compare(next, "AND", L"AND", 3) == false && Token::Compare(next, "OR", L"OR", 2) == false)
		{
			PushBack(next);
			break;
		}
		if(scope == SQL_BOOL_CONNECT_BY)
			TOKEN_GETNEXTW("PRIOR");
		int count = 0;
		ParseBooleanExpression(scope, stmt_start, &count, rowlimit);
		if(conditions_count != NULL)
			*conditions_count = (*conditions_count + count);
		exists = true;
	}
	return exists;
}
bool SqlParser :: ParseBooleanAndOr ( int scope , Token * stmt_start , int * conditions_count , int * rowlimit ) { bool exists = false ; while ( true ) { Token * next = GetNextToken ( ) ; if ( next == NULL ) break ; if ( Token :: Compare ( next , " " , L" " , 3 ) == false && Token :: Compare ( next , " " , L" " , 2 ) == false ) { PushBack ( next ) ; break ; } if ( scope == SQL_BOOL_CONNECT_BY ) TOKEN_GETNEXTW ( " " ) ; int count = 0 ; ParseBooleanExpression ( scope , stmt_start , & count , rowlimit ) ; if ( conditions_count != NULL ) * conditions_count = ( * conditions_count + count ) ; exists = true ; } return exists ; }
AND or OR in boolean expression
AND or OR in boolean expression
// Possible AND or OR  // Option PRIOR before next condition in CONNECT BY // Process recursively