Message290914
Hi Cheryl, the arraysize value can be set by doing:
>>> cursor.array = 5
For example I can do the following
>>> import sqlite3
>>> s = sqlite3.connect(":memory:")
>>> s.execute("create table a(a,b)")
>>> s.execute("insert into a(a,b) values (1,2)")
>>> s.execute("insert into a(a,b) values (3,4)")
>>> c = s.cursor() # Array size is 1
>>> c.execute("select * from a")
>>> c.fetchmany()
[(1, 2)]
>>> c.fetchmany()
[(3, 4)]
>>> c.arraysize = 2 # Change array size
>>> c.fetchmany()
[(1, 2), (3, 4)]
As you can see the arraysize set the number of results the fetchmany will return. |
|
Date |
User |
Action |
Args |
2017-03-31 15:10:42 | palaviv | set | recipients:
+ palaviv, jae, docs@python, berker.peksag, cheryl.sabella |
2017-03-31 15:10:42 | palaviv | set | messageid: <1490973042.9.0.801127027976.issue29725@psf.upfronthosting.co.za> |
2017-03-31 15:10:42 | palaviv | link | issue29725 messages |
2017-03-31 15:10:42 | palaviv | create | |
|