Revision 1850
Added by Aaron Marcuse-Kubitza over 12 years ago
map | ||
---|---|---|
237 | 237 |
assert in_is_xpaths |
238 | 238 |
|
239 | 239 |
in_db = connect_db(in_db_config) |
240 |
in_pkeys = {} |
|
241 | 240 |
cur = sql.select(in_db, table=in_root, fields=None, conds=None, |
242 | 241 |
limit=end, start=0) |
243 | 242 |
row_ct = map_table(list(sql.col_names(cur)), sql.rows(cur)) |
... | ... | |
288 | 287 |
import db_xml |
289 | 288 |
|
290 | 289 |
out_db = connect_db(out_db_config) |
291 |
out_pkeys = {} |
|
292 | 290 |
try: |
293 | 291 |
if redo: sql.empty_db(out_db) |
294 | 292 |
row_ins_ct_ref = [0] |
... | ... | |
306 | 304 |
try: |
307 | 305 |
sql.with_savepoint(out_db, |
308 | 306 |
lambda: db_xml.put(out_db, root.firstChild, |
309 |
out_pkeys, row_ins_ct_ref, on_error))
|
|
307 |
row_ins_ct_ref, on_error)) |
|
310 | 308 |
if commit: out_db.db.commit() |
311 | 309 |
except sql.DatabaseErrors, e: on_error(e) |
312 | 310 |
prep_root() |
Also available in: Unified diff
sql.py: pkey(): Use pkeys cache from db object instead of parameter