@native-systems/utility 1.0.0

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,641 @@
1
+ declare module "@native-systems/utility" {
2
+ export enum PostgresError {
3
+ /** Class 00 - Successful Completion: [S] successful_completion */
4
+ SUCCESSFUL_COMPLETION = "00000",
5
+ /** Class 01 - Warning: [W] warning */
6
+ WARNING = "01000",
7
+ /** Class 01 - Warning: [W] dynamic_result_sets_returned */
8
+ WARNING_DYNAMIC_RESULT_SETS_RETURNED = "0100C",
9
+ /** Class 01 - Warning: [W] implicit_zero_bit_padding */
10
+ WARNING_IMPLICIT_ZERO_BIT_PADDING = "01008",
11
+ /** Class 01 - Warning: [W] null_value_eliminated_in_set_function */
12
+ WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION = "01003",
13
+ /** Class 01 - Warning: [W] privilege_not_granted */
14
+ WARNING_PRIVILEGE_NOT_GRANTED = "01007",
15
+ /** Class 01 - Warning: [W] privilege_not_revoked */
16
+ WARNING_PRIVILEGE_NOT_REVOKED = "01006",
17
+ /** Class 01 - Warning: [W] string_data_right_truncation */
18
+ WARNING_STRING_DATA_RIGHT_TRUNCATION = "01004",
19
+ /** Class 01 - Warning: [W] deprecated_feature */
20
+ WARNING_DEPRECATED_FEATURE = "01P01",
21
+ /** Class 02 - No Data (this is also a warning class per the SQL standard): [W] no_data */
22
+ NO_DATA = "02000",
23
+ /** Class 02 - No Data (this is also a warning class per the SQL standard): [W] no_additional_dynamic_result_sets_returned */
24
+ NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED = "02001",
25
+ /** Class 03 - SQL Statement Not Yet Complete: [E] sql_statement_not_yet_complete */
26
+ SQL_STATEMENT_NOT_YET_COMPLETE = "03000",
27
+ /** Class 08 - Connection Exception: [E] connection_exception */
28
+ CONNECTION_EXCEPTION = "08000",
29
+ /** Class 08 - Connection Exception: [E] connection_does_not_exist */
30
+ CONNECTION_DOES_NOT_EXIST = "08003",
31
+ /** Class 08 - Connection Exception: [E] connection_failure */
32
+ CONNECTION_FAILURE = "08006",
33
+ /** Class 08 - Connection Exception: [E] sqlclient_unable_to_establish_sqlconnection */
34
+ SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION = "08001",
35
+ /** Class 08 - Connection Exception: [E] sqlserver_rejected_establishment_of_sqlconnection */
36
+ SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION = "08004",
37
+ /** Class 08 - Connection Exception: [E] transaction_resolution_unknown */
38
+ TRANSACTION_RESOLUTION_UNKNOWN = "08007",
39
+ /** Class 08 - Connection Exception: [E] protocol_violation */
40
+ PROTOCOL_VIOLATION = "08P01",
41
+ /** Class 09 - Triggered Action Exception: [E] triggered_action_exception */
42
+ TRIGGERED_ACTION_EXCEPTION = "09000",
43
+ /** Class 0A - Feature Not Supported: [E] feature_not_supported */
44
+ FEATURE_NOT_SUPPORTED = "0A000",
45
+ /** Class 0B - Invalid Transaction Initiation: [E] invalid_transaction_initiation */
46
+ INVALID_TRANSACTION_INITIATION = "0B000",
47
+ /** Class 0F - Locator Exception: [E] locator_exception */
48
+ LOCATOR_EXCEPTION = "0F000",
49
+ /** Class 0F - Locator Exception: [E] invalid_locator_specification */
50
+ L_E_INVALID_SPECIFICATION = "0F001",
51
+ /** Class 0L - Invalid Grantor: [E] invalid_grantor */
52
+ INVALID_GRANTOR = "0L000",
53
+ /** Class 0L - Invalid Grantor: [E] invalid_grant_operation */
54
+ INVALID_GRANT_OPERATION = "0LP01",
55
+ /** Class 0P - Invalid Role Specification: [E] invalid_role_specification */
56
+ INVALID_ROLE_SPECIFICATION = "0P000",
57
+ /** Class 0Z - Diagnostics Exception: [E] diagnostics_exception */
58
+ DIAGNOSTICS_EXCEPTION = "0Z000",
59
+ /** Class 0Z - Diagnostics Exception: [E] stacked_diagnostics_accessed_without_active_handler */
60
+ STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER = "0Z002",
61
+ /** Class 10 - XQuery Error: [E] invalid_argument_for_xquery */
62
+ INVALID_ARGUMENT_FOR_XQUERY = "10608",
63
+ /** Class 20 - Case Not Found: [E] case_not_found */
64
+ CASE_NOT_FOUND = "20000",
65
+ /** Class 21 - Cardinality Violation: [E] cardinality_violation */
66
+ CARDINALITY_VIOLATION = "21000",
67
+ /** Class 22 - Data Exception: [E] data_exception */
68
+ DATA_EXCEPTION = "22000",
69
+ /** Class 22 - Data Exception: [E] */
70
+ ARRAY_ELEMENT_ERROR = "2202E",
71
+ /** Class 22 - Data Exception: [E] array_subscript_error */
72
+ ARRAY_SUBSCRIPT_ERROR = "2202E",
73
+ /** Class 22 - Data Exception: [E] character_not_in_repertoire */
74
+ CHARACTER_NOT_IN_REPERTOIRE = "22021",
75
+ /** Class 22 - Data Exception: [E] datetime_field_overflow */
76
+ DATETIME_FIELD_OVERFLOW = "22008",
77
+ /** Class 22 - Data Exception: [E] */
78
+ DATETIME_VALUE_OUT_OF_RANGE = "22008",
79
+ /** Class 22 - Data Exception: [E] division_by_zero */
80
+ DIVISION_BY_ZERO = "22012",
81
+ /** Class 22 - Data Exception: [E] error_in_assignment */
82
+ ERROR_IN_ASSIGNMENT = "22005",
83
+ /** Class 22 - Data Exception: [E] escape_character_conflict */
84
+ ESCAPE_CHARACTER_CONFLICT = "2200B",
85
+ /** Class 22 - Data Exception: [E] indicator_overflow */
86
+ INDICATOR_OVERFLOW = "22022",
87
+ /** Class 22 - Data Exception: [E] interval_field_overflow */
88
+ INTERVAL_FIELD_OVERFLOW = "22015",
89
+ /** Class 22 - Data Exception: [E] invalid_argument_for_logarithm */
90
+ INVALID_ARGUMENT_FOR_LOG = "2201E",
91
+ /** Class 22 - Data Exception: [E] invalid_argument_for_ntile_function */
92
+ INVALID_ARGUMENT_FOR_NTILE = "22014",
93
+ /** Class 22 - Data Exception: [E] invalid_argument_for_nth_value_function */
94
+ INVALID_ARGUMENT_FOR_NTH_VALUE = "22016",
95
+ /** Class 22 - Data Exception: [E] invalid_argument_for_power_function */
96
+ INVALID_ARGUMENT_FOR_POWER_FUNCTION = "2201F",
97
+ /** Class 22 - Data Exception: [E] invalid_argument_for_width_bucket_function */
98
+ INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION = "2201G",
99
+ /** Class 22 - Data Exception: [E] invalid_character_value_for_cast */
100
+ INVALID_CHARACTER_VALUE_FOR_CAST = "22018",
101
+ /** Class 22 - Data Exception: [E] invalid_datetime_format */
102
+ INVALID_DATETIME_FORMAT = "22007",
103
+ /** Class 22 - Data Exception: [E] invalid_escape_character */
104
+ INVALID_ESCAPE_CHARACTER = "22019",
105
+ /** Class 22 - Data Exception: [E] invalid_escape_octet */
106
+ INVALID_ESCAPE_OCTET = "2200D",
107
+ /** Class 22 - Data Exception: [E] invalid_escape_sequence */
108
+ INVALID_ESCAPE_SEQUENCE = "22025",
109
+ /** Class 22 - Data Exception: [E] nonstandard_use_of_escape_character */
110
+ NONSTANDARD_USE_OF_ESCAPE_CHARACTER = "22P06",
111
+ /** Class 22 - Data Exception: [E] invalid_indicator_parameter_value */
112
+ INVALID_INDICATOR_PARAMETER_VALUE = "22010",
113
+ /** Class 22 - Data Exception: [E] invalid_parameter_value */
114
+ INVALID_PARAMETER_VALUE = "22023",
115
+ /** Class 22 - Data Exception: [E] invalid_preceding_or_following_size */
116
+ INVALID_PRECEDING_OR_FOLLOWING_SIZE = "22013",
117
+ /** Class 22 - Data Exception: [E] invalid_regular_expression */
118
+ INVALID_REGULAR_EXPRESSION = "2201B",
119
+ /** Class 22 - Data Exception: [E] invalid_row_count_in_limit_clause */
120
+ INVALID_ROW_COUNT_IN_LIMIT_CLAUSE = "2201W",
121
+ /** Class 22 - Data Exception: [E] invalid_row_count_in_result_offset_clause */
122
+ INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE = "2201X",
123
+ /** Class 22 - Data Exception: [E] invalid_tablesample_argument */
124
+ INVALID_TABLESAMPLE_ARGUMENT = "2202H",
125
+ /** Class 22 - Data Exception: [E] invalid_tablesample_repeat */
126
+ INVALID_TABLESAMPLE_REPEAT = "2202G",
127
+ /** Class 22 - Data Exception: [E] invalid_time_zone_displacement_value */
128
+ INVALID_TIME_ZONE_DISPLACEMENT_VALUE = "22009",
129
+ /** Class 22 - Data Exception: [E] invalid_use_of_escape_character */
130
+ INVALID_USE_OF_ESCAPE_CHARACTER = "2200C",
131
+ /** Class 22 - Data Exception: [E] most_specific_type_mismatch */
132
+ MOST_SPECIFIC_TYPE_MISMATCH = "2200G",
133
+ /** Class 22 - Data Exception: [E] null_value_not_allowed */
134
+ NULL_VALUE_NOT_ALLOWED = "22004",
135
+ /** Class 22 - Data Exception: [E] null_value_no_indicator_parameter */
136
+ NULL_VALUE_NO_INDICATOR_PARAMETER = "22002",
137
+ /** Class 22 - Data Exception: [E] numeric_value_out_of_range */
138
+ NUMERIC_VALUE_OUT_OF_RANGE = "22003",
139
+ /** Class 22 - Data Exception: [E] sequence_generator_limit_exceeded */
140
+ SEQUENCE_GENERATOR_LIMIT_EXCEEDED = "2200H",
141
+ /** Class 22 - Data Exception: [E] string_data_length_mismatch */
142
+ STRING_DATA_LENGTH_MISMATCH = "22026",
143
+ /** Class 22 - Data Exception: [E] string_data_right_truncation */
144
+ STRING_DATA_RIGHT_TRUNCATION = "22001",
145
+ /** Class 22 - Data Exception: [E] substring_error */
146
+ SUBSTRING_ERROR = "22011",
147
+ /** Class 22 - Data Exception: [E] trim_error */
148
+ TRIM_ERROR = "22027",
149
+ /** Class 22 - Data Exception: [E] unterminated_c_string */
150
+ UNTERMINATED_C_STRING = "22024",
151
+ /** Class 22 - Data Exception: [E] zero_length_character_string */
152
+ ZERO_LENGTH_CHARACTER_STRING = "2200F",
153
+ /** Class 22 - Data Exception: [E] floating_point_exception */
154
+ FLOATING_POINT_EXCEPTION = "22P01",
155
+ /** Class 22 - Data Exception: [E] invalid_text_representation */
156
+ INVALID_TEXT_REPRESENTATION = "22P02",
157
+ /** Class 22 - Data Exception: [E] invalid_binary_representation */
158
+ INVALID_BINARY_REPRESENTATION = "22P03",
159
+ /** Class 22 - Data Exception: [E] bad_copy_file_format */
160
+ BAD_COPY_FILE_FORMAT = "22P04",
161
+ /** Class 22 - Data Exception: [E] untranslatable_character */
162
+ UNTRANSLATABLE_CHARACTER = "22P05",
163
+ /** Class 22 - Data Exception: [E] not_an_xml_document */
164
+ NOT_AN_XML_DOCUMENT = "2200L",
165
+ /** Class 22 - Data Exception: [E] invalid_xml_document */
166
+ INVALID_XML_DOCUMENT = "2200M",
167
+ /** Class 22 - Data Exception: [E] invalid_xml_content */
168
+ INVALID_XML_CONTENT = "2200N",
169
+ /** Class 22 - Data Exception: [E] invalid_xml_comment */
170
+ INVALID_XML_COMMENT = "2200S",
171
+ /** Class 22 - Data Exception: [E] invalid_xml_processing_instruction */
172
+ INVALID_XML_PROCESSING_INSTRUCTION = "2200T",
173
+ /** Class 22 - Data Exception: [E] duplicate_json_object_key_value */
174
+ DUPLICATE_JSON_OBJECT_KEY_VALUE = "22030",
175
+ /** Class 22 - Data Exception: [E] invalid_argument_for_sql_json_datetime_function */
176
+ INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION = "22031",
177
+ /** Class 22 - Data Exception: [E] invalid_json_text */
178
+ INVALID_JSON_TEXT = "22032",
179
+ /** Class 22 - Data Exception: [E] invalid_sql_json_subscript */
180
+ INVALID_SQL_JSON_SUBSCRIPT = "22033",
181
+ /** Class 22 - Data Exception: [E] more_than_one_sql_json_item */
182
+ MORE_THAN_ONE_SQL_JSON_ITEM = "22034",
183
+ /** Class 22 - Data Exception: [E] no_sql_json_item */
184
+ NO_SQL_JSON_ITEM = "22035",
185
+ /** Class 22 - Data Exception: [E] non_numeric_sql_json_item */
186
+ NON_NUMERIC_SQL_JSON_ITEM = "22036",
187
+ /** Class 22 - Data Exception: [E] non_unique_keys_in_a_json_object */
188
+ NON_UNIQUE_KEYS_IN_A_JSON_OBJECT = "22037",
189
+ /** Class 22 - Data Exception: [E] singleton_sql_json_item_required */
190
+ SINGLETON_SQL_JSON_ITEM_REQUIRED = "22038",
191
+ /** Class 22 - Data Exception: [E] sql_json_array_not_found */
192
+ SQL_JSON_ARRAY_NOT_FOUND = "22039",
193
+ /** Class 22 - Data Exception: [E] sql_json_member_not_found */
194
+ SQL_JSON_MEMBER_NOT_FOUND = "2203A",
195
+ /** Class 22 - Data Exception: [E] sql_json_number_not_found */
196
+ SQL_JSON_NUMBER_NOT_FOUND = "2203B",
197
+ /** Class 22 - Data Exception: [E] sql_json_object_not_found */
198
+ SQL_JSON_OBJECT_NOT_FOUND = "2203C",
199
+ /** Class 22 - Data Exception: [E] too_many_json_array_elements */
200
+ TOO_MANY_JSON_ARRAY_ELEMENTS = "2203D",
201
+ /** Class 22 - Data Exception: [E] too_many_json_object_members */
202
+ TOO_MANY_JSON_OBJECT_MEMBERS = "2203E",
203
+ /** Class 22 - Data Exception: [E] sql_json_scalar_required */
204
+ SQL_JSON_SCALAR_REQUIRED = "2203F",
205
+ /** Class 22 - Data Exception: [E] sql_json_item_cannot_be_cast_to_target_type */
206
+ SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE = "2203G",
207
+ /** Class 23 - Integrity Constraint Violation: [E] integrity_constraint_violation */
208
+ INTEGRITY_CONSTRAINT_VIOLATION = "23000",
209
+ /** Class 23 - Integrity Constraint Violation: [E] restrict_violation */
210
+ RESTRICT_VIOLATION = "23001",
211
+ /** Class 23 - Integrity Constraint Violation: [E] not_null_violation */
212
+ NOT_NULL_VIOLATION = "23502",
213
+ /** Class 23 - Integrity Constraint Violation: [E] foreign_key_violation */
214
+ FOREIGN_KEY_VIOLATION = "23503",
215
+ /** Class 23 - Integrity Constraint Violation: [E] unique_violation */
216
+ UNIQUE_VIOLATION = "23505",
217
+ /** Class 23 - Integrity Constraint Violation: [E] check_violation */
218
+ CHECK_VIOLATION = "23514",
219
+ /** Class 23 - Integrity Constraint Violation: [E] exclusion_violation */
220
+ EXCLUSION_VIOLATION = "23P01",
221
+ /** Class 24 - Invalid Cursor State: [E] invalid_cursor_state */
222
+ INVALID_CURSOR_STATE = "24000",
223
+ /** Class 25 - Invalid Transaction State: [E] invalid_transaction_state */
224
+ INVALID_TRANSACTION_STATE = "25000",
225
+ /** Class 25 - Invalid Transaction State: [E] active_sql_transaction */
226
+ ACTIVE_SQL_TRANSACTION = "25001",
227
+ /** Class 25 - Invalid Transaction State: [E] branch_transaction_already_active */
228
+ BRANCH_TRANSACTION_ALREADY_ACTIVE = "25002",
229
+ /** Class 25 - Invalid Transaction State: [E] held_cursor_requires_same_isolation_level */
230
+ HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL = "25008",
231
+ /** Class 25 - Invalid Transaction State: [E] inappropriate_access_mode_for_branch_transaction */
232
+ INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION = "25003",
233
+ /** Class 25 - Invalid Transaction State: [E] inappropriate_isolation_level_for_branch_transaction */
234
+ INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION = "25004",
235
+ /** Class 25 - Invalid Transaction State: [E] no_active_sql_transaction_for_branch_transaction */
236
+ NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION = "25005",
237
+ /** Class 25 - Invalid Transaction State: [E] read_only_sql_transaction */
238
+ READ_ONLY_SQL_TRANSACTION = "25006",
239
+ /** Class 25 - Invalid Transaction State: [E] schema_and_data_statement_mixing_not_supported */
240
+ SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED = "25007",
241
+ /** Class 25 - Invalid Transaction State: [E] no_active_sql_transaction */
242
+ NO_ACTIVE_SQL_TRANSACTION = "25P01",
243
+ /** Class 25 - Invalid Transaction State: [E] in_failed_sql_transaction */
244
+ IN_FAILED_SQL_TRANSACTION = "25P02",
245
+ /** Class 25 - Invalid Transaction State: [E] idle_in_transaction_session_timeout */
246
+ IDLE_IN_TRANSACTION_SESSION_TIMEOUT = "25P03",
247
+ /** Class 25 - Invalid Transaction State: [E] transaction_timeout */
248
+ TRANSACTION_TIMEOUT = "25P04",
249
+ /** Class 26 - Invalid SQL Statement Name: [E] invalid_sql_statement_name */
250
+ INVALID_SQL_STATEMENT_NAME = "26000",
251
+ /** Class 27 - Triggered Data Change Violation: [E] triggered_data_change_violation */
252
+ TRIGGERED_DATA_CHANGE_VIOLATION = "27000",
253
+ /** Class 28 - Invalid Authorization Specification: [E] invalid_authorization_specification */
254
+ INVALID_AUTHORIZATION_SPECIFICATION = "28000",
255
+ /** Class 28 - Invalid Authorization Specification: [E] invalid_password */
256
+ INVALID_PASSWORD = "28P01",
257
+ /** Class 2B - Dependent Privilege Descriptors Still Exist: [E] dependent_privilege_descriptors_still_exist */
258
+ DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST = "2B000",
259
+ /** Class 2B - Dependent Privilege Descriptors Still Exist: [E] dependent_objects_still_exist */
260
+ DEPENDENT_OBJECTS_STILL_EXIST = "2BP01",
261
+ /** Class 2D - Invalid Transaction Termination: [E] invalid_transaction_termination */
262
+ INVALID_TRANSACTION_TERMINATION = "2D000",
263
+ /** Class 2F - SQL Routine Exception: [E] sql_routine_exception */
264
+ SQL_ROUTINE_EXCEPTION = "2F000",
265
+ /** Class 2F - SQL Routine Exception: [E] function_executed_no_return_statement */
266
+ S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT = "2F005",
267
+ /** Class 2F - SQL Routine Exception: [E] modifying_sql_data_not_permitted */
268
+ S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED = "2F002",
269
+ /** Class 2F - SQL Routine Exception: [E] prohibited_sql_statement_attempted */
270
+ S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED = "2F003",
271
+ /** Class 2F - SQL Routine Exception: [E] reading_sql_data_not_permitted */
272
+ S_R_E_READING_SQL_DATA_NOT_PERMITTED = "2F004",
273
+ /** Class 34 - Invalid Cursor Name: [E] invalid_cursor_name */
274
+ INVALID_CURSOR_NAME = "34000",
275
+ /** Class 38 - External Routine Exception: [E] external_routine_exception */
276
+ EXTERNAL_ROUTINE_EXCEPTION = "38000",
277
+ /** Class 38 - External Routine Exception: [E] containing_sql_not_permitted */
278
+ E_R_E_CONTAINING_SQL_NOT_PERMITTED = "38001",
279
+ /** Class 38 - External Routine Exception: [E] modifying_sql_data_not_permitted */
280
+ E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED = "38002",
281
+ /** Class 38 - External Routine Exception: [E] prohibited_sql_statement_attempted */
282
+ E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED = "38003",
283
+ /** Class 38 - External Routine Exception: [E] reading_sql_data_not_permitted */
284
+ E_R_E_READING_SQL_DATA_NOT_PERMITTED = "38004",
285
+ /** Class 39 - External Routine Invocation Exception: [E] external_routine_invocation_exception */
286
+ EXTERNAL_ROUTINE_INVOCATION_EXCEPTION = "39000",
287
+ /** Class 39 - External Routine Invocation Exception: [E] invalid_sqlstate_returned */
288
+ E_R_I_E_INVALID_SQLSTATE_RETURNED = "39001",
289
+ /** Class 39 - External Routine Invocation Exception: [E] null_value_not_allowed */
290
+ E_R_I_E_NULL_VALUE_NOT_ALLOWED = "39004",
291
+ /** Class 39 - External Routine Invocation Exception: [E] trigger_protocol_violated */
292
+ E_R_I_E_TRIGGER_PROTOCOL_VIOLATED = "39P01",
293
+ /** Class 39 - External Routine Invocation Exception: [E] srf_protocol_violated */
294
+ E_R_I_E_SRF_PROTOCOL_VIOLATED = "39P02",
295
+ /** Class 39 - External Routine Invocation Exception: [E] event_trigger_protocol_violated */
296
+ E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED = "39P03",
297
+ /** Class 3B - Savepoint Exception: [E] savepoint_exception */
298
+ SAVEPOINT_EXCEPTION = "3B000",
299
+ /** Class 3B - Savepoint Exception: [E] invalid_savepoint_specification */
300
+ S_E_INVALID_SPECIFICATION = "3B001",
301
+ /** Class 3D - Invalid Catalog Name: [E] invalid_catalog_name */
302
+ INVALID_CATALOG_NAME = "3D000",
303
+ /** Class 3F - Invalid Schema Name: [E] invalid_schema_name */
304
+ INVALID_SCHEMA_NAME = "3F000",
305
+ /** Class 40 - Transaction Rollback: [E] transaction_rollback */
306
+ TRANSACTION_ROLLBACK = "40000",
307
+ /** Class 40 - Transaction Rollback: [E] transaction_integrity_constraint_violation */
308
+ T_R_INTEGRITY_CONSTRAINT_VIOLATION = "40002",
309
+ /** Class 40 - Transaction Rollback: [E] serialization_failure */
310
+ T_R_SERIALIZATION_FAILURE = "40001",
311
+ /** Class 40 - Transaction Rollback: [E] statement_completion_unknown */
312
+ T_R_STATEMENT_COMPLETION_UNKNOWN = "40003",
313
+ /** Class 40 - Transaction Rollback: [E] deadlock_detected */
314
+ T_R_DEADLOCK_DETECTED = "40P01",
315
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] syntax_error_or_access_rule_violation */
316
+ SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION = "42000",
317
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] syntax_error */
318
+ SYNTAX_ERROR = "42601",
319
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] insufficient_privilege */
320
+ INSUFFICIENT_PRIVILEGE = "42501",
321
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] cannot_coerce */
322
+ CANNOT_COERCE = "42846",
323
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] grouping_error */
324
+ GROUPING_ERROR = "42803",
325
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] windowing_error */
326
+ WINDOWING_ERROR = "42P20",
327
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_recursion */
328
+ INVALID_RECURSION = "42P19",
329
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_foreign_key */
330
+ INVALID_FOREIGN_KEY = "42830",
331
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_name */
332
+ INVALID_NAME = "42602",
333
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] name_too_long */
334
+ NAME_TOO_LONG = "42622",
335
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] reserved_name */
336
+ RESERVED_NAME = "42939",
337
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] datatype_mismatch */
338
+ DATATYPE_MISMATCH = "42804",
339
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] indeterminate_datatype */
340
+ INDETERMINATE_DATATYPE = "42P18",
341
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] collation_mismatch */
342
+ COLLATION_MISMATCH = "42P21",
343
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] indeterminate_collation */
344
+ INDETERMINATE_COLLATION = "42P22",
345
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] wrong_object_type */
346
+ WRONG_OBJECT_TYPE = "42809",
347
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] generated_always */
348
+ GENERATED_ALWAYS = "428C9",
349
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] undefined_column */
350
+ UNDEFINED_COLUMN = "42703",
351
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] */
352
+ UNDEFINED_CURSOR = "34000",
353
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] */
354
+ UNDEFINED_DATABASE = "3D000",
355
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] undefined_function */
356
+ UNDEFINED_FUNCTION = "42883",
357
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] */
358
+ UNDEFINED_PSTATEMENT = "26000",
359
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] */
360
+ UNDEFINED_SCHEMA = "3F000",
361
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] undefined_table */
362
+ UNDEFINED_TABLE = "42P01",
363
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] undefined_parameter */
364
+ UNDEFINED_PARAMETER = "42P02",
365
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] undefined_object */
366
+ UNDEFINED_OBJECT = "42704",
367
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_column */
368
+ DUPLICATE_COLUMN = "42701",
369
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_cursor */
370
+ DUPLICATE_CURSOR = "42P03",
371
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_database */
372
+ DUPLICATE_DATABASE = "42P04",
373
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_function */
374
+ DUPLICATE_FUNCTION = "42723",
375
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_prepared_statement */
376
+ DUPLICATE_PSTATEMENT = "42P05",
377
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_schema */
378
+ DUPLICATE_SCHEMA = "42P06",
379
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_table */
380
+ DUPLICATE_TABLE = "42P07",
381
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_alias */
382
+ DUPLICATE_ALIAS = "42712",
383
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] duplicate_object */
384
+ DUPLICATE_OBJECT = "42710",
385
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] ambiguous_column */
386
+ AMBIGUOUS_COLUMN = "42702",
387
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] ambiguous_function */
388
+ AMBIGUOUS_FUNCTION = "42725",
389
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] ambiguous_parameter */
390
+ AMBIGUOUS_PARAMETER = "42P08",
391
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] ambiguous_alias */
392
+ AMBIGUOUS_ALIAS = "42P09",
393
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_column_reference */
394
+ INVALID_COLUMN_REFERENCE = "42P10",
395
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_column_definition */
396
+ INVALID_COLUMN_DEFINITION = "42611",
397
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_cursor_definition */
398
+ INVALID_CURSOR_DEFINITION = "42P11",
399
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_database_definition */
400
+ INVALID_DATABASE_DEFINITION = "42P12",
401
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_function_definition */
402
+ INVALID_FUNCTION_DEFINITION = "42P13",
403
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_prepared_statement_definition */
404
+ INVALID_PSTATEMENT_DEFINITION = "42P14",
405
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_schema_definition */
406
+ INVALID_SCHEMA_DEFINITION = "42P15",
407
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_table_definition */
408
+ INVALID_TABLE_DEFINITION = "42P16",
409
+ /** Class 42 - Syntax Error or Access Rule Violation: [E] invalid_object_definition */
410
+ INVALID_OBJECT_DEFINITION = "42P17",
411
+ /** Class 44 - WITH CHECK OPTION Violation: [E] with_check_option_violation */
412
+ WITH_CHECK_OPTION_VIOLATION = "44000",
413
+ /** Class 53 - Insufficient Resources: [E] insufficient_resources */
414
+ INSUFFICIENT_RESOURCES = "53000",
415
+ /** Class 53 - Insufficient Resources: [E] disk_full */
416
+ DISK_FULL = "53100",
417
+ /** Class 53 - Insufficient Resources: [E] out_of_memory */
418
+ OUT_OF_MEMORY = "53200",
419
+ /** Class 53 - Insufficient Resources: [E] too_many_connections */
420
+ TOO_MANY_CONNECTIONS = "53300",
421
+ /** Class 53 - Insufficient Resources: [E] configuration_limit_exceeded */
422
+ CONFIGURATION_LIMIT_EXCEEDED = "53400",
423
+ /** Class 54 - Program Limit Exceeded: [E] program_limit_exceeded */
424
+ PROGRAM_LIMIT_EXCEEDED = "54000",
425
+ /** Class 54 - Program Limit Exceeded: [E] statement_too_complex */
426
+ STATEMENT_TOO_COMPLEX = "54001",
427
+ /** Class 54 - Program Limit Exceeded: [E] too_many_columns */
428
+ TOO_MANY_COLUMNS = "54011",
429
+ /** Class 54 - Program Limit Exceeded: [E] too_many_arguments */
430
+ TOO_MANY_ARGUMENTS = "54023",
431
+ /** Class 55 - Object Not In Prerequisite State: [E] object_not_in_prerequisite_state */
432
+ OBJECT_NOT_IN_PREREQUISITE_STATE = "55000",
433
+ /** Class 55 - Object Not In Prerequisite State: [E] object_in_use */
434
+ OBJECT_IN_USE = "55006",
435
+ /** Class 55 - Object Not In Prerequisite State: [E] cant_change_runtime_param */
436
+ CANT_CHANGE_RUNTIME_PARAM = "55P02",
437
+ /** Class 55 - Object Not In Prerequisite State: [E] lock_not_available */
438
+ LOCK_NOT_AVAILABLE = "55P03",
439
+ /** Class 55 - Object Not In Prerequisite State: [E] unsafe_new_enum_value_usage */
440
+ UNSAFE_NEW_ENUM_VALUE_USAGE = "55P04",
441
+ /** Class 57 - Operator Intervention: [E] operator_intervention */
442
+ OPERATOR_INTERVENTION = "57000",
443
+ /** Class 57 - Operator Intervention: [E] query_canceled */
444
+ QUERY_CANCELED = "57014",
445
+ /** Class 57 - Operator Intervention: [E] admin_shutdown */
446
+ ADMIN_SHUTDOWN = "57P01",
447
+ /** Class 57 - Operator Intervention: [E] crash_shutdown */
448
+ CRASH_SHUTDOWN = "57P02",
449
+ /** Class 57 - Operator Intervention: [E] cannot_connect_now */
450
+ CANNOT_CONNECT_NOW = "57P03",
451
+ /** Class 57 - Operator Intervention: [E] database_dropped */
452
+ DATABASE_DROPPED = "57P04",
453
+ /** Class 57 - Operator Intervention: [E] idle_session_timeout */
454
+ IDLE_SESSION_TIMEOUT = "57P05",
455
+ /** Class 58 - System Error (errors external to PostgreSQL itself): [E] system_error */
456
+ SYSTEM_ERROR = "58000",
457
+ /** Class 58 - System Error (errors external to PostgreSQL itself): [E] io_error */
458
+ IO_ERROR = "58030",
459
+ /** Class 58 - System Error (errors external to PostgreSQL itself): [E] undefined_file */
460
+ UNDEFINED_FILE = "58P01",
461
+ /** Class 58 - System Error (errors external to PostgreSQL itself): [E] duplicate_file */
462
+ DUPLICATE_FILE = "58P02",
463
+ /** Class 58 - System Error (errors external to PostgreSQL itself): [E] file_name_too_long */
464
+ FILE_NAME_TOO_LONG = "58P03",
465
+ /** Class F0 - Configuration File Error: [E] config_file_error */
466
+ CONFIG_FILE_ERROR = "F0000",
467
+ /** Class F0 - Configuration File Error: [E] lock_file_exists */
468
+ LOCK_FILE_EXISTS = "F0001",
469
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_error */
470
+ FDW_ERROR = "HV000",
471
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_column_name_not_found */
472
+ FDW_COLUMN_NAME_NOT_FOUND = "HV005",
473
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_dynamic_parameter_value_needed */
474
+ FDW_DYNAMIC_PARAMETER_VALUE_NEEDED = "HV002",
475
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_function_sequence_error */
476
+ FDW_FUNCTION_SEQUENCE_ERROR = "HV010",
477
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_inconsistent_descriptor_information */
478
+ FDW_INCONSISTENT_DESCRIPTOR_INFORMATION = "HV021",
479
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_attribute_value */
480
+ FDW_INVALID_ATTRIBUTE_VALUE = "HV024",
481
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_column_name */
482
+ FDW_INVALID_COLUMN_NAME = "HV007",
483
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_column_number */
484
+ FDW_INVALID_COLUMN_NUMBER = "HV008",
485
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_data_type */
486
+ FDW_INVALID_DATA_TYPE = "HV004",
487
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_data_type_descriptors */
488
+ FDW_INVALID_DATA_TYPE_DESCRIPTORS = "HV006",
489
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_descriptor_field_identifier */
490
+ FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER = "HV091",
491
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_handle */
492
+ FDW_INVALID_HANDLE = "HV00B",
493
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_option_index */
494
+ FDW_INVALID_OPTION_INDEX = "HV00C",
495
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_option_name */
496
+ FDW_INVALID_OPTION_NAME = "HV00D",
497
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_string_length_or_buffer_length */
498
+ FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH = "HV090",
499
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_string_format */
500
+ FDW_INVALID_STRING_FORMAT = "HV00A",
501
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_invalid_use_of_null_pointer */
502
+ FDW_INVALID_USE_OF_NULL_POINTER = "HV009",
503
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_too_many_handles */
504
+ FDW_TOO_MANY_HANDLES = "HV014",
505
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_out_of_memory */
506
+ FDW_OUT_OF_MEMORY = "HV001",
507
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_no_schemas */
508
+ FDW_NO_SCHEMAS = "HV00P",
509
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_option_name_not_found */
510
+ FDW_OPTION_NAME_NOT_FOUND = "HV00J",
511
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_reply_handle */
512
+ FDW_REPLY_HANDLE = "HV00K",
513
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_schema_not_found */
514
+ FDW_SCHEMA_NOT_FOUND = "HV00Q",
515
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_table_not_found */
516
+ FDW_TABLE_NOT_FOUND = "HV00R",
517
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_unable_to_create_execution */
518
+ FDW_UNABLE_TO_CREATE_EXECUTION = "HV00L",
519
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_unable_to_create_reply */
520
+ FDW_UNABLE_TO_CREATE_REPLY = "HV00M",
521
+ /** Class HV - Foreign Data Wrapper Error (SQL/MED): [E] fdw_unable_to_establish_connection */
522
+ FDW_UNABLE_TO_ESTABLISH_CONNECTION = "HV00N",
523
+ /** Class P0 - PL/pgSQL Error: [E] plpgsql_error */
524
+ PLPGSQL_ERROR = "P0000",
525
+ /** Class P0 - PL/pgSQL Error: [E] raise_exception */
526
+ RAISE_EXCEPTION = "P0001",
527
+ /** Class P0 - PL/pgSQL Error: [E] no_data_found */
528
+ NO_DATA_FOUND = "P0002",
529
+ /** Class P0 - PL/pgSQL Error: [E] too_many_rows */
530
+ TOO_MANY_ROWS = "P0003",
531
+ /** Class P0 - PL/pgSQL Error: [E] assert_failure */
532
+ ASSERT_FAILURE = "P0004",
533
+ /** Class XX - Internal Error: [E] internal_error */
534
+ INTERNAL_ERROR = "XX000",
535
+ /** Class XX - Internal Error: [E] data_corrupted */
536
+ DATA_CORRUPTED = "XX001",
537
+ /** Class XX - Internal Error: [E] index_corrupted */
538
+ INDEX_CORRUPTED = "XX002",
539
+ /** Non pg error code. Used as fallback when no code was provided for any reason. */
540
+ UNDEFINED_CODE = "-1"
541
+ }
542
+ }
543
+
544
+ declare module "@native-systems/utility" {
545
+ import { HttpStatus } from "@nestjs/common";
546
+ /**
547
+ * Custom exceptipn object used by Native Systems, which extends the Error interface
548
+ * and adds the 'code' attribute, to be able to provide an additional httpStatus.
549
+ */
550
+ class NativeException extends Error {
551
+ code: HttpStatus;
552
+ constructor(code: HttpStatus, message: string);
553
+ }
554
+ export { NativeException };
555
+ }
556
+
557
+ declare module "@native-systems/utility" {
558
+ type SpecificErrorMsg = Partial<Record<PostgresError, string>>;
559
+ /**
560
+ * An exception instance thrown when a postgres error is encountered.
561
+ * The exception extends the default Error object.
562
+ */
563
+ class PgException extends Error {
564
+ /** The error object originated from Postgres. */
565
+ err: any;
566
+ /** Error messages specific for a HttpStatus. */
567
+ private readonly specific;
568
+ /**
569
+ * Creates a new PgException instance.
570
+ * @param err - The original error object from Postgres.
571
+ * @param message - A general error message describing the exception.
572
+ * @param specific - Optional. A record of specific error messages for different HTTP status codes.
573
+ */
574
+ constructor(err: any, message: string, specific?: SpecificErrorMsg);
575
+ /**
576
+ * Get the postgres error code of the exception object.
577
+ * If no code is set for this error, return the fallback undefined postgres error code.
578
+ * @returns The postgres error code that is associated with this exception.
579
+ */
580
+ getStatus(): PostgresError;
581
+ /**
582
+ * Check and return a message for a specific postgres error code.
583
+ * @param status - The Postgres error code which is related to the desired error message.
584
+ * @returns Either the specific error message or null if not defined for that error code.
585
+ */
586
+ getSpecificMessage(status: PostgresError): string | null;
587
+ }
588
+ export { PgException };
589
+ }
590
+
591
+ declare module "@native-systems/utility" {
592
+ function getHttpStatusText(statusCode: number): string;
593
+ export { getHttpStatusText };
594
+ }
595
+
596
+ declare module "@native-systems/utility" {
597
+ import { HttpException } from "@nestjs/common";
598
+ class Exceptions {
599
+ /**
600
+ * Evaluates a thrown postgres error object, which is then sanitized into an appropriate NativeError object.
601
+ * @param error a postgres error that, for example is from a rejected promise.
602
+ * @returns {NativeException} a NativeError object with either a concrete reason or a generic error message.
603
+ */
604
+ private static transformPgError;
605
+ /**
606
+ * Transforms an exception instance into a HttpException instance and returns it.
607
+ * @param error {PgException | NativeException} An error object of one of those instances.
608
+ * @returns {HttpException} The transformed exception, modeled into a HttpException instance.
609
+ */
610
+ static toHttpException(error: PgException | NativeException): HttpException;
611
+ }
612
+ export { Exceptions };
613
+ }
614
+
615
+ declare module "@native-systems/utility" {
616
+ type Error = ErrorConstructor & {
617
+ status: number;
618
+ message: string;
619
+ error: string;
620
+ };
621
+ export { Error };
622
+ }
623
+
624
+ declare module "@native-systems/utility" {
625
+ interface ErrorResponse extends Response {
626
+ isNativeError: boolean;
627
+ }
628
+ export type { ErrorResponse };
629
+ }
630
+
631
+ declare module "@native-systems/utility" {
632
+ namespace Native {
633
+ export { Error, ErrorResponse };
634
+ }
635
+ export { Native };
636
+ }
637
+
638
+ declare module "@native-systems/utility" {
639
+ export { Exceptions, NativeException, PgException, PostgresError };
640
+ export type { Native };
641
+ }