Mercurial > cpython-lru_cache-weakref
annotate Modules/_sqlite/cursor.h @ 58765:2ba7677bfa95 legacy-trunk
testCopysign was defined twice in test_math; combine the definitions
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sat, 06 Feb 2010 23:11:25 +0000 |
| parents | 2925b568aacc |
| children | 04d3ae52ff73 |
| rev | line source |
|---|---|
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
1 /* cursor.h - definitions for the cursor type |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
2 * |
|
46178
e06e08e8fdce
Bring sqlite3 module up-to-date with what's now in 2.6. Almost. I intentionally
Gerhard Häring <gh@ghaering.de>
parents:
40643
diff
changeset
|
3 * Copyright (C) 2004-2007 Gerhard Häring <gh@ghaering.de> |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
4 * |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
5 * This file is part of pysqlite. |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
6 * |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
7 * This software is provided 'as-is', without any express or implied |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
8 * warranty. In no event will the authors be held liable for any damages |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
9 * arising from the use of this software. |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
10 * |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
11 * Permission is granted to anyone to use this software for any purpose, |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
12 * including commercial applications, and to alter it and redistribute it |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
13 * freely, subject to the following restrictions: |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
14 * |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
15 * 1. The origin of this software must not be misrepresented; you must not |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
16 * claim that you wrote the original software. If you use this software |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
17 * in a product, an acknowledgment in the product documentation would be |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
18 * appreciated but is not required. |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
19 * 2. Altered source versions must be plainly marked as such, and must not be |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
20 * misrepresented as being the original software. |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
21 * 3. This notice may not be removed or altered from any source distribution. |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
22 */ |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
23 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
24 #ifndef PYSQLITE_CURSOR_H |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
25 #define PYSQLITE_CURSOR_H |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
26 #include "Python.h" |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
27 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
28 #include "statement.h" |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
29 #include "connection.h" |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
30 #include "module.h" |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
31 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
32 typedef struct |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
33 { |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
34 PyObject_HEAD |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
35 pysqlite_Connection* connection; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
36 PyObject* description; |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
37 PyObject* row_cast_map; |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
38 int arraysize; |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
39 PyObject* lastrowid; |
|
47559
2925b568aacc
Merged revisions 63562,63570,63728,63734,63784,63788,63802,63817,63827,63839,63887,63975,63998 via svnmerge from
Georg Brandl <georg@python.org>
parents:
46178
diff
changeset
|
40 long rowcount; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
41 PyObject* row_factory; |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
42 pysqlite_Statement* statement; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
43 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
44 /* the next row to be returned, NULL if no next row available */ |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
45 PyObject* next_row; |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
46 } pysqlite_Cursor; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
47 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
48 typedef enum { |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
49 STATEMENT_INVALID, STATEMENT_INSERT, STATEMENT_DELETE, |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
50 STATEMENT_UPDATE, STATEMENT_REPLACE, STATEMENT_SELECT, |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
51 STATEMENT_OTHER |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
52 } pysqlite_StatementKind; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
53 |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
54 extern PyTypeObject pysqlite_CursorType; |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
55 |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
56 int pysqlite_cursor_init(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
57 void pysqlite_cursor_dealloc(pysqlite_Cursor* self); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
58 PyObject* pysqlite_cursor_execute(pysqlite_Cursor* self, PyObject* args); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
59 PyObject* pysqlite_cursor_executemany(pysqlite_Cursor* self, PyObject* args); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
60 PyObject* pysqlite_cursor_getiter(pysqlite_Cursor *self); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
61 PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
62 PyObject* pysqlite_cursor_fetchone(pysqlite_Cursor* self, PyObject* args); |
|
46178
e06e08e8fdce
Bring sqlite3 module up-to-date with what's now in 2.6. Almost. I intentionally
Gerhard Häring <gh@ghaering.de>
parents:
40643
diff
changeset
|
63 PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs); |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
64 PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
65 PyObject* pysqlite_noop(pysqlite_Connection* self, PyObject* args); |
|
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
66 PyObject* pysqlite_cursor_close(pysqlite_Cursor* self, PyObject* args); |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
67 |
|
40643
47f9efdc0855
Merged revisions 53304-53433,53435-53450 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
38453
diff
changeset
|
68 int pysqlite_cursor_setup_types(void); |
|
37879
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
69 |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
70 #define UNKNOWN (-1) |
|
f731859e9b3b
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
71 #endif |
