sqlparser/functions.cpp
// IIF in SQL Server, Sybase ADS
IIF in SQL Server, Sybase ADS
IIF in SQL Server Sybase ADS
bool SqlParser::ParseFunctionIif(Token *name, Token * )
{
	if(name == NULL)
		return false;
	STATS_DECL
	ParseBooleanExpression(SQL_BOOL_IF_EXP);
	Token *comma = TOKEN_GETNEXT(',');
	if(comma == NULL)
		return false;
	Token *true_exp = GetNextToken();
	ParseExpression(true_exp);
	Token *comma2 = TOKEN_GETNEXT(',');
	if(comma2 == NULL)
		return false;
	Token *false_exp = GetNextToken();
	ParseExpression(false_exp);
	 (void) TOKEN_GETNEXT(')');	
	FUNC_STATS(name);
	return true;
}
bool SqlParser :: ParseFunctionIif ( Token * name , Token * ) { if ( name == NULL ) return false ; STATS_DECL ParseBooleanExpression ( SQL_BOOL_IF_EXP ) ; Token * comma = TOKEN_GETNEXT ( ' ' ) ; if ( comma == NULL ) return false ; Token * true_exp = GetNextToken ( ) ; ParseExpression ( true_exp ) ; Token * comma2 = TOKEN_GETNEXT ( ' ' ) ; if ( comma2 == NULL ) return false ; Token * false_exp = GetNextToken ( ) ; ParseExpression ( false_exp ) ; ( void ) TOKEN_GETNEXT ( ' ' ) ; FUNC_STATS ( name ) ; return true ; }
IIF in SQL Server, Sybase ADS
IIF in SQL Server Sybase ADS
/*open*/ // Parse the TRUE condition expression // Parse the FALSE condition expression /*Token *close */