@@ -68,6 +68,52 @@ threadsafety: int
68
68
69
69
__libpq_version__ : int
70
70
71
+ class cursor :
72
+ arraysize : int
73
+ binary_types : Any
74
+ closed : Any
75
+ connection : Any
76
+ description : Any
77
+ itersize : Any
78
+ lastrowid : Any
79
+ name : Any
80
+ pgresult_ptr : Any
81
+ query : Any
82
+ row_factory : Any
83
+ rowcount : int
84
+ rownumber : int
85
+ scrollable : Any
86
+ statusmessage : Any
87
+ string_types : Any
88
+ typecaster : Any
89
+ tzinfo_factory : Any
90
+ withhold : Any
91
+ def __init__ (self , * args , ** kwargs ) -> None : ...
92
+ def callproc (self , procname , parameters = ...): ...
93
+ def cast (self , oid , s ): ...
94
+ def close (self ): ...
95
+ def copy_expert (self , sql : str | bytes | Composable , file , size = ...): ...
96
+ def copy_from (self , file , table , sep = ..., null = ..., size = ..., columns = ...): ...
97
+ def copy_to (self , file , table , sep = ..., null = ..., columns = ...): ...
98
+ def execute (self , query : str | bytes | Composable , vars : _Vars = ...) -> None : ...
99
+ def executemany (self , query : str | bytes | Composable , vars_list : Iterable [_Vars ]) -> None : ...
100
+ def fetchall (self ) -> list [tuple [Any , ...]]: ...
101
+ def fetchmany (self , size = ...) -> list [tuple [Any , ...]]: ...
102
+ def fetchone (self ) -> tuple [Any , ...] | None : ...
103
+ def mogrify (self , * args , ** kwargs ): ...
104
+ def nextset (self ): ...
105
+ def scroll (self , value , mode = ...): ...
106
+ def setinputsizes (self , sizes ): ...
107
+ def setoutputsize (self , size , column = ...): ...
108
+ def __enter__ (self : Self ) -> Self : ...
109
+ def __exit__ (
110
+ self , type : type [BaseException ] | None , value : BaseException | None , traceback : TracebackType | None
111
+ ) -> None : ...
112
+ def __iter__ (self : Self ) -> Self : ...
113
+ def __next__ (self ) -> tuple [Any , ...]: ...
114
+
115
+ _cursor : TypeAlias = cursor
116
+
71
117
class AsIs :
72
118
adapted : Any
73
119
def __init__ (self , * args , ** kwargs ) -> None : ...
@@ -143,31 +189,31 @@ class Decimal:
143
189
def __conform__ (self , * args , ** kwargs ): ...
144
190
145
191
class Diagnostics :
146
- column_name : Any
147
- constraint_name : Any
148
- context : Any
149
- datatype_name : Any
150
- internal_position : Any
151
- internal_query : Any
152
- message_detail : Any
153
- message_hint : Any
154
- message_primary : Any
155
- schema_name : Any
156
- severity : Any
157
- severity_nonlocalized : Any
158
- source_file : Any
159
- source_function : Any
160
- source_line : Any
161
- sqlstate : Any
162
- statement_position : Any
163
- table_name : Any
164
- def __init__ (self , * args , ** kwargs ) -> None : ...
192
+ column_name : str | None
193
+ constraint_name : str | None
194
+ context : str | None
195
+ datatype_name : str | None
196
+ internal_position : str | None
197
+ internal_query : str | None
198
+ message_detail : str | None
199
+ message_hint : str | None
200
+ message_primary : str | None
201
+ schema_name : str | None
202
+ severity : str | None
203
+ severity_nonlocalized : str | None
204
+ source_file : str | None
205
+ source_function : str | None
206
+ source_line : str | None
207
+ sqlstate : str | None
208
+ statement_position : str | None
209
+ table_name : str | None
210
+ def __init__ (self , __err : Error ) -> None : ...
165
211
166
212
class Error (Exception ):
167
- cursor : Any
168
- diag : Any
169
- pgcode : Any
170
- pgerror : Any
213
+ cursor : _cursor | None
214
+ diag : Diagnostics
215
+ pgcode : str | None
216
+ pgerror : str | None
171
217
def __init__ (self , * args , ** kwargs ) -> None : ...
172
218
def __reduce__ (self ): ...
173
219
def __setstate__ (self , state ): ...
@@ -241,7 +287,7 @@ class ReplicationConnection(psycopg2.extensions.connection):
241
287
set_session : Any
242
288
def __init__ (self , * args , ** kwargs ) -> None : ...
243
289
244
- class ReplicationCursor (psycopg2 . extensions . cursor ):
290
+ class ReplicationCursor (cursor ):
245
291
feedback_timestamp : Any
246
292
io_timestamp : Any
247
293
wal_end : Any
@@ -275,7 +321,6 @@ class Xid:
275
321
def __getitem__ (self , __index ): ...
276
322
def __len__ (self ): ...
277
323
278
- _cursor : TypeAlias = cursor
279
324
_T_cur = TypeVar ("_T_cur" , bound = _cursor )
280
325
281
326
class connection :
@@ -338,50 +383,6 @@ class connection:
338
383
def __enter__ (self ): ...
339
384
def __exit__ (self , type , value , traceback ): ...
340
385
341
- class cursor :
342
- arraysize : int
343
- binary_types : Any
344
- closed : Any
345
- connection : Any
346
- description : Any
347
- itersize : Any
348
- lastrowid : Any
349
- name : Any
350
- pgresult_ptr : Any
351
- query : Any
352
- row_factory : Any
353
- rowcount : int
354
- rownumber : int
355
- scrollable : Any
356
- statusmessage : Any
357
- string_types : Any
358
- typecaster : Any
359
- tzinfo_factory : Any
360
- withhold : Any
361
- def __init__ (self , * args , ** kwargs ) -> None : ...
362
- def callproc (self , procname , parameters = ...): ...
363
- def cast (self , oid , s ): ...
364
- def close (self ): ...
365
- def copy_expert (self , sql : str | bytes | Composable , file , size = ...): ...
366
- def copy_from (self , file , table , sep = ..., null = ..., size = ..., columns = ...): ...
367
- def copy_to (self , file , table , sep = ..., null = ..., columns = ...): ...
368
- def execute (self , query : str | bytes | Composable , vars : _Vars = ...) -> None : ...
369
- def executemany (self , query : str | bytes | Composable , vars_list : Iterable [_Vars ]) -> None : ...
370
- def fetchall (self ) -> list [tuple [Any , ...]]: ...
371
- def fetchmany (self , size = ...) -> list [tuple [Any , ...]]: ...
372
- def fetchone (self ) -> tuple [Any , ...] | None : ...
373
- def mogrify (self , * args , ** kwargs ): ...
374
- def nextset (self ): ...
375
- def scroll (self , value , mode = ...): ...
376
- def setinputsizes (self , sizes ): ...
377
- def setoutputsize (self , size , column = ...): ...
378
- def __enter__ (self : Self ) -> Self : ...
379
- def __exit__ (
380
- self , type : type [BaseException ] | None , value : BaseException | None , traceback : TracebackType | None
381
- ) -> None : ...
382
- def __iter__ (self : Self ) -> Self : ...
383
- def __next__ (self ) -> tuple [Any , ...]: ...
384
-
385
386
class lobject :
386
387
closed : Any
387
388
mode : Any
0 commit comments