Revision 2653
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
881 | 881 |
row_ct_ref[0] += cur.rowcount |
882 | 882 |
return value(cur) |
883 | 883 |
except DuplicateKeyException, e: |
884 |
return value(select(db, table, [pkey_], |
|
885 |
util.dict_subset_right_join(row, e.cols), recover=True)) |
|
884 |
row = sql_gen.ColDict(db, table, |
|
885 |
util.dict_subset_right_join(row, e.cols)) |
|
886 |
return value(select(db, table, [pkey_], row, recover=True)) |
|
886 | 887 |
|
887 | 888 |
def get(db, table, row, pkey, row_ct_ref=None, create=False): |
888 | 889 |
'''Recovers from errors''' |
Also available in: Unified diff
sql_gen.py: ColDict: Extend UserDict.DictMixin instead of dict because its non-core function implementations route all inner dict accesses to the core functions getitem() and setitem(). sql.py: put(): DuplicateKeyException: Wrap util.dict_subset_right_join() in a sql_gen.ColDict because the dict returned by util.dict_subset_right_join() is just a plain dict. (This change must happen at the same time because the previous functionality relied on a bug in ColDict.)