sqldata/sqldata.cpp
// Get primary or unique key columns
Get primary or unique key columns
Get primary or unique key columns
void SqlData::GetKeyConstraintColumns(SqlMetaTask &task, SqlConstraints &cns, std::string &cols)
{
	std::list<std::string> lcols;
	_db.GetKeyConstraintColumns(SQLDB_SOURCE_ONLY, cns, lcols);
	int c = 0;
	for(std::list<std::string>::iterator i = lcols.begin(); i != lcols.end(); i++)
	{
		if(c > 0)
			cols += ", ";
		std::string column;
		std::string type;
		_db.MapColumn(task.s_name.c_str(), (*i).c_str(), column, type);
		cols += column;
		c++;
	}
}
void SqlData :: GetKeyConstraintColumns ( SqlMetaTask & task , SqlConstraints & cns , std :: string & cols ) { std :: list < std :: string > lcols ; _db . GetKeyConstraintColumns ( SQLDB_SOURCE_ONLY , cns , lcols ) ; int c = 0 ; for ( std :: list < std :: string > :: iterator i = lcols . begin ( ) ; i != lcols . end ( ) ; i ++ ) { if ( c > 0 ) cols += " " ; std :: string column ; std :: string type ; _db . MapColumn ( task . s_name . c_str ( ) , ( * i ) . c_str ( ) , column , type ) ; cols += column ; c ++ ; } }
Get primary or unique key columns
Get primary or unique key columns