summaryrefslogtreecommitdiff
path: root/psycopg/cursor.h
diff options
context:
space:
mode:
authorJan UrbaƄski <wulczer@wulczer.org>2010-03-26 04:01:33 +0100
committerFederico Di Gregorio <fog@initd.org>2010-04-05 11:31:50 +0200
commit91ef0e09ed63c079374ed2a6ab5116415db8fea9 (patch)
tree9031a183fbb864778bc0a58da3ab20c4fa5e6aa4 /psycopg/cursor.h
parent9b259a8a5489928f9abf12cf4c7459696ef18a3e (diff)
downloadpsycopg2-91ef0e09ed63c079374ed2a6ab5116415db8fea9.tar.gz
Change the API for asynchronous queries to use cursor.poll()
The isread() API was not safe, because the query might have not been sent fully to the server after calling execute(). To make the async API complete, a similar mechanism to async connections must be used. The cursor now has a poll() method that you would use identically to the poll() method of the connection class.
Diffstat (limited to 'psycopg/cursor.h')
-rw-r--r--psycopg/cursor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/psycopg/cursor.h b/psycopg/cursor.h
index a422283..bcfc81f 100644
--- a/psycopg/cursor.h
+++ b/psycopg/cursor.h
@@ -87,6 +87,8 @@ typedef struct {
/* C-callable functions in cursor_int.c and cursor_ext.c */
HIDDEN void curs_reset(cursorObject *self);
HIDDEN void curs_get_last_result(cursorObject *self);
+HIDDEN PyObject *curs_poll_send(cursorObject *self);
+HIDDEN PyObject *curs_poll_fetch(cursorObject *self);
/* exception-raising macros */
#define EXC_IF_CURS_CLOSED(self) \