Project

General

Profile

« Previous | Next » 

Revision 2195

db_xml.py: put_table(): Added limit and start options

View differences:

lib/db_xml.py
127 127

  
128 128
input_col_prefix = '$'
129 129

  
130
def put_table(db, node, in_table, in_schema=None, commit=False,
131
    row_ct_ref=None, parent_ids_loc=None):
130
def put_table(db, node, in_table, in_schema=None, limit=None, start=0,
131
    commit=False, row_ct_ref=None, parent_ids_loc=None):
132 132
    '''
133 133
    @param node The XML tree that transforms the input to the output. Similar to
134 134
        put()'s node param, but with the input column name prefixed by
......
142 142
    def pkey(table): return sql.pkey(db, table, True)
143 143
    
144 144
    def put_table_(node, parent_ids_loc=None):
145
        return put_table(db, node, in_table, in_schema, commit, row_ct_ref,
146
            parent_ids_loc)
145
        return put_table(db, node, in_table, in_schema, limit, start, commit,
146
            row_ct_ref, parent_ids_loc)
147 147
    
148 148
    out_table = name_of(node)
149 149
    row = {}
bin/map
306 306
                xml_func.strip(root)
307 307
                if debug: log_debug('Putting stripped:\n'+str(root))
308 308
                    # only calc if debug
309
                db_xml.put_table(in_db, root.firstChild, table, schema, commit,
310
                    row_ins_ct_ref)
309
                db_xml.put_table(in_db, root.firstChild, table, schema, n,
310
                    start, commit, row_ins_ct_ref)
311 311
                row_ct = 0 # unknown for now
312 312
            else:
313 313
                # Use normal by-row method

Also available in: Unified diff