summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpy_cursorobject.h
diff options
context:
space:
mode:
authorPeter Eisentraut2017-02-25 13:42:25 +0000
committerPeter Eisentraut2017-03-27 15:37:22 +0000
commit70ec3f1f8f0b753c38a1a582280a02930d7cac5f (patch)
tree71ea0b916782cb47290374095145ca4eabb90bd7 /src/pl/plpython/plpy_cursorobject.h
parent090010f2ec9b1f9ac1124dc628b89586f911b641 (diff)
PL/Python: Add cursor and execute methods to plan object
Instead of plan = plpy.prepare(...) res = plpy.execute(plan, ...) you can now write plan = plpy.prepare(...) res = plan.execute(...) or even res = plpy.prepare(...).execute(...) and similarly for the cursor() method. This is more in object oriented style, and makes the hybrid nature of the existing execute() function less confusing. Reviewed-by: Andrew Dunstan <[email protected]>
Diffstat (limited to 'src/pl/plpython/plpy_cursorobject.h')
-rw-r--r--src/pl/plpython/plpy_cursorobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pl/plpython/plpy_cursorobject.h b/src/pl/plpython/plpy_cursorobject.h
index c73033c486b..ef23865dd2c 100644
--- a/src/pl/plpython/plpy_cursorobject.h
+++ b/src/pl/plpython/plpy_cursorobject.h
@@ -19,5 +19,6 @@ typedef struct PLyCursorObject
extern void PLy_cursor_init_type(void);
extern PyObject *PLy_cursor(PyObject *self, PyObject *args);
+extern PyObject *PLy_cursor_plan(PyObject *ob, PyObject *args);
#endif /* PLPY_CURSOROBJECT_H */