[sqlalchemy] Re: server_side_cursors

2007-03-19 Thread Michael Bayer
OK, ive added ticket #514 to remind me to evaluate/test the patch out..will try to commit by tomorrow. On Mar 18, 2007, at 3:16 PM, Steve Huffman wrote: Here's a patch that add's a DelayedMetaResultProxy(ResultProxy) class. In the case of fetchone and fetchmany, it overwrites itself with

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
the cursor metadata often cannot be read until fetchone() is called first. the current result set implementation we have doesnt call fetchone() before it tries to get the metadata, and normally it shouldnt (since the result set doesnt even know if its the result of a select/insert/whatever).

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Steve Huffman
I may be missing something fundamental here, but why doesn't it already know the metadata since I defined the columns in which I'm interested? thing_table = sa.Table(thing, md, sa.Column('id', sa.Integer, primary_key = True)) On 3/17/07, Michael Bayer [EMAIL PROTECTED] wrote: the cursor

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
no its a psycopg thing, its like this: # server side cursor (giving it a name makes it server side. psycopg2 devs think thats a good API.) cursor = connection.cursor(x) # execute. cursor now has pending results. cursor.execute(select * from table) SQLAlchemy's result wrapper, ResultProxy,

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Michael Bayer
sorry, i meant cursor.description, not cursor.metadata. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this

[sqlalchemy] Re: server_side_cursors

2007-03-17 Thread Steve Huffman
SQLAlchemy's result wrapper, ResultProxy, then calls: metadata = cursor.metadata My question was why doesn't ResultProxy use the sqlalchemy metadata I defined when I defined the sqlalchemy Table? to psycopg2 versions, PG setup, or what. if we can determine its a psycopg2 version issue,