17db96d56Sopenharmony_ci/* cursor.h - definitions for the cursor type
27db96d56Sopenharmony_ci *
37db96d56Sopenharmony_ci * Copyright (C) 2004-2010 Gerhard Häring <gh@ghaering.de>
47db96d56Sopenharmony_ci *
57db96d56Sopenharmony_ci * This file is part of pysqlite.
67db96d56Sopenharmony_ci *
77db96d56Sopenharmony_ci * This software is provided 'as-is', without any express or implied
87db96d56Sopenharmony_ci * warranty.  In no event will the authors be held liable for any damages
97db96d56Sopenharmony_ci * arising from the use of this software.
107db96d56Sopenharmony_ci *
117db96d56Sopenharmony_ci * Permission is granted to anyone to use this software for any purpose,
127db96d56Sopenharmony_ci * including commercial applications, and to alter it and redistribute it
137db96d56Sopenharmony_ci * freely, subject to the following restrictions:
147db96d56Sopenharmony_ci *
157db96d56Sopenharmony_ci * 1. The origin of this software must not be misrepresented; you must not
167db96d56Sopenharmony_ci *    claim that you wrote the original software. If you use this software
177db96d56Sopenharmony_ci *    in a product, an acknowledgment in the product documentation would be
187db96d56Sopenharmony_ci *    appreciated but is not required.
197db96d56Sopenharmony_ci * 2. Altered source versions must be plainly marked as such, and must not be
207db96d56Sopenharmony_ci *    misrepresented as being the original software.
217db96d56Sopenharmony_ci * 3. This notice may not be removed or altered from any source distribution.
227db96d56Sopenharmony_ci */
237db96d56Sopenharmony_ci
247db96d56Sopenharmony_ci#ifndef PYSQLITE_CURSOR_H
257db96d56Sopenharmony_ci#define PYSQLITE_CURSOR_H
267db96d56Sopenharmony_ci#define PY_SSIZE_T_CLEAN
277db96d56Sopenharmony_ci#include "Python.h"
287db96d56Sopenharmony_ci
297db96d56Sopenharmony_ci#include "statement.h"
307db96d56Sopenharmony_ci#include "connection.h"
317db96d56Sopenharmony_ci#include "module.h"
327db96d56Sopenharmony_ci
337db96d56Sopenharmony_citypedef struct
347db96d56Sopenharmony_ci{
357db96d56Sopenharmony_ci    PyObject_HEAD
367db96d56Sopenharmony_ci    pysqlite_Connection* connection;
377db96d56Sopenharmony_ci    PyObject* description;
387db96d56Sopenharmony_ci    PyObject* row_cast_map;
397db96d56Sopenharmony_ci    int arraysize;
407db96d56Sopenharmony_ci    PyObject* lastrowid;
417db96d56Sopenharmony_ci    long rowcount;
427db96d56Sopenharmony_ci    PyObject* row_factory;
437db96d56Sopenharmony_ci    pysqlite_Statement* statement;
447db96d56Sopenharmony_ci    int closed;
457db96d56Sopenharmony_ci    int locked;
467db96d56Sopenharmony_ci    int initialized;
477db96d56Sopenharmony_ci
487db96d56Sopenharmony_ci    PyObject* in_weakreflist; /* List of weak references */
497db96d56Sopenharmony_ci} pysqlite_Cursor;
507db96d56Sopenharmony_ci
517db96d56Sopenharmony_ciint pysqlite_cursor_setup_types(PyObject *module);
527db96d56Sopenharmony_ci
537db96d56Sopenharmony_ci#endif
54