Project

General

Profile

« Previous | Next » 

Revision 2401

sql_gen.py: Added to_name_only_col()

View differences:

sql_gen.py
105 105
    if isinstance(col, Code): return col
106 106
    else: return Col(col, table)
107 107

  
108
def to_name_only_col(col, check_table=None):
109
    col = as_Col(col)
110
    
111
    if check_table != None:
112
        table = col.table
113
        assert table == None or table == check_table
114
    return Col(col.name)
115

  
108 116
class NamedCol(Col):
109 117
    def __init__(self, name, code):
110 118
        Col.__init__(self, name)

Also available in: Unified diff