MCPcopy Create free account
hub / github.com/apache/cloudberry / PLy_cursor

Function PLy_cursor

src/pl/plpython/plpy_cursorobject.c:57–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57PyObject *
58PLy_cursor(PyObject *self, PyObject *args)
59{
60 char *query;
61 PyObject *plan;
62 PyObject *planargs = NULL;
63
64 if (PyArg_ParseTuple(args, "s", &query))
65 return PLy_cursor_query(query);
66
67 PyErr_Clear();
68
69 if (PyArg_ParseTuple(args, "O|O", &plan, &planargs))
70 return PLy_cursor_plan(plan, planargs);
71
72 PLy_exception_set(PLy_exc_error, "plpy.cursor expected a query or a plan");
73 return NULL;
74}
75
76
77static PyObject *

Callers

nothing calls this directly

Calls 3

PLy_cursor_queryFunction · 0.85
PLy_cursor_planFunction · 0.85
PLy_exception_setFunction · 0.85

Tested by

no test coverage detected