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

Function PLy_result_new

src/pl/plpython/plpy_resultobject.c:67–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67PyObject *
68PLy_result_new(void)
69{
70 PLyResultObject *ob;
71
72 if ((ob = PyObject_New(PLyResultObject, &PLy_ResultType)) == NULL)
73 return NULL;
74
75 /* ob->tuples = NULL; */
76
77 Py_INCREF(Py_None);
78 ob->status = Py_None;
79 ob->nrows = PyInt_FromLong(-1);
80 ob->rows = PyList_New(0);
81 ob->tupdesc = NULL;
82 if (!ob->rows)
83 {
84 Py_DECREF(ob);
85 return NULL;
86 }
87
88 return (PyObject *) ob;
89}
90
91static void
92PLy_result_dealloc(PyObject *arg)

Callers 2

PLy_cursor_fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected