On 05/06/2016 07:43 AM, john wrote:


On 05/05/2016 06:51 PM, john wrote:
If I had to guess I would say that neither Sqlite or Postgres dbapi modules (sqlite3, psycopg) have a "__iter__" method.


I'm sorry I misspoke in the above. What I mean is that I have not discovered a way to expose the__iter__ method to allow my use. I realize that Sqlite and Psycopg2 have the method I just can't get them to work. With MySQL.cursor I can see the __iter__.next method. It's there and easy to see and it works. With psycopg2 I can't just say psycopg.cursor.__iter__.next(). Because it does not work.

Maybe there is some other way to call this or it needs some sort of data?

Johnf

BTW here is the source for __iter__

def__iter__(self):ifself._prefetch:res =super(DictCursorBase,self).__iter__()first =res.next()ifself._query_executed:self._build_index()ifnotself._prefetch:res =super(DictCursorBase,self).__iter__()first =res.next()yieldfirst while1:yieldres.next()


Of course it fails at first = res.next()

Johnf


--- StripMime Report -- processed MIME parts ---
multipart/alternative
 text/plain (text body -- kept)
 text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/572cae63.2090...@jfcomputer.com

Reply via email to