Revision 3186
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/map | ||
---|---|---|
302 | 302 |
if in_is_db: |
303 | 303 |
def on_error(e): ex_tracker.track(e) |
304 | 304 |
|
305 |
in_db = connect_db(in_db_config) |
|
305 |
if by_col: in_db = out_db |
|
306 |
else: in_db = connect_db(in_db_config) |
|
306 | 307 |
|
307 | 308 |
# Get table and schema name |
308 | 309 |
schema = in_schema # modified, so can't have same name as outer var |
... | ... | |
344 | 345 |
# Use normal by-row method |
345 | 346 |
row_ct = map_table(col_names, sql.rows(cur), rows_start=start) |
346 | 347 |
# rows_start: pre-start rows have been skipped |
347 |
|
|
348 |
in_db.db.close() |
|
348 |
|
|
349 |
in_db.db.close()
|
|
349 | 350 |
elif in_is_xml: |
350 | 351 |
stdin = streams.LineCountStream(sys.stdin) |
351 | 352 |
def on_error(e): |
Also available in: Unified diff
bin/map: by_col: Reuse existing out_db connection for in_db instead of opening separate connection