sqlparser/sqlserver.cpp
// SQL Server SET options, SET ANSI_NULLS ON i.e
SQL Server SET options, SET ANSI_NULLS ON i.e
SQL Server SET options SET ANSI_NULLS ON i . e
bool SqlParser::ParseSqlServerSetOptions(Token *set)
{
	if(set == NULL)
		return false;
	bool exists = false;
	bool comment = false;
	bool remove = false;
	Token *option = GetNextToken();
	if(option == NULL)
		return false;
	if(option->Compare("ANSI_NULLS", L"ANSI_NULLS", 10) == true)
	{
		 (void) GetNextToken();
		if(_target != SQL_SQL_SERVER)
			comment = true;
		exists = true;
	}
	else
	if(option->Compare("ANSI_PADDING", L"ANSI_PADDING", 12) == true)
	{
		 (void) GetNextToken();
		if(_target != SQL_SQL_SERVER)
			comment = true;
		exists = true;
	}
	else
	if(option->Compare("NOCOUNT", L"NOCOUNT", 7) == true)
	{
		 (void) GetNextToken();
		if(_target != SQL_SQL_SERVER)
			remove = true;
		exists = true;
	}
	else
	if(option->Compare("QUOTED_IDENTIFIER", L"QUOTED_IDENTIFIER", 17) == true)
	{
		 (void) GetNextToken();
		if(_target != SQL_SQL_SERVER)
			comment = true;
		exists = true;
	}
	else
		PushBack(option);
	if(exists == true)
	{
		Token *last = Nvl(GetNextCharToken(';', L';'), GetLastToken());
		if(comment == true)
			Comment(set, last);
		else
		if(remove == true)
			Token::Remove(set, last);
		SqlServerGoDelimiter(true);
	}
	return exists;
}
bool SqlParser :: ParseSqlServerSetOptions ( Token * set ) { if ( set == NULL ) return false ; bool exists = false ; bool comment = false ; bool remove = false ; Token * option = GetNextToken ( ) ; if ( option == NULL ) return false ; if ( option -> Compare ( " " , L" " , 10 ) == true ) { ( void ) GetNextToken ( ) ; if ( _target != SQL_SQL_SERVER ) comment = true ; exists = true ; } else if ( option -> Compare ( " " , L" " , 12 ) == true ) { ( void ) GetNextToken ( ) ; if ( _target != SQL_SQL_SERVER ) comment = true ; exists = true ; } else if ( option -> Compare ( " " , L" " , 7 ) == true ) { ( void ) GetNextToken ( ) ; if ( _target != SQL_SQL_SERVER ) remove = true ; exists = true ; } else if ( option -> Compare ( " " , L" " , 17 ) == true ) { ( void ) GetNextToken ( ) ; if ( _target != SQL_SQL_SERVER ) comment = true ; exists = true ; } else PushBack ( option ) ; if ( exists == true ) { Token * last = Nvl ( GetNextCharToken ( ' ' , L' ' ) , GetLastToken ( ) ) ; if ( comment == true ) Comment ( set , last ) ; else if ( remove == true ) Token :: Remove ( set , last ) ; SqlServerGoDelimiter ( true ) ; } return exists ; }
SQL Server SET options, SET ANSI_NULLS ON i.e
SQL Server SET options SET ANSI_NULLS ON i . e
// SET ANSI_NULLS ON | OFF /*Token *value */ // SET ANSI_PADDING ON | OFF /*Token *value */ // SET NOCOUNT ON | OFF /*Token *value */ // SET QUOTED_IDENTIFIER ON | OFF /*Token *value */ // Not a SET option // Remove following GO if any