Project

General

Profile

« Previous | Next » 

Revision 6226

sql_io.py: put_table(): Special handling for functions with hstore params: Fixed bug where need to unwrap literal values of mapping, which might be sql_gen.Literal objects

View differences:

sql_io.py
363 363
        try: value = mapping.pop('value')
364 364
        except KeyError: return None # value required
365 365
        
366
        mapping = dict([(k, sql_gen.get_value(v))
367
            for k, v in mapping.iteritems()]) # unwrap literal value
366 368
        mapping = dict(map=mapping, value=value) # non-value params -> hstore
367 369
    
368 370
    out_table = sql_gen.as_Table(out_table)

Also available in: Unified diff