massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / psycopg2 / psycopg2 / _psycopg.pyi
1 from typing import Any, Tuple, overload
2
3 import psycopg2
4 import psycopg2.extensions
5
6 BINARY: Any
7 BINARYARRAY: Any
8 BOOLEAN: Any
9 BOOLEANARRAY: Any
10 BYTES: Any
11 BYTESARRAY: Any
12 CIDRARRAY: Any
13 DATE: Any
14 DATEARRAY: Any
15 DATETIME: Any
16 DATETIMEARRAY: Any
17 DATETIMETZ: Any
18 DATETIMETZARRAY: Any
19 DECIMAL: Any
20 DECIMALARRAY: Any
21 FLOAT: Any
22 FLOATARRAY: Any
23 INETARRAY: Any
24 INTEGER: Any
25 INTEGERARRAY: Any
26 INTERVAL: Any
27 INTERVALARRAY: Any
28 LONGINTEGER: Any
29 LONGINTEGERARRAY: Any
30 MACADDRARRAY: Any
31 NUMBER: Any
32 PYDATE: Any
33 PYDATEARRAY: Any
34 PYDATETIME: Any
35 PYDATETIMEARRAY: Any
36 PYDATETIMETZ: Any
37 PYDATETIMETZARRAY: Any
38 PYINTERVAL: Any
39 PYINTERVALARRAY: Any
40 PYTIME: Any
41 PYTIMEARRAY: Any
42 REPLICATION_LOGICAL: int
43 REPLICATION_PHYSICAL: int
44 ROWID: Any
45 ROWIDARRAY: Any
46 STRING: Any
47 STRINGARRAY: Any
48 TIME: Any
49 TIMEARRAY: Any
50 UNICODE: Any
51 UNICODEARRAY: Any
52 UNKNOWN: Any
53 adapters: dict[Any, Any]
54 apilevel: str
55 binary_types: dict[Any, Any]
56 encodings: dict[Any, Any]
57 paramstyle: str
58 sqlstate_errors: dict[Any, Any]
59 string_types: dict[Any, Any]
60 threadsafety: int
61
62 __libpq_version__: int
63
64 class AsIs:
65     adapted: Any
66     def __init__(self, *args, **kwargs) -> None: ...
67     def getquoted(self, *args, **kwargs): ...
68     def __conform__(self, *args, **kwargs): ...
69
70 class Binary:
71     adapted: Any
72     buffer: Any
73     def __init__(self, *args, **kwargs) -> None: ...
74     def getquoted(self, *args, **kwargs): ...
75     def prepare(self, conn): ...
76     def __conform__(self, *args, **kwargs): ...
77
78 class Boolean:
79     adapted: Any
80     def __init__(self, *args, **kwargs) -> None: ...
81     def getquoted(self, *args, **kwargs): ...
82     def __conform__(self, *args, **kwargs): ...
83
84 class Column:
85     display_size: Any
86     internal_size: Any
87     name: Any
88     null_ok: Any
89     precision: Any
90     scale: Any
91     table_column: Any
92     table_oid: Any
93     type_code: Any
94     def __init__(self, *args, **kwargs) -> None: ...
95     def __eq__(self, other): ...
96     def __ge__(self, other): ...
97     def __getitem__(self, index): ...
98     def __getstate__(self): ...
99     def __gt__(self, other): ...
100     def __le__(self, other): ...
101     def __len__(self): ...
102     def __lt__(self, other): ...
103     def __ne__(self, other): ...
104     def __setstate__(self, state): ...
105
106 class ConnectionInfo:
107     backend_pid: Any
108     dbname: Any
109     dsn_parameters: Any
110     error_message: Any
111     host: Any
112     needs_password: Any
113     options: Any
114     password: Any
115     port: Any
116     protocol_version: Any
117     server_version: Any
118     socket: Any
119     ssl_attribute_names: Any
120     ssl_in_use: Any
121     status: Any
122     transaction_status: Any
123     used_password: Any
124     user: Any
125     def __init__(self, *args, **kwargs) -> None: ...
126     def parameter_status(self, *args, **kwargs): ...
127     def ssl_attribute(self, *args, **kwargs): ...
128
129 class DataError(psycopg2.DatabaseError): ...
130 class DatabaseError(psycopg2.Error): ...
131
132 class Decimal:
133     adapted: Any
134     def __init__(self, *args, **kwargs) -> None: ...
135     def getquoted(self, *args, **kwargs): ...
136     def __conform__(self, *args, **kwargs): ...
137
138 class Diagnostics:
139     column_name: Any
140     constraint_name: Any
141     context: Any
142     datatype_name: Any
143     internal_position: Any
144     internal_query: Any
145     message_detail: Any
146     message_hint: Any
147     message_primary: Any
148     schema_name: Any
149     severity: Any
150     severity_nonlocalized: Any
151     source_file: Any
152     source_function: Any
153     source_line: Any
154     sqlstate: Any
155     statement_position: Any
156     table_name: Any
157     def __init__(self, *args, **kwargs) -> None: ...
158
159 class Error(Exception):
160     cursor: Any
161     diag: Any
162     pgcode: Any
163     pgerror: Any
164     def __init__(self, *args, **kwargs) -> None: ...
165     def __reduce__(self): ...
166     def __setstate__(self, state): ...
167
168 class Float:
169     adapted: Any
170     def __init__(self, *args, **kwargs) -> None: ...
171     def getquoted(self, *args, **kwargs): ...
172     def __conform__(self, *args, **kwargs): ...
173
174 class ISQLQuote:
175     _wrapped: Any
176     def __init__(self, *args, **kwargs) -> None: ...
177     def getbinary(self, *args, **kwargs): ...
178     def getbuffer(self, *args, **kwargs): ...
179     def getquoted(self, *args, **kwargs): ...
180
181 class Int:
182     adapted: Any
183     def __init__(self, *args, **kwargs) -> None: ...
184     def getquoted(self, *args, **kwargs): ...
185     def __conform__(self, *args, **kwargs): ...
186
187 class IntegrityError(psycopg2.DatabaseError): ...
188 class InterfaceError(psycopg2.Error): ...
189 class InternalError(psycopg2.DatabaseError): ...
190
191 class List:
192     adapted: Any
193     def __init__(self, *args, **kwargs) -> None: ...
194     def getquoted(self, *args, **kwargs): ...
195     def prepare(self, *args, **kwargs): ...
196     def __conform__(self, *args, **kwargs): ...
197
198 class NotSupportedError(psycopg2.DatabaseError): ...
199
200 class Notify:
201     channel: Any
202     payload: Any
203     pid: Any
204     def __init__(self, *args, **kwargs) -> None: ...
205     def __eq__(self, other): ...
206     def __ge__(self, other): ...
207     def __getitem__(self, index): ...
208     def __gt__(self, other): ...
209     def __hash__(self): ...
210     def __le__(self, other): ...
211     def __len__(self): ...
212     def __lt__(self, other): ...
213     def __ne__(self, other): ...
214
215 class OperationalError(psycopg2.DatabaseError): ...
216 class ProgrammingError(psycopg2.DatabaseError): ...
217 class QueryCanceledError(psycopg2.OperationalError): ...
218
219 class QuotedString:
220     adapted: Any
221     buffer: Any
222     encoding: Any
223     def __init__(self, *args, **kwargs) -> None: ...
224     def getquoted(self, *args, **kwargs): ...
225     def prepare(self, *args, **kwargs): ...
226     def __conform__(self, *args, **kwargs): ...
227
228 class ReplicationConnection(psycopg2.extensions.connection):
229     autocommit: Any
230     isolation_level: Any
231     replication_type: Any
232     reset: Any
233     set_isolation_level: Any
234     set_session: Any
235     def __init__(self, *args, **kwargs) -> None: ...
236
237 class ReplicationCursor(psycopg2.extensions.cursor):
238     feedback_timestamp: Any
239     io_timestamp: Any
240     wal_end: Any
241     def __init__(self, *args, **kwargs) -> None: ...
242     def consume_stream(self, consumer, keepalive_interval=...): ...
243     def read_message(self, *args, **kwargs): ...
244     def send_feedback(self, write_lsn=..., flush_lsn=..., apply_lsn=..., reply=..., force=...): ...
245     def start_replication_expert(self, command, decode=..., status_interval=...): ...
246
247 class ReplicationMessage:
248     cursor: Any
249     data_size: Any
250     data_start: Any
251     payload: Any
252     send_time: Any
253     wal_end: Any
254     def __init__(self, *args, **kwargs) -> None: ...
255
256 class TransactionRollbackError(psycopg2.OperationalError): ...
257 class Warning(Exception): ...
258
259 class Xid:
260     bqual: Any
261     database: Any
262     format_id: Any
263     gtrid: Any
264     owner: Any
265     prepared: Any
266     def __init__(self, *args, **kwargs) -> None: ...
267     def from_string(self, *args, **kwargs): ...
268     def __getitem__(self, index): ...
269     def __len__(self): ...
270
271 _cursor = cursor
272
273 class connection:
274     DataError: Any
275     DatabaseError: Any
276     Error: Any
277     IntegrityError: Any
278     InterfaceError: Any
279     InternalError: Any
280     NotSupportedError: Any
281     OperationalError: Any
282     ProgrammingError: Any
283     Warning: Any
284     async_: Any
285     autocommit: Any
286     binary_types: Any
287     closed: Any
288     cursor_factory: Any
289     deferrable: Any
290     dsn: Any
291     encoding: Any
292     info: Any
293     isolation_level: Any
294     notices: Any
295     notifies: Any
296     pgconn_ptr: Any
297     protocol_version: Any
298     readonly: Any
299     server_version: Any
300     status: Any
301     string_types: Any
302     def __init__(self, *args, **kwargs) -> None: ...
303     def cancel(self, *args, **kwargs): ...
304     def close(self, *args, **kwargs): ...
305     def commit(self, *args, **kwargs): ...
306     @overload
307     def cursor(self) -> _cursor: ...
308     @overload
309     def cursor(self, name=..., cursor_factory: Any = ..., withhold=...) -> Any: ...
310     def fileno(self, *args, **kwargs): ...
311     def get_backend_pid(self, *args, **kwargs): ...
312     def get_dsn_parameters(self, *args, **kwargs): ...
313     def get_native_connection(self, *args, **kwargs): ...
314     def get_parameter_status(self, parameter): ...
315     def get_transaction_status(self): ...
316     def isexecuting(self, *args, **kwargs): ...
317     def lobject(self, oid=..., mode=..., new_oid=..., new_file=..., lobject_factory=...): ...
318     def poll(self, *args, **kwargs): ...
319     def reset(self): ...
320     def rollback(self): ...
321     def set_client_encoding(self, encoding): ...
322     def set_isolation_level(self, level): ...
323     def set_session(self, *args, **kwargs): ...
324     def tpc_begin(self, xid): ...
325     def tpc_commit(self, *args, **kwargs): ...
326     def tpc_prepare(self): ...
327     def tpc_recover(self): ...
328     def tpc_rollback(self, *args, **kwargs): ...
329     def xid(self, format_id, gtrid, bqual): ...
330     def __enter__(self): ...
331     def __exit__(self, type, value, traceback): ...
332
333 class cursor:
334     arraysize: int
335     binary_types: Any
336     closed: Any
337     connection: Any
338     description: Any
339     itersize: Any
340     lastrowid: Any
341     name: Any
342     pgresult_ptr: Any
343     query: Any
344     row_factory: Any
345     rowcount: int
346     rownumber: int
347     scrollable: Any
348     statusmessage: Any
349     string_types: Any
350     typecaster: Any
351     tzinfo_factory: Any
352     withhold: Any
353     def __init__(self, *args, **kwargs) -> None: ...
354     def callproc(self, procname, parameters=...): ...
355     def cast(self, oid, s): ...
356     def close(self): ...
357     def copy_expert(self, sql, file, size=...): ...
358     def copy_from(self, file, table, sep=..., null=..., size=..., columns=...): ...
359     def copy_to(self, file, table, sep=..., null=..., columns=...): ...
360     def execute(self, query, vars=...): ...
361     def executemany(self, query, vars_list): ...
362     def fetchall(self) -> list[Tuple[Any, ...]]: ...
363     def fetchmany(self, size=...) -> list[Tuple[Any, ...]]: ...
364     def fetchone(self) -> Tuple[Any, ...] | Any: ...
365     def mogrify(self, *args, **kwargs): ...
366     def nextset(self): ...
367     def scroll(self, value, mode=...): ...
368     def setinputsizes(self, sizes): ...
369     def setoutputsize(self, size, column=...): ...
370     def __enter__(self): ...
371     def __exit__(self, type, value, traceback): ...
372     def __iter__(self): ...
373     def __next__(self): ...
374
375 class lobject:
376     closed: Any
377     mode: Any
378     oid: Any
379     def __init__(self, *args, **kwargs) -> None: ...
380     def close(self): ...
381     def export(self, filename): ...
382     def read(self, size=...): ...
383     def seek(self, offset, whence=...): ...
384     def tell(self): ...
385     def truncate(self, len=...): ...
386     def unlink(self): ...
387     def write(self, str): ...
388
389 def Date(year, month, day): ...
390 def DateFromPy(*args, **kwargs): ...
391 def DateFromTicks(ticks): ...
392 def IntervalFromPy(*args, **kwargs): ...
393 def Time(hour, minutes, seconds, tzinfo=...): ...
394 def TimeFromPy(*args, **kwargs): ...
395 def TimeFromTicks(ticks): ...
396 def Timestamp(year, month, day, hour, minutes, seconds, tzinfo=...): ...
397 def TimestampFromPy(*args, **kwargs): ...
398 def TimestampFromTicks(ticks): ...
399 def _connect(*args, **kwargs): ...
400 def adapt(*args, **kwargs): ...
401 def encrypt_password(*args, **kwargs): ...
402 def get_wait_callback(*args, **kwargs): ...
403 def libpq_version(*args, **kwargs): ...
404 def new_array_type(oids, name, baseobj): ...
405 def new_type(oids, name, castobj): ...
406 def parse_dsn(*args, **kwargs): ...
407 def quote_ident(*args, **kwargs): ...
408 def register_type(*args, **kwargs): ...
409 def set_wait_callback(_none): ...