sqlparser/language.cpp
// Implicit record (cursor name) variable reference rec.field 
Implicit record (cursor name) variable reference rec.field
Implicit record ( cursor name ) variable reference rec . field
bool SqlParser::ConvertImplicitRecordVariable(Token *token)
{
	if(token == NULL)
		return false;
	bool exists = false;
	ListwmItem *item = _spl_implicit_rowtype_vars.GetFirst();
	while(item != NULL)
	{
		exists = ConvertImplicitRecordVariable(token, (Token*)item->value);
		if(exists)
			break;
		item = item->next;
	}
	if(!exists && Source(SQL_SYBASE_ADS) && _spl_current_declaring_cursor != NULL)
	{
		ListwItem *item = _spl_declared_cursors.GetFirst();
		while(item != NULL)
		{
			exists = ConvertImplicitRecordVariable(token, (Token*)item->value);
			if(exists)
			{
				_spl_current_declaring_cursor_uses_vars = true;
				break;
			}
			item = item->next;
		}
	}
	return exists;
}
bool SqlParser :: ConvertImplicitRecordVariable ( Token * token ) { if ( token == NULL ) return false ; bool exists = false ; ListwmItem * item = _spl_implicit_rowtype_vars . GetFirst ( ) ; while ( item != NULL ) { exists = ConvertImplicitRecordVariable ( token , ( Token * ) item -> value ) ; if ( exists ) break ; item = item -> next ; } if ( ! exists && Source ( SQL_SYBASE_ADS ) && _spl_current_declaring_cursor != NULL ) { ListwItem * item = _spl_declared_cursors . GetFirst ( ) ; while ( item != NULL ) { exists = ConvertImplicitRecordVariable ( token , ( Token * ) item -> value ) ; if ( exists ) { _spl_current_declaring_cursor_uses_vars = true ; break ; } item = item -> next ; } } return exists ; }
Implicit record (cursor name) variable reference rec.field
Implicit record ( cursor name ) variable reference rec . field
// Compare identifier prefix with existing record name // Sybase ADS allows referencing field of previously declared cursor in declaration of another cursor