Revision 3625
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/db_xml.py | ||
---|---|---|
150 | 150 |
db.autoanalyze = True # but don't do this in row-based import |
151 | 151 |
db.autoexplain = True # but don't do this in row-based import |
152 | 152 |
|
153 |
full_in_table = in_table |
|
153 |
# Import col_defaults |
|
154 |
for col, node_ in col_defaults.items(): |
|
155 |
col_defaults[col] = _put_table_part(db, node_, None, row_ins_ct_ref, |
|
156 |
on_error) |
|
154 | 157 |
|
155 | 158 |
# Subset and partition in_table |
156 | 159 |
# OK to do even if table already the right size because it takes <1 sec. |
160 |
full_in_table = in_table |
|
157 | 161 |
total = 0 |
158 | 162 |
while limit == None or total < limit: |
159 | 163 |
# Adjust partition size if last partition |
... | ... | |
190 | 194 |
|
191 | 195 |
return pkeys_loc |
192 | 196 |
|
193 |
def _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, col_defaults,
|
|
194 |
parent_ids_loc=None, next=None): |
|
197 |
def _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, |
|
198 |
col_defaults={}, parent_ids_loc=None, next=None):
|
|
195 | 199 |
'''Helper function for put_table() only; should not be called directly''' |
196 | 200 |
def put_table_(node, in_row_ct_ref=None): |
197 | 201 |
return _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, |
Also available in: Unified diff
db_xml.py: put_table(): Import col_defaults to translate nodes to pkeys