Revision 2422
Added by Aaron Marcuse-Kubitza about 12 years ago
db_xml.py | ||
---|---|---|
128 | 128 |
|
129 | 129 |
input_col_prefix = '$' |
130 | 130 |
|
131 |
def put_table(db, node, in_table, commit=False, row_ct_ref=None, limit=None,
|
|
132 |
start=0, parent_ids_loc=None): |
|
131 |
def put_table(db, node, in_table, commit=False, in_row_ct_ref=None,
|
|
132 |
row_ins_ct_ref=None, limit=None, start=0, parent_ids_loc=None):
|
|
133 | 133 |
''' |
134 | 134 |
@param node The XML tree that transforms the input to the output. Similar to |
135 | 135 |
put()'s node param, but with the input column name prefixed by |
... | ... | |
149 | 149 |
def pkey(table): return sql.pkey(db, table, True) |
150 | 150 |
|
151 | 151 |
def put_table_(node, parent_ids_loc=None): |
152 |
return put_table(db, node, in_table, commit, row_ct_ref, |
|
153 |
parent_ids_loc=parent_ids_loc) |
|
152 |
return put_table(db, node, in_table, commit, in_row_ct_ref,
|
|
153 |
row_ins_ct_ref, parent_ids_loc=parent_ids_loc)
|
|
154 | 154 |
|
155 | 155 |
out_table = name_of(node) |
156 | 156 |
row = {} |
... | ... | |
191 | 191 |
|
192 | 192 |
# Insert node |
193 | 193 |
db.log_debug('Putting columns: '+str(row)) |
194 |
pkeys_loc = sql.put_table(db, out_table, in_tables, row, row_ct_ref) |
|
194 |
pkeys_loc = sql.put_table(db, out_table, in_tables, row, row_ins_ct_ref)
|
|
195 | 195 |
if commit: db.db.commit() |
196 | 196 |
|
197 | 197 |
# Insert children with fkeys to parent |
Also available in: Unified diff
db_xml.py: put_table(): Added in_row_ct_ref param to store the # of input rows processed. Renamed row_ct_ref param to row_ins_ct_ref to distinguish it from new in_row_ct_ref param.