Project

General

Profile

« Previous | Next » 

Revision 10138

lib/sql_gen.py: added col2col_ref() for interfacing with for SQL functions that take a util.col_ref

View differences:

lib/sql_gen.py
339 339

  
340 340
def is_table_col(col): return is_col(col) and col.table != None
341 341

  
342
def col2col_ref(db, col):
343
    assert isinstance(col, Col)
344
    return db.esc_value((col.table.to_str(db), col.name))
345

  
342 346
def index_col(col):
343 347
    if not is_table_col(col): return None
344 348
    

Also available in: Unified diff