speed of --replicate is now vastly improved

This commit is contained in:
Miroslav Stampar
2011-04-14 14:34:12 +00:00
parent 96da7ba4eb
commit 866cdb4cf7
3 changed files with 16 additions and 2 deletions

View File

@@ -71,6 +71,16 @@ class Replication:
errMsg = "wrong number of columns used in replicating insert"
raise sqlmapValueException, errMsg
def beginTransaction(self):
"""
Great speed improvement can be gained by using explicit transactions around multiple inserts.
Reference: http://stackoverflow.com/questions/4719836/python-and-sqlite3-adding-thousands-of-rows
"""
self.parent.cursor.execute('BEGIN TRANSACTION')
def endTransaction(self):
self.parent.cursor.execute('END TRANSACTION')
def select(self, condition=None):
"""
This function is used for selecting row(s) from current table.