FSX / momoko

Wraps (asynchronous) Psycopg2 for Tornado.
http://momoko.61924.nl/
Other
363 stars 73 forks source link

The fetch* method of the cursor is synchronized? #86

Closed kamelzcs closed 9 years ago

kamelzcs commented 9 years ago

If it were true, is there anyway to do asynchronously?

kamelzcs commented 9 years ago

I found the cursor should have all the data inside it. when using the fetch method, there is no need to query the database anymore.

Isn't it?

haizaar commented 9 years ago

Yes, all cursor data is buffered by client and you already have it when you resume from yield point.

Exception is the server-side (named) cursors. Their fetch operation requests data from server. That's why you need to yield their fetch operations in manual connection management mode.

On Fri, Nov 28, 2014, 12:19 kamelzcs notifications@github.com wrote:

I found the cursor should have all the data inside it. when using the fetch method, there is no need to query the database anymore.

Isn't it?

— Reply to this email directly or view it on GitHub https://github.com/FSX/momoko/issues/86#issuecomment-64877909.

haizaar commented 9 years ago

If it does answer your question, please close the ticket.

On Fri, Nov 28, 2014, 13:27 Zaar Hai haizaar@haizaar.com wrote:

Yes, all cursor data is buffered by client and you already have it when you resume from yield point.

Exception is the server-side (named) cursors. Their fetch operation requests data from server. That's why you need to yield their fetch operations in manual connection management mode.

On Fri, Nov 28, 2014, 12:19 kamelzcs notifications@github.com wrote:

I found the cursor should have all the data inside it. when using the fetch method, there is no need to query the database anymore.

Isn't it?

— Reply to this email directly or view it on GitHub https://github.com/FSX/momoko/issues/86#issuecomment-64877909.

kamelzcs commented 9 years ago

Thx!