Revision 3622
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/db_xml.py | ||
---|---|---|
134 | 134 |
|
135 | 135 |
put_table_special_funcs = set(['_simplifyPath']) |
136 | 136 |
|
137 |
def put_table(db, node, in_table, in_row_ct_ref=None, |
|
138 |
row_ins_ct_ref=None, limit=None, start=0, on_error=exc.raise_, |
|
139 |
parent_ids_loc=None, next=None, col_defaults={}): |
|
137 |
def put_table(db, node, in_table, in_row_ct_ref=None, row_ins_ct_ref=None, |
|
138 |
limit=None, start=0, on_error=exc.raise_, col_defaults={}): |
|
140 | 139 |
''' |
141 | 140 |
@param node The XML tree that transforms the input to the output. Similar to |
142 | 141 |
put()'s node param, but with the input column name prefixed by |
... | ... | |
179 | 178 |
|
180 | 179 |
# Recurse |
181 | 180 |
pkeys_loc = _put_table_part(db, node, in_table, row_ins_ct_ref, |
182 |
on_error, parent_ids_loc, next, col_defaults)
|
|
181 |
on_error, col_defaults) |
|
183 | 182 |
if in_row_ct_ref != None: in_row_ct_ref[0] += this_ct |
184 | 183 |
|
185 | 184 |
sql.empty_temp(db, in_table) |
... | ... | |
191 | 190 |
|
192 | 191 |
return pkeys_loc |
193 | 192 |
|
194 |
def _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, |
|
195 |
parent_ids_loc, next, col_defaults):
|
|
193 |
def _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, col_defaults,
|
|
194 |
parent_ids_loc=None, next=None):
|
|
196 | 195 |
'''Helper function for put_table() only; should not be called directly''' |
197 | 196 |
def put_table_(node, in_row_ct_ref=None): |
198 | 197 |
return _put_table_part(db, node, in_table, row_ins_ct_ref, on_error, |
199 |
parent_ids_loc, next, col_defaults)
|
|
198 |
col_defaults, parent_ids_loc, next)
|
|
200 | 199 |
|
201 | 200 |
is_func = xml_func.is_func(node) |
202 | 201 |
out_table = name_of(node) |
Also available in: Unified diff
db_xml.py: put_table(): Removed parent_ids_loc and next params since these are only used in the recursion