Re: [DB-SIG] Context manager support for cursors

2018-07-26 Thread Daniel Lenski
On Thu, Jul 26, 2018 at 6:45 AM, Daniele Varrazzo wrote: > On Thu, Jul 26, 2018 at 2:18 PM, Mike Bayer wrote: > > Oh hi! If there is someone who has experience in how much effort it > takes to beat every different driver into submission that's you :) > > >>> - should execute(query) with no param

Re: [DB-SIG] Context manager support for cursors

2018-07-25 Thread Daniel Lenski
On Tue, Jul 24, 2018 at 12:37 AM, Federico Di Gregorio wrote: > On 06/21/2018 01:31 AM, Gerald Venzl wrote: >> >> Hi all, >> >> I was wondering whether there has been any particular reason that the >> specification of the Cursor object doesn’t implement a context manager to >> enable for example t

[DB-SIG] how greedy should cursor.fetchmany be?

2014-06-10 Thread Daniel Lenski
I'm writing a DBAPI module for a custom database wrapper. The way I get data from a query is to ask the underlying database it for a chunk of rows, at which point it spits out an unpredictable number (it's a black box to me). I'm trying to figure out how to implement cursor.fetchmany on top of thi

Re: [DB-SIG] checking column types from cursor object in a database-independent way?

2013-04-23 Thread Daniel Lenski
On Tue, Apr 23, 2013 at 12:29 AM, M.-A. Lemburg wrote: > > I don't think we should clutter up the connection objects with > module scope attributes that hardly ever get used. > > The exceptions are used a lot, so it makes sense to have them > easily available via the connection object - even thoug

Re: [DB-SIG] checking column types from cursor object in a database-independent way?

2013-04-22 Thread Daniel Lenski
On Fri, Apr 19, 2013 at 11:46 AM, Michael Bayer wrote: > > On Apr 19, 2013, at 1:56 PM, Dan Lenski wrote: > >> The problem I'm having is... how can I figure out what are the appropriate >> type objects for this comparison if I *only* have access to the cursor >> object? > > > Basically I'd quest