Project

General

Profile

« Previous | Next » 

Revision 5159

tnrs_db: Updated query for new three-level taxonpath hierarchy, where the concatenated name is now stored in identifyingtaxonomicname instead of taxonomicnamewithauthor

View differences:

tnrs_db
47 47
    # Iterate over unscrubbed verbatim taxonpaths
48 48
    total_pause = 0
49 49
    tables = ['taxonpath', sql_gen.Join('tnrs',
50
        {'Name_submitted': 'taxonomicnamewithauthor'}, sql_gen.filter_out)]
50
        {'Name_submitted': 'identifyingtaxonomicname'}, sql_gen.filter_out)]
51
    # Has a concatenated name and not already linked to an accepted name
52
    conds = [('identifyingtaxonomicname', sql_gen.CompareCond(None, '!=')),
53
        ('canon_taxonpath_id', None)]
51 54
    while True:
52 55
        # Fetch next set
53
        cur = sql.select(db, tables, ['taxonomicnamewithauthor'],
54
            [('canon_taxonpath_id', None)], limit=tnrs.max_names,
55
            cacheable=False)
56
        cur = sql.select(db, tables, ['identifyingtaxonomicname'], conds,
57
            limit=tnrs.max_names, cacheable=False)
56 58
        this_ct = cur.rowcount
57 59
        if this_ct == 0:
58 60
            total_pause += pause

Also available in: Unified diff