[go: nahoru, domu]

Skip to content

Commit

Permalink
A small bugfix and enabling autocommit in pysqlite 2.0 mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
gh committed Nov 22, 2005
1 parent e14fe2b commit 1123e9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion benchmarks/insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def yesno(question):
def create_db():
con = sqlite.connect(":memory:")
if use_autocommit:
con.autocommit = True
if use_pysqlite2:
con.isolation_level = None
else:
con.autocommit = True
cur = con.cursor()
cur.execute("""
create table test(v text, f float, i integer)
Expand Down Expand Up @@ -46,6 +49,7 @@ def test():
else:
for r in l:
cur.execute(sql, r)
endtime = time.time()

print "elapsed", endtime - starttime

Expand Down

0 comments on commit 1123e9c

Please sign in to comment.