psqlpy 0.11.10__cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,152 @@
1
+ class WarningError(Exception):
2
+ """
3
+ Exception raised for important warnings
4
+ like data truncations while inserting, etc.
5
+ """
6
+
7
+ class Error(Exception):
8
+ """
9
+ Exception that is the base class of all other error exceptions.
10
+
11
+ You can use this to catch all errors with one single except statement.
12
+ """
13
+
14
+ class InterfaceError(Error):
15
+ """
16
+ Exception raised for errors that are related to the
17
+ database interface rather than the database itself.
18
+ """
19
+
20
+ class DatabaseError(Error):
21
+ """Exception raised for errors that are related to the database."""
22
+
23
+ class DataError(DatabaseError):
24
+ """
25
+ Exception raised for errors that are due to problems with
26
+ the processed data like division by zero, numeric value out of range, etc.
27
+ """
28
+
29
+ class OperationalError(DatabaseError):
30
+ """
31
+ Exception raised for errors that are related to the database’s operation
32
+ and not necessarily under the control of the programmer,
33
+ e.g. an unexpected disconnect occurs, the data source name is not found,
34
+ a transaction could not be processed, a memory allocation error
35
+ occurred during processing, etc.
36
+ """
37
+
38
+ class IntegrityError(DatabaseError):
39
+ """
40
+ Exception raised when the relational integrity of the
41
+ database is affected, e.g. a foreign key check fails.
42
+ """
43
+
44
+ class InternalError(DatabaseError):
45
+ """
46
+ Exception raised when the database encounters an internal error,
47
+ e.g. the cursor is not valid anymore, the transaction is out of sync, etc.
48
+ """
49
+
50
+ class ProgrammingError(DatabaseError):
51
+ """
52
+ Exception raised for programming errors, e.g. table not found or
53
+ already exists, syntax error in the SQL statement,
54
+ wrong number of parameters specified, etc.
55
+ """
56
+
57
+ class NotSupportedError(DatabaseError):
58
+ """
59
+ Exception raised in case a method or database API was used which
60
+ is not supported by the database, e.g. requesting a .rollback()
61
+ on a connection that does not support transaction
62
+ or has transactions turned off.
63
+ """
64
+
65
+ class BaseConnectionPoolError(InterfaceError):
66
+ """Base error for all Connection Pool errors."""
67
+
68
+ class ConnectionPoolBuildError(BaseConnectionPoolError):
69
+ """Error for errors in building connection pool."""
70
+
71
+ class ConnectionPoolConfigurationError(BaseConnectionPoolError):
72
+ """Error in connection pool configuration."""
73
+
74
+ class ConnectionPoolExecuteError(BaseConnectionPoolError):
75
+ """Error in connection pool execution."""
76
+
77
+ class BaseConnectionError(InterfaceError):
78
+ """Base error for Connection errors."""
79
+
80
+ class ConnectionExecuteError(BaseConnectionError):
81
+ """Error in connection execution."""
82
+
83
+ class ConnectionClosedError(BaseConnectionError):
84
+ """Error if underlying connection is already closed."""
85
+
86
+ class BaseTransactionError(InterfaceError):
87
+ """Base error for all transaction errors."""
88
+
89
+ class TransactionBeginError(BaseTransactionError):
90
+ """Error in transaction begin."""
91
+
92
+ class TransactionCommitError(BaseTransactionError):
93
+ """Error in transaction commit."""
94
+
95
+ class TransactionRollbackError(BaseTransactionError):
96
+ """Error in transaction rollback."""
97
+
98
+ class TransactionSavepointError(BaseTransactionError):
99
+ """Error in transaction savepoint."""
100
+
101
+ class TransactionExecuteError(BaseTransactionError):
102
+ """Error in transaction execution."""
103
+
104
+ class TransactionClosedError(BaseTransactionError):
105
+ """Error if underlying connection is already closed."""
106
+
107
+ class BaseCursorError(InterfaceError):
108
+ """Base error for Cursor errors."""
109
+
110
+ class CursorStartError(BaseCursorError):
111
+ """Error in cursor declare."""
112
+
113
+ class CursorCloseError(BaseCursorError):
114
+ """Error in cursor close."""
115
+
116
+ class CursorFetchError(BaseCursorError):
117
+ """Error in cursor fetch (any fetch)."""
118
+
119
+ class CursorClosedError(BaseCursorError):
120
+ """Error if underlying connection is already closed."""
121
+
122
+ class UUIDValueConvertError(DataError):
123
+ """Error if it's impossible to convert py string UUID into rust UUID."""
124
+
125
+ class MacAddrConversionError(DataError):
126
+ """Error if cannot convert MacAddr string value to rust type."""
127
+
128
+ class RustToPyValueMappingError(DataError):
129
+ """Error if it is not possible to covert rust type to python.
130
+
131
+ You can get it if you database contains data type that it not
132
+ supported by this library.
133
+ """
134
+
135
+ class PyToRustValueMappingError(DataError):
136
+ """Error if it is not possible to covert python type to rust.
137
+
138
+ You can get this exception when executing queries with parameters.
139
+ So, if there are no parameters for the query, don't handle this error.
140
+ """
141
+
142
+ class BaseListenerError(InterfaceError):
143
+ """Base error for all Listener errors."""
144
+
145
+ class ListenerStartError(BaseListenerError):
146
+ """Error if listener start failed."""
147
+
148
+ class ListenerClosedError(BaseListenerError):
149
+ """Error if listener manipulated but it's closed."""
150
+
151
+ class ListenerCallbackError(BaseListenerError):
152
+ """Error if callback passed to listener isn't a coroutine."""