sqlparser/informix.cpp
// Convert Informix RETURN statement expressions to OUT variable assignment 
Convert Informix RETURN statement expressions to OUT variable assignment
Convert Informix RETURN statement expressions to OUT variable assignment
void SqlParser::InformixReturnToAssignment(ListWM &return_list)
{
	ListwmItem *p =  _spl_returning_out_names.GetFirst();
	int cnum = 1;
	for(ListwmItem *i = return_list.GetFirst(); i != NULL; i = i->next)
	{
		Token *ret = (Token*)i->value;
		Token *comma = (Token*)i->value2;
		Token *param = (p != NULL) ? (Token*)p->value : NULL;
		TokenStr name;
		InformixGetReturningName(param, name, "p", L"p", 1, cnum, true);
		PrependNoFormat(ret, &name);
		PrependNoFormat(ret, " := ", L" := ", 4);
		Token::Change(comma, ";", L";", 1);
		if(p != NULL)
			p = p->next;
		cnum++;
	}
}
void SqlParser :: InformixReturnToAssignment ( ListWM & return_list ) { ListwmItem * p = _spl_returning_out_names . GetFirst ( ) ; int cnum = 1 ; for ( ListwmItem * i = return_list . GetFirst ( ) ; i != NULL ; i = i -> next ) { Token * ret = ( Token * ) i -> value ; Token * comma = ( Token * ) i -> value2 ; Token * param = ( p != NULL ) ? ( Token * ) p -> value : NULL ; TokenStr name ; InformixGetReturningName ( param , name , " " , L" " , 1 , cnum , true ) ; PrependNoFormat ( ret , & name ) ; PrependNoFormat ( ret , " " , L" " , 4 ) ; Token :: Change ( comma , " " , L" " , 1 ) ; if ( p != NULL ) p = p -> next ; cnum ++ ; } }
Convert Informix RETURN statement expressions to OUT variable assignment
Convert Informix RETURN statement expressions to OUT variable assignment
// Append parameter name and := before each RETURN expression // Define parameter name