Header And Logo

| The world's most advanced open source database.

Data Structures | Typedefs | Functions

plpy_resultobject.h File Reference

#include "access/tupdesc.h"
Include dependency graph for plpy_resultobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PLyResultObject


typedef struct PLyResultObject PLyResultObject


void PLy_result_init_type (void)
PyObject * PLy_result_new (void)

Typedef Documentation

Function Documentation

void PLy_result_init_type ( void   ) 

Definition at line 94 of file plpy_resultobject.c.

References elog, ERROR, and PLy_ResultType.

Referenced by PLy_init_plpy().

    if (PyType_Ready(&PLy_ResultType) < 0)
        elog(ERROR, "could not initialize PLy_ResultType");

PyObject* PLy_result_new ( void   ) 

Definition at line 101 of file plpy_resultobject.c.

References PLyResultObject::nrows, NULL, PLy_ResultType, PLyResultObject::rows, PLyResultObject::status, and PLyResultObject::tupdesc.

Referenced by PLy_cursor_fetch(), and PLy_spi_execute_fetch_result().

    PLyResultObject *ob;

    if ((ob = PyObject_New(PLyResultObject, &PLy_ResultType)) == NULL)
        return NULL;

    /* ob->tuples = NULL; */

    ob->status = Py_None;
    ob->nrows = PyInt_FromLong(-1);
    ob->rows = PyList_New(0);
    ob->tupdesc = NULL;

    return (PyObject *) ob;