File: cursor.h

package info (click to toggle)
mariadb-connector-python 1.1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 812 kB
  • sloc: python: 6,099; ansic: 4,896; sh: 23; makefile: 14
file content (144 lines) | stat: -rw-r--r-- 4,518 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/************************************************************************************
    Copyright (C) 2019 Georg Richter and MariaDB Corporation AB

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; if not see <http://www.gnu.org/licenses>
   or write to the Free Software Foundation, Inc.,
   51 Franklin St., Fifth Floor, Boston, MA 02110, USA
*************************************************************************************/

PyDoc_STRVAR(
  cursor_description__doc__,
  "This read-only attribute is a sequence of 11-item sequences\n"
  "Each of these sequences contains information describing one result column:\n\n"
  "- name\n"
  "- type_code\n"
  "- display_size\n"
  "- internal_size\n"
  "- precision\n"
  "- scale\n"
  "- null_ok\n"
  "- field_flags\n"
  "- table_name\n"
  "- original_column_name\n"
  "- original_table_name\n\n"
  "This attribute will be None for operations that do not return rows or if the cursor has\n"
  "not had an operation invoked via the .execute*() method yet.\n\n"
);

PyDoc_STRVAR(
  cursor_metadata__doc__,
  "Similar to description property, this property returns a dictionary with complete metadata.\n\n"
  "The dictionary contains the following keys:\n\n"
  "- catalog:     catalog (always 'def')\n"
  "- schema:      current schema\n"
  "- field:       alias column name or if no alias was specified column name\n"
  "- org_field:   original column name\n"
  "- table:       alias table name or if no alias was specified table name\n"
  "- org_table:   original table name\n"
  "- type:        column type\n"
  "- charset:     character set (utf8mb4 or binary)\n"
  "- length:      The length of the column\n"
  "- max length:  The maximum length of the column\n"
  "- decimals:    The numer of decimals\n"
  "- flags:       Flags (flags are defined in constants.FIELD_FLAG)\n"
  "- ext_type:    Extended data type (types are defined in constants.EXT_FIELD_TYPE)\n"
);

PyDoc_STRVAR(
  cursor_warnings__doc__,
  "Returns the number of warnings from the last executed statement, or zero\n"
  "if there are no warnings.\n\n"
);

PyDoc_STRVAR(
  cursor_closed__doc__,
  "Indicates if the cursor is closed and can't be reused"
);

PyDoc_STRVAR(
  cursor_buffered__doc__,
  "When True all result sets are immediately transferred and the connection\n"
  "between client and server is no longer blocked. Since version 1.1.0 default\n"
  "is True, for prior versions default was False."
);

PyDoc_STRVAR(
  cursor_close__doc__,
  "close()\n"
  "--\n"
  "\n"
  "Closes the cursor. If the cursor has pending or unread results, .close()\n"
  "will cancel them so that further operations using the same connection\n"
  "can be executed.\n\n"
  "The cursor will be unusable from this point forward; an Error (or subclass)\n"
  "exception will be raised if any operation is attempted with the cursor."
);

PyDoc_STRVAR(
  cursor_fetchone__doc__,
  "fetchone()\n"
  "--\n"
  "\n"
  "Fetches next row of a pending result set and returns a tuple.\n"
);

PyDoc_STRVAR(
  cursor_field_count__doc__,
  "field_count()\n"
  "--\n"
  "\n"
  "Returns the number of fields (columns) of a result set."
);

PyDoc_STRVAR(
  cursor_nextset__doc__,
  "nextset()\n"
  "--\n"
  "\n"
  "Will make the cursor skip to the next available result set,\n"
  "discarding any remaining rows from the current set."
);

PyDoc_STRVAR(
  cursor_next__doc__,
  "next()\n"
  "--\n"
  "\n"
  "Return the next row from the currently executed SQL statement\n"
  "using the same semantics as .fetchone()."
);

PyDoc_STRVAR(
  cursor_statement__doc__,
  "(read only)\n\n"
  "The last executed statement"
);

PyDoc_STRVAR(
  cursor_rownumber__doc__,
  "(read only)\n\n"
  "Current row number in result set"
);

PyDoc_STRVAR(
  cursor_arraysize__doc__,
  "(read/write)\n\n"
  "the number of rows to fetch"
);

PyDoc_STRVAR(
  cursor_paramcount__doc__,
  "(read)\n\n"
  "Returns the number of parameter markers present in the executed statement."
);