Project

General

Profile

« Previous | Next » 

Revision 2417

db_xml.py: put_table(): Don't pass limit, start recursively, because the table subsetting will happen only once in the first invocation of the function. Moved limit, start params to end since they are not passed recursively. start param no longer defaults to 0 because this is not needed since sql.put_table() now sets start to 0 where needed.

View differences:

lib/db_xml.py
128 128

  
129 129
input_col_prefix = '$'
130 130

  
131
def put_table(db, node, in_table, limit=None, start=0,
132
    commit=False, row_ct_ref=None, parent_ids_loc=None):
131
def put_table(db, node, in_table, commit=False, row_ct_ref=None, limit=None,
132
    start=None, 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
......
143 143
    in_table = sql_gen.as_Table(in_table)
144 144
    
145 145
    def put_table_(node, parent_ids_loc=None):
146
        return put_table(db, node, in_table, limit, start, commit, row_ct_ref,
147
            parent_ids_loc)
146
        return put_table(db, node, in_table, commit, row_ct_ref,
147
            parent_ids_loc=parent_ids_loc)
148 148
    
149 149
    out_table = name_of(node)
150 150
    row = {}
bin/map
308 308
                xml_func.strip(root)
309 309
                if debug: log_debug('Putting stripped:\n'+str(root))
310 310
                    # only calc if debug
311
                db_xml.put_table(in_db, root.firstChild, table, n, start,
312
                    commit, row_ins_ct_ref)
311
                db_xml.put_table(in_db, root.firstChild, table, commit,
312
                    row_ins_ct_ref, n, start)
313 313
                row_ct = 0 # unknown for now
314 314
            else:
315 315
                # Use normal by-row method

Also available in: Unified diff