Project

General

Profile

« Previous | Next » 

Revision 2594

sql.py: Renamed index_pkey() to add_pkey() to be consistent with add_index()

View differences:

lib/sql.py
805 805
        +' ('+expr.to_str(db)+')', recover=True, cacheable=True, log_level=3)
806 806
    except DuplicateTableException: pass # index already existed
807 807

  
808
def index_pkey(db, table, recover=None):
808
def add_pkey(db, table, recover=None):
809 809
    '''Makes the first column in a table the primary key.
810 810
    @pre The table must not already have a primary key.
811 811
    '''
......
1099 1099
        insert_into_pkeys(pkey_joins, pkeys_names)
1100 1100
    
1101 1101
    db.log_debug('Adding pkey on pkeys table to enable fast joins', level=2.5)
1102
    index_pkey(db, into)
1102
    add_pkey(db, into)
1103 1103
    
1104 1104
    log_debug('Setting pkeys of missing rows to '+strings.as_tt(repr(default)))
1105 1105
    missing_rows_joins = input_joins+[sql_gen.Join(into,

Also available in: Unified diff