Revision 2209
Added by Aaron Marcuse-Kubitza over 12 years ago
sql.py | ||
---|---|---|
751 | 751 |
|
752 | 752 |
def get(db, table, row, pkey, row_ct_ref=None, create=False): |
753 | 753 |
'''Recovers from errors''' |
754 |
try: return value(select(db, table, [pkey], row, 1, recover=True)) |
|
754 |
try: return value(select(db, table, [pkey], row, limit=1, recover=True))
|
|
755 | 755 |
except StopIteration: |
756 | 756 |
if not create: raise |
757 | 757 |
return put(db, table, row, pkey, row_ct_ref) # insert new row |
Also available in: Unified diff
sql.py: get(): Fixed bug where limit=1 needs to be passed to select() as a keyword arg now that the distinct_on param comes before it