summaryrefslogtreecommitdiff
path: root/psycopg/cursor.h
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-08-15 09:44:44 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-08-15 09:44:44 +0100
commita79a5292e7b3040b12de4cf553c037f2d23ea92e (patch)
tree5c40b51f24884407c06a4f528d439ba088b0fc8e /psycopg/cursor.h
parentd074b096be7f60d96bfaf6257fad63743f4c2855 (diff)
downloadpsycopg2-a79a5292e7b3040b12de4cf553c037f2d23ea92e.tar.gz
Added support with cursors without scroll clause
Using nothing is different from NO SCROLL, see DECLARE notes in PG docs.
Diffstat (limited to 'psycopg/cursor.h')
-rw-r--r--psycopg/cursor.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/psycopg/cursor.h b/psycopg/cursor.h
index e234f29..7940e7b 100644
--- a/psycopg/cursor.h
+++ b/psycopg/cursor.h
@@ -43,7 +43,11 @@ struct cursorObject {
int closed:1; /* 1 if the cursor is closed */
int notuples:1; /* 1 if the command was not a SELECT query */
int withhold:1; /* 1 if the cursor is named and uses WITH HOLD */
- int scrollable:1; /* 1 if the cursor is named as SCROLLABLE */
+
+ int scrollable; /* 1 if the cursor is named and SCROLLABLE,
+ 0 if not scrollable
+ -1 if undefined (PG may decide scrollable or not)
+ */
long int rowcount; /* number of rows affected by last execute */
long int columns; /* number of columns fetched from the db */
@@ -85,9 +89,11 @@ struct cursorObject {
};
-/* C-callable functions in cursor_int.c and cursor_ext.c */
+/* C-callable functions in cursor_int.c and cursor_type.c */
BORROWED HIDDEN PyObject *curs_get_cast(cursorObject *self, PyObject *oid);
HIDDEN void curs_reset(cursorObject *self);
+HIDDEN int psyco_curs_withhold_set(cursorObject *self, PyObject *pyvalue);
+HIDDEN int psyco_curs_scrollable_set(cursorObject *self, PyObject *pyvalue);
/* exception-raising macros */
#define EXC_IF_CURS_CLOSED(self) \