Project

General

Profile

« Previous | Next » 

Revision 2262

sql_gen.py: Added table2sql_gen()

View differences:

sql_gen.py
182 182
    if len(parts) == 1: parts, = parts
183 183
    return parts
184 184

  
185
def table2sql_gen(table, table_is_esc=False):
186
    '''Converts old-style (tuple-based) tables to sql_gen-compatible values.
187
    @param table_is_esc If False, assumes any table name is not escaped or that
188
        re-escaping it will produce the same value.
189
    '''
190
    if util.is_str(table) and table_is_esc: table = unescape_table(table)
191
    return as_Table(table)
192

  
185 193
def col2sql_gen(col, default_table=None, table_is_esc=False):
186
    '''Converts old-style (tuple-based) columns to sql_gen-compatible columns.
194
    '''Converts old-style (tuple-based) columns to sql_gen-compatible values.
187 195
    @param table_is_esc If False, assumes any table name is not escaped or that
188 196
        re-escaping it will produce the same value.
189 197
    '''

Also available in: Unified diff