Project

General

Profile

« Previous | Next » 

Revision 295

Commit after inserting each row

View differences:

map
159 159
        out_db.set_isolation_level(ISOLATION_LEVEL_SERIALIZABLE)
160 160
        try:
161 161
            row_ct_ref = [0]
162
            def use_row(root): db_xml.xml2db(out_db, root, row_ct_ref)
162
            def use_row(root): db_xml.xml2db(out_db, root, commit, row_ct_ref)
163 163
            db_xml.xml2db(out_db, get_xml(use_row).documentElement, row_ct_ref)
164 164
            print 'Inserted '+str(row_ct_ref[0])+' rows'
165
            if commit: out_db.commit()
166 165
        finally:
167 166
            out_db.rollback()
168 167
            out_db.close()

Also available in: Unified diff