Revision 3305
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
980 | 980 |
items = mk_flatten_mapping(db, into, cols, as_items=True, **kw_args) |
981 | 981 |
cols = [sql_gen.NamedCol(new.name, old) for old, new in items] |
982 | 982 |
run_query_into(db, mk_select(db, joins, cols, order_by=None, limit=limit, |
983 |
start=start), into=into) |
|
983 |
start=start), into=into, add_pkey_=True)
|
|
984 | 984 |
return dict(items) |
985 | 985 |
|
986 | 986 |
##### Database structure introspection |
Also available in: Unified diff
sql.py: flatten(): Auto-add a pkey on the created temp table. This should be standard practice for most temp tables, and for sql_io.put_table() especially this will be useful if we ever want to add back sorting the in_table by row_num (possibly by CLUSTERing on the pkey to avoid pkey index scans).