def _retrieve_dbxrefs(adaptor, primary_id):
 _dbxrefs = []
 dbxrefs = adaptor.execute_and_fetchall('SELECT dbname, accession, version FROM bioentry_dbxref join dbxref using (dbxref_id) WHERE bioentry_id = %s ORDER BY rank', (primary_id,))
 for (dbname, accession, version) in dbxrefs:
  if (version and (version != '0')):
   v = ('%s.%s' % (accession, version))
  else:
   v = accession
  _dbxrefs.append(('%s:%s' % (dbname, v)))
 return _dbxrefs

def _retrieve_dbxrefs ( adaptor , primary_id ) : _dbxrefs = [ ] dbxrefs = adaptor . execute_and_fetchall ( 'SELECT dbname, accession, version FROM bioentry_dbxref join dbxref using (dbxref_id) WHERE bioentry_id = %s ORDER BY rank' , ( primary_id , ) ) for ( dbname , accession , version ) in dbxrefs : if ( version and ( version != '0' ) ) : v = ( '%s.%s' % ( accession , version ) ) else : v = accession _dbxrefs . append ( ( '%s:%s' % ( dbname , v ) ) ) return _dbxrefs
retrieve the database cross references for the sequence .