sqlparser/language.cpp
// %ROWTYPE record variable reference rec.field 
%ROWTYPE record variable reference rec.field
%ROWTYPE record variable reference rec . field
bool SqlParser::ConvertRecordVariable(Token *token)
{
	if(token == NULL)
		return false;
	bool exists = false;
	ListwItem *item = _spl_rowtype_vars.GetFirst();
	while(item != NULL)
	{
		Token *rec = (Token*)item->value;
		if(rec != NULL && Token::Compare(rec, token, rec->len) == true && 
			token->Compare(".", L".", rec->len, 1) == true)
		{
			if(Target(SQL_SQL_SERVER, SQL_MARIADB, SQL_MYSQL) == true)
			{
				TokenStr ident;
				if(_target == SQL_SQL_SERVER)
					ident.Append("@", L"@", 1);
				ident.Append(token, 0, rec->len);
				ident.Append("_", L"_", 1);
				ident.Append(token, rec->len + 1, token->len - rec->len - 1);
				Token::ChangeNoFormat(token, ident);
			}
			if(Find(_spl_rowtype_fields, rec, token) == NULL)
				_spl_rowtype_fields.Add(rec, token);
			exists = true;
			break;
		}
		item = item->next;
	}
	return exists;
}
bool SqlParser :: ConvertRecordVariable ( Token * token ) { if ( token == NULL ) return false ; bool exists = false ; ListwItem * item = _spl_rowtype_vars . GetFirst ( ) ; while ( item != NULL ) { Token * rec = ( Token * ) item -> value ; if ( rec != NULL && Token :: Compare ( rec , token , rec -> len ) == true && token -> Compare ( " " , L" " , rec -> len , 1 ) == true ) { if ( Target ( SQL_SQL_SERVER , SQL_MARIADB , SQL_MYSQL ) == true ) { TokenStr ident ; if ( _target == SQL_SQL_SERVER ) ident . Append ( " " , L" " , 1 ) ; ident . Append ( token , 0 , rec -> len ) ; ident . Append ( " " , L" " , 1 ) ; ident . Append ( token , rec -> len + 1 , token -> len - rec -> len - 1 ) ; Token :: ChangeNoFormat ( token , ident ) ; } if ( Find ( _spl_rowtype_fields , rec , token ) == NULL ) _spl_rowtype_fields . Add ( rec , token ) ; exists = true ; break ; } item = item -> next ; } return exists ; }
%ROWTYPE record variable reference rec.field
%ROWTYPE record variable reference rec . field
// Compare identifier prefix with existing record name // Check for rec. prefix // Change to @rec_field in SQL Server, rec_field in MySQL // Append record name _ and field name  // Save referenced record fields (once only)