Revision 3131
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_io.py | ||
---|---|---|
167 | 167 |
if pkey_ == None: pkey_ = sql.pkey(db, table, recover=True) |
168 | 168 |
|
169 | 169 |
try: |
170 |
cur = sql.insert(db, table, row, pkey_, recover=True) |
|
170 |
cur = sql.insert(db, table, row, pkey_, recover=True, log_level=3.5)
|
|
171 | 171 |
if row_ct_ref != None and cur.rowcount >= 0: |
172 | 172 |
row_ct_ref[0] += cur.rowcount |
173 | 173 |
return sql.value(cur) |
174 | 174 |
except sql.DuplicateKeyException, e: |
175 | 175 |
row = sql_gen.ColDict(db, table, |
176 | 176 |
util.dict_subset_right_join(row, e.cols)) |
177 |
return sql.value(sql.select(db, table, [pkey_], row, recover=True)) |
|
177 |
return sql.value(sql.select(db, table, [pkey_], row, recover=True, |
|
178 |
log_level=3.5)) |
|
178 | 179 |
|
179 | 180 |
def get(db, table, row, pkey, row_ct_ref=None, create=False): |
180 | 181 |
'''Recovers from errors''' |
Also available in: Unified diff
sql_io.py: put(): Run data import queries with log_level=3.5 so they don't clutter the output at the normal import verbosity of 3