sqldata/sqlifmxapi.cpp
// Get a list of columns for specified foreign key
Get a list of columns for specified foreign key
Get a list of columns for specified foreign key
int SqlIfmxApi::GetForeignKeyConstraintColumns(SqlConstraints &cns, std::list<std::string> &fcols, std::list<std::string> &pcols, 
												std::string &ptable)
{
	GetKeyConstraintColumns(cns, fcols);
	for(std::list<SqlConstraints>::iterator i = _table_constraints.begin(); i != _table_constraints.end(); i++)
	{
		if((*i).cnsid == cns.r_cnsid)
		{
			GetKeyConstraintColumns((*i), pcols);
			ptable = (*i).schema;
			ptable += ".";
			ptable += (*i).table;
			break;
		}
	}
	return 0;
}
int SqlIfmxApi :: GetForeignKeyConstraintColumns ( SqlConstraints & cns , std :: list < std :: string > & fcols , std :: list < std :: string > & pcols , std :: string & ptable ) { GetKeyConstraintColumns ( cns , fcols ) ; for ( std :: list < SqlConstraints > :: iterator i = _table_constraints . begin ( ) ; i != _table_constraints . end ( ) ; i ++ ) { if ( ( * i ) . cnsid == cns . r_cnsid ) { GetKeyConstraintColumns ( ( * i ) , pcols ) ; ptable = ( * i ) . schema ; ptable += " " ; ptable += ( * i ) . table ; break ; } } return 0 ; }
Get a list of columns for specified foreign key
Get a list of columns for specified foreign key
// In Informix, each foreign key creates an index, so we can find columns the same way as for primary key // Find constraint for primary key