sqlparser/statements.cpp
// In Oracle procedure name, in DB2 label name can be specified after outer END
In Oracle procedure name, in DB2 label name can be specified after outer END
In Oracle procedure name in DB2 label name can be specified after outer END
bool SqlParser::ParseSplEndName(Token *name, Token * )
{
	if(name == NULL)
		return false;
	bool exists = false;
	Token *next = GetNextToken();
	if(next == NULL)
		return false;
	if(CompareIdentifiersExistingParts(name, next) == true)
	{
		if(Target(SQL_SQL_SERVER, SQL_MARIADB, SQL_MYSQL, SQL_POSTGRESQL) || _target_app == APP_JAVA)
			Token::Remove(next);
		exists = true;
	}
	else
	if(_spl_outer_label != NULL && Token::Compare(_spl_outer_label, next, _spl_outer_label->len-1) == true)
	{
		if(_target != SQL_DB2)
			Token::Remove(next);
		exists = true;
	}
	else
		PushBack(next);
	return exists;
}
bool SqlParser :: ParseSplEndName ( Token * name , Token * ) { if ( name == NULL ) return false ; bool exists = false ; Token * next = GetNextToken ( ) ; if ( next == NULL ) return false ; if ( CompareIdentifiersExistingParts ( name , next ) == true ) { if ( Target ( SQL_SQL_SERVER , SQL_MARIADB , SQL_MYSQL , SQL_POSTGRESQL ) || _target_app == APP_JAVA ) Token :: Remove ( next ) ; exists = true ; } else if ( _spl_outer_label != NULL && Token :: Compare ( _spl_outer_label , next , _spl_outer_label -> len - 1 ) == true ) { if ( _target != SQL_DB2 ) Token :: Remove ( next ) ; exists = true ; } else PushBack ( next ) ; return exists ; }
In Oracle procedure name, in DB2 label name can be specified after outer END
In Oracle procedure name in DB2 label name can be specified after outer END
/*end*/ // Compare with procedure name, here it can be specified without schema name, or one can be quoted // another unquoted // Compare with label name, label is without : here // Remove for other databases