sqldata/sqldata.cpp
// For foreign key task check if the primary key was already created (already in critical session)
For foreign key task check if the primary key was already created (already in critical session)
For foreign key task check if the primary key was already created ( already in critical session )
bool SqlData::IsPrimaryKeyCreated(SqlMetaTask &task)
{
	if(task.type != SQLDATA_CMD_ADD_FOREIGN_KEY)
		return false;
	for(std::list<SqlMetaTask>::iterator i = _meta_in_progress.begin(); i != _meta_in_progress.end(); i++)
	{
		if((*i).type == SQLDATA_CMD_ADD_PRIMARY_KEY)
			return false;
	}
	for(std::list<SqlMetaTask>::iterator i = _meta_tasks.begin(); i != _meta_tasks.end(); i++)
	{
		if((*i).type == SQLDATA_CMD_ADD_PRIMARY_KEY)
			return false;
	}
	return true;
}
bool SqlData :: IsPrimaryKeyCreated ( SqlMetaTask & task ) { if ( task . type != SQLDATA_CMD_ADD_FOREIGN_KEY ) return false ; for ( std :: list < SqlMetaTask > :: iterator i = _meta_in_progress . begin ( ) ; i != _meta_in_progress . end ( ) ; i ++ ) { if ( ( * i ) . type == SQLDATA_CMD_ADD_PRIMARY_KEY ) return false ; } for ( std :: list < SqlMetaTask > :: iterator i = _meta_tasks . begin ( ) ; i != _meta_tasks . end ( ) ; i ++ ) { if ( ( * i ) . type == SQLDATA_CMD_ADD_PRIMARY_KEY ) return false ; } return true ; }
For foreign key task check if the primary key was already created (already in critical session)
For foreign key task check if the primary key was already created ( already in critical session )
// First check currently executed metadata tasks // Check any primary key // Check not selected tasks // Check any primary key