> It is perfectly allowed to open multiple cursors against a single connection.
> You can only execute one
> statement per cursor at a time, but you can have multiple cursors running
> from the same connection:
>
> cr1 = cn.cursor()
> cr2 = cn.cursor()
>
> cr1.execute('select ...')
> while Tru
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 17/07/13 18:37, Keith Medcalf wrote:
> cr1 = cn.cursor() cr2 = cn.cursor()
>
> cr1.execute('select ...') while True: row = cr1.fetchone() if not row:
> break
While that is normal DBAPI, it is far more verbose and unpythonic than the
SQLite wrappe
lf Of Joseph L. Casale
> Sent: Wednesday, 17 July, 2013 13:41
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Guidance with Python and nested cursors
>
>
>
> From: sqlite-users-boun...@sqlite.org on behalf of Petit
sers@sqlite.org
> Subject: [sqlite] Guidance with Python and nested cursors
>
> I am using Python to query a table for all its rows, for each row, I
> query related rows from a
> second table, then perform some processing and insert in to a third
> table.
>
> What is the t
From: sqlite-users-boun...@sqlite.org on behalf of Petite Abeille
Sent: Wednesday, July 17, 2013 1:25 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Guidance with Python and nested cursors
On Jul 17, 2013, at 9:07 PM, Joseph L. Casale
On Jul 17, 2013, at 9:07 PM, Joseph L. Casale wrote:
> I am using Python to query a table for all its rows, for each row, I query
> related rows from a
> second table, then perform some processing and insert in to a third table.
>
> What is the technically correct approach for this?
>From th
I am using Python to query a table for all its rows, for each row, I query
related rows from a
second table, then perform some processing and insert in to a third table.
What is the technically correct approach for this? I would rather not
accumulate all of the first
tables data to make one off
7 matches
Mail list logo