Revision 1984
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/map | ||
---|---|---|
261 | 261 |
table = sql.qual_name(in_db, schema, table) |
262 | 262 |
table_is_esc = True |
263 | 263 |
|
264 |
cur = sql.select(in_db, table, limit=n, start=start, |
|
265 |
table_is_esc=table_is_esc) |
|
266 |
row_ct = map_table(list(sql.col_names(cur)), sql.rows(cur), |
|
267 |
rows_start=start) # rows_start: pre-start rows have been skipped |
|
264 |
if in_db_config == out_db_config: # mapping to same DB |
|
265 |
# Use by-column optimization |
|
266 |
raise NotImplementedError( |
|
267 |
'By-column optimization not available yet') |
|
268 |
else: |
|
269 |
# Use normal by-row method |
|
270 |
cur = sql.select(in_db, table, limit=n, start=start, |
|
271 |
table_is_esc=table_is_esc) |
|
272 |
row_ct = map_table(list(sql.col_names(cur)), sql.rows(cur), |
|
273 |
rows_start=start) # rows_start: pre-start rows were skipped |
|
268 | 274 |
|
269 | 275 |
in_db.db.close() |
270 | 276 |
elif in_is_xml: |
Also available in: Unified diff
bin/map: DB inputs: Use by-column optimization if mapping to same DB (with skeleton code for optimization's implementation)