Skip to content

Commit

Permalink
make arraysize config option
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Sep 15, 2020
1 parent d7bcc93 commit ced7bca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/sqlutilpy/sqlutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
from select import select
from psycopg2.extensions import POLL_OK, POLL_READ, POLL_WRITE

class config:
arraysize = 100000


class SqlUtilException(Exception):
pass
Expand Down Expand Up @@ -120,7 +123,7 @@ def getCursor(conn, driver=None, preamb=None, notNamed=False):
if notNamed:
return cur
cur = conn.cursor(name='sqlutilcursor')
cur.arraysize = 100000
cur.arraysize = config.arraysize
elif driver == 'sqlite3':
cur = conn.cursor()
return cur
Expand Down

0 comments on commit ced7bca

Please sign in to comment.