Project

General

Profile

« Previous | Next » 

Revision 2084

sql.py: pkey(): Support escaped table names

View differences:

sql.py
443 443

  
444 444
##### Database structure queries
445 445

  
446
def pkey(db, table, recover=None):
446
def pkey(db, table, recover=None, table_is_esc=False):
447 447
    '''Assumed to be first column in table'''
448
    check_name(table)
449
    return col_names(select(db, table, limit=0, recover=recover)).next()
448
    return col_names(select(db, table, limit=0, recover=recover,
449
        table_is_esc=table_is_esc)).next()
450 450

  
451 451
def index_cols(db, table, index):
452 452
    '''Can also use this for UNIQUE constraints, because a UNIQUE index is

Also available in: Unified diff