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
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).
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
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,
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'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,