MindsDB 25.9.3rc1__py3-none-any.whl → 25.10.0__py3-none-any.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.
Potentially problematic release.
This version of MindsDB might be problematic. Click here for more details.
- mindsdb/__about__.py +1 -1
- mindsdb/__main__.py +1 -9
- mindsdb/api/a2a/__init__.py +1 -1
- mindsdb/api/a2a/agent.py +9 -1
- mindsdb/api/a2a/common/server/server.py +4 -0
- mindsdb/api/a2a/common/server/task_manager.py +8 -1
- mindsdb/api/a2a/common/types.py +66 -0
- mindsdb/api/a2a/task_manager.py +50 -0
- mindsdb/api/common/middleware.py +1 -1
- mindsdb/api/executor/command_executor.py +49 -36
- mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py +7 -13
- mindsdb/api/executor/datahub/datanodes/integration_datanode.py +2 -2
- mindsdb/api/executor/datahub/datanodes/system_tables.py +2 -1
- mindsdb/api/executor/planner/query_prepare.py +2 -20
- mindsdb/api/executor/utilities/sql.py +5 -4
- mindsdb/api/http/initialize.py +76 -60
- mindsdb/api/http/namespaces/agents.py +0 -3
- mindsdb/api/http/namespaces/chatbots.py +0 -5
- mindsdb/api/http/namespaces/file.py +2 -0
- mindsdb/api/http/namespaces/handlers.py +10 -5
- mindsdb/api/http/namespaces/knowledge_bases.py +20 -0
- mindsdb/api/http/namespaces/sql.py +2 -2
- mindsdb/api/http/start.py +2 -2
- mindsdb/api/mysql/mysql_proxy/utilities/dump.py +8 -2
- mindsdb/integrations/handlers/byom_handler/byom_handler.py +2 -10
- mindsdb/integrations/handlers/databricks_handler/databricks_handler.py +98 -46
- mindsdb/integrations/handlers/druid_handler/druid_handler.py +32 -40
- mindsdb/integrations/handlers/gitlab_handler/gitlab_handler.py +5 -2
- mindsdb/integrations/handlers/mssql_handler/mssql_handler.py +438 -100
- mindsdb/integrations/handlers/mssql_handler/requirements_odbc.txt +3 -0
- mindsdb/integrations/handlers/mysql_handler/mysql_handler.py +235 -3
- mindsdb/integrations/handlers/oracle_handler/__init__.py +2 -0
- mindsdb/integrations/handlers/oracle_handler/connection_args.py +7 -1
- mindsdb/integrations/handlers/oracle_handler/oracle_handler.py +321 -16
- mindsdb/integrations/handlers/oracle_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +2 -2
- mindsdb/integrations/handlers/shopify_handler/requirements.txt +1 -0
- mindsdb/integrations/handlers/shopify_handler/shopify_handler.py +57 -3
- mindsdb/integrations/handlers/zendesk_handler/zendesk_tables.py +144 -111
- mindsdb/integrations/libs/response.py +2 -2
- mindsdb/integrations/utilities/handlers/auth_utilities/snowflake/__init__.py +1 -0
- mindsdb/integrations/utilities/handlers/auth_utilities/snowflake/snowflake_jwt_gen.py +151 -0
- mindsdb/integrations/utilities/rag/rerankers/base_reranker.py +24 -21
- mindsdb/interfaces/agents/agents_controller.py +0 -2
- mindsdb/interfaces/data_catalog/data_catalog_loader.py +6 -7
- mindsdb/interfaces/data_catalog/data_catalog_reader.py +15 -4
- mindsdb/interfaces/database/data_handlers_cache.py +190 -0
- mindsdb/interfaces/database/database.py +3 -3
- mindsdb/interfaces/database/integrations.py +1 -121
- mindsdb/interfaces/database/projects.py +2 -6
- mindsdb/interfaces/database/views.py +1 -4
- mindsdb/interfaces/jobs/jobs_controller.py +0 -4
- mindsdb/interfaces/jobs/scheduler.py +0 -1
- mindsdb/interfaces/knowledge_base/controller.py +197 -108
- mindsdb/interfaces/knowledge_base/evaluate.py +36 -41
- mindsdb/interfaces/knowledge_base/executor.py +11 -0
- mindsdb/interfaces/knowledge_base/llm_client.py +51 -17
- mindsdb/interfaces/model/model_controller.py +4 -4
- mindsdb/interfaces/skills/custom/text2sql/mindsdb_sql_toolkit.py +4 -10
- mindsdb/interfaces/skills/skills_controller.py +1 -4
- mindsdb/interfaces/storage/db.py +16 -6
- mindsdb/interfaces/triggers/triggers_controller.py +1 -3
- mindsdb/utilities/config.py +19 -2
- mindsdb/utilities/exception.py +2 -2
- mindsdb/utilities/json_encoder.py +24 -10
- mindsdb/utilities/render/sqlalchemy_render.py +15 -14
- mindsdb/utilities/starters.py +0 -10
- {mindsdb-25.9.3rc1.dist-info → mindsdb-25.10.0.dist-info}/METADATA +278 -264
- {mindsdb-25.9.3rc1.dist-info → mindsdb-25.10.0.dist-info}/RECORD +72 -86
- mindsdb/api/postgres/__init__.py +0 -0
- mindsdb/api/postgres/postgres_proxy/__init__.py +0 -0
- mindsdb/api/postgres/postgres_proxy/executor/__init__.py +0 -1
- mindsdb/api/postgres/postgres_proxy/executor/executor.py +0 -182
- mindsdb/api/postgres/postgres_proxy/postgres_packets/__init__.py +0 -0
- mindsdb/api/postgres/postgres_proxy/postgres_packets/errors.py +0 -322
- mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_fields.py +0 -34
- mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_message.py +0 -31
- mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_message_formats.py +0 -1265
- mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_message_identifiers.py +0 -31
- mindsdb/api/postgres/postgres_proxy/postgres_packets/postgres_packets.py +0 -265
- mindsdb/api/postgres/postgres_proxy/postgres_proxy.py +0 -477
- mindsdb/api/postgres/postgres_proxy/utilities/__init__.py +0 -10
- mindsdb/api/postgres/start.py +0 -11
- mindsdb/integrations/handlers/mssql_handler/tests/__init__.py +0 -0
- mindsdb/integrations/handlers/mssql_handler/tests/test_mssql_handler.py +0 -169
- mindsdb/integrations/handlers/oracle_handler/tests/__init__.py +0 -0
- mindsdb/integrations/handlers/oracle_handler/tests/test_oracle_handler.py +0 -32
- {mindsdb-25.9.3rc1.dist-info → mindsdb-25.10.0.dist-info}/WHEEL +0 -0
- {mindsdb-25.9.3rc1.dist-info → mindsdb-25.10.0.dist-info}/licenses/LICENSE +0 -0
- {mindsdb-25.9.3rc1.dist-info → mindsdb-25.10.0.dist-info}/top_level.txt +0 -0
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
POSTGRES_ERROR_CODES = {
|
|
2
|
-
"CLASS_00": {
|
|
3
|
-
"successful_completion": "00000"},
|
|
4
|
-
"CLASS_01": {
|
|
5
|
-
"warning": "01000",
|
|
6
|
-
"dynamic_result_sets_returned": "0100C",
|
|
7
|
-
"implicit_zero_bit_padding": "01008",
|
|
8
|
-
"null_value_eliminated_in_set_function": "01003",
|
|
9
|
-
"privilege_not_granted": "01007",
|
|
10
|
-
"privilege_not_revoked": "01006",
|
|
11
|
-
"string_data_right_truncation": "01004",
|
|
12
|
-
"deprecated_feature": "01P01"},
|
|
13
|
-
"CLASS_02": {
|
|
14
|
-
"no_data": "02000",
|
|
15
|
-
"no_additional_dynamic_result_sets_returned": "02001"
|
|
16
|
-
},
|
|
17
|
-
"CLASS_03": {
|
|
18
|
-
"sql_statement_not_yet_complete": "03000",
|
|
19
|
-
},
|
|
20
|
-
"CLASS_08": {
|
|
21
|
-
"connection_exception": "08000",
|
|
22
|
-
"connection_does_not_exist": "08003",
|
|
23
|
-
"connection_failure": "08006",
|
|
24
|
-
"sqlclient_unable_to_establish_sqlconnection": "08001",
|
|
25
|
-
"sqlserver_rejected_establishment_of_sqlconnection": "08004",
|
|
26
|
-
"transaction_resolution_unknown": "08007",
|
|
27
|
-
"protocol_violation": "08P01"},
|
|
28
|
-
"CLASS_09": {
|
|
29
|
-
|
|
30
|
-
"triggered_action_exception": "09000",
|
|
31
|
-
},
|
|
32
|
-
"CLASS_0A": {
|
|
33
|
-
"feature_not_supported": "0A000"},
|
|
34
|
-
"CLASS_0B": {
|
|
35
|
-
"invalid_transaction_initiation": "0B000"},
|
|
36
|
-
"CLASS_0F": {
|
|
37
|
-
"locator_exception": "0F000",
|
|
38
|
-
"invalid_locator_specification": "0F001",
|
|
39
|
-
},
|
|
40
|
-
"CLASS_0L": {
|
|
41
|
-
"invalid_grantor": "0L000",
|
|
42
|
-
"invalid_grant_operation": "0LP01",
|
|
43
|
-
},
|
|
44
|
-
"CLASS_0P": {
|
|
45
|
-
"invalid_role_specification": "0P000",
|
|
46
|
-
},
|
|
47
|
-
"CLASS_0Z": {
|
|
48
|
-
"diagnostics_exception": "0Z000",
|
|
49
|
-
"stacked_diagnostics_accessed_without_active_handler": "0Z002"},
|
|
50
|
-
"CLASS_20": {
|
|
51
|
-
"case_not_found": "20000"},
|
|
52
|
-
|
|
53
|
-
"CLASS_21": {
|
|
54
|
-
"cardinality_violation": "21000"},
|
|
55
|
-
"CLASS_22": {
|
|
56
|
-
"data_exception": "22000",
|
|
57
|
-
"array_subscript_error": "2202E",
|
|
58
|
-
"character_not_in_repertoire": "22021",
|
|
59
|
-
"datetime_field_overflow": "22008",
|
|
60
|
-
"division_by_zero": "22012",
|
|
61
|
-
"error_in_assignment": "22005",
|
|
62
|
-
"escape_character_conflict": "2200B",
|
|
63
|
-
"indicator_overflow": "22022",
|
|
64
|
-
"interval_field_overflow": "22015",
|
|
65
|
-
"invalid_argument_for_logarithm": "2201E",
|
|
66
|
-
"invalid_argument_for_ntile_function": "22014",
|
|
67
|
-
"invalid_argument_for_nth_value_function": "22016",
|
|
68
|
-
"invalid_argument_for_power_function": "2201F",
|
|
69
|
-
"invalid_argument_for_width_bucket_function": "2201G",
|
|
70
|
-
"invalid_character_value_for_cast": "22018",
|
|
71
|
-
"invalid_datetime_format": "22007",
|
|
72
|
-
"invalid_escape_character": "22019",
|
|
73
|
-
"invalid_escape_octet": "2200D",
|
|
74
|
-
"invalid_escape_sequence": "22025",
|
|
75
|
-
"nonstandard_use_of_escape_character": "22P06",
|
|
76
|
-
"invalid_indicator_parameter_value": "22010",
|
|
77
|
-
"invalid_parameter_value": "22023",
|
|
78
|
-
"invalid_preceding_or_following_size": "22013",
|
|
79
|
-
"invalid_regular_expression": "2201B",
|
|
80
|
-
"invalid_row_count_in_limit_clause": "2201W",
|
|
81
|
-
"invalid_row_count_in_result_offset_clause": "2201X",
|
|
82
|
-
"invalid_tablesample_argument": "2202H",
|
|
83
|
-
"invalid_tablesample_repeat": "2202G",
|
|
84
|
-
"invalid_time_zone_displacement_value": "22009",
|
|
85
|
-
"invalid_use_of_escape_character": "2200C",
|
|
86
|
-
"most_specific_type_mismatch": "2200G",
|
|
87
|
-
"null_value_not_allowed": "22004",
|
|
88
|
-
"null_value_no_indicator_parameter": "22002",
|
|
89
|
-
"numeric_value_out_of_range": "22003",
|
|
90
|
-
"sequence_generator_limit_exceeded": "2200H",
|
|
91
|
-
"string_data_length_mismatch": "22026",
|
|
92
|
-
"string_data_right_truncation": "22001",
|
|
93
|
-
"substring_error": "22011",
|
|
94
|
-
"trim_error": "22027",
|
|
95
|
-
"unterminated_c_string": "22024",
|
|
96
|
-
"zero_length_character_string": "2200F",
|
|
97
|
-
"floating_point_exception": "22P01",
|
|
98
|
-
"invalid_text_representation": "22P02",
|
|
99
|
-
"invalid_binary_representation": "22P03",
|
|
100
|
-
"bad_copy_file_format": "22P04",
|
|
101
|
-
"untranslatable_character": "22P05",
|
|
102
|
-
"not_an_xml_document": "2200L",
|
|
103
|
-
"invalid_xml_document": "2200M",
|
|
104
|
-
"invalid_xml_content": "2200N",
|
|
105
|
-
"invalid_xml_comment": "2200S",
|
|
106
|
-
"invalid_xml_processing_instruction": "2200T",
|
|
107
|
-
"duplicate_json_object_key_value": "22030",
|
|
108
|
-
"invalid_argument_for_sql_json_datetime_function": "22031",
|
|
109
|
-
"invalid_json_text": "22032",
|
|
110
|
-
"invalid_sql_json_subscript": "22033",
|
|
111
|
-
"more_than_one_sql_json_item": "22034",
|
|
112
|
-
"no_sql_json_item": "22035",
|
|
113
|
-
"non_numeric_sql_json_item": "22036",
|
|
114
|
-
"non_unique_keys_in_a_json_object": "22037",
|
|
115
|
-
"singleton_sql_json_item_required": "22038",
|
|
116
|
-
"sql_json_array_not_found": "22039",
|
|
117
|
-
"sql_json_member_not_found": "2203A",
|
|
118
|
-
"sql_json_number_not_found": "2203B",
|
|
119
|
-
"sql_json_object_not_found": "2203C",
|
|
120
|
-
"too_many_json_array_elements": "2203D",
|
|
121
|
-
"too_many_json_object_members": "2203E",
|
|
122
|
-
"sql_json_scalar_required": "2203F",
|
|
123
|
-
"sql_json_item_cannot_be_cast_to_target_type": "2203G"
|
|
124
|
-
},
|
|
125
|
-
"CLASS_23": {
|
|
126
|
-
"integrity_constraint_violation": "23000",
|
|
127
|
-
"restrict_violation": "23001",
|
|
128
|
-
"not_null_violation": "23502",
|
|
129
|
-
"foreign_key_violation": "23503",
|
|
130
|
-
"unique_violation": "23505",
|
|
131
|
-
"check_violation": "23514",
|
|
132
|
-
"exclusion_violation": "23P01"},
|
|
133
|
-
"CLASS_24": {
|
|
134
|
-
"invalid_cursor_state": "24000"},
|
|
135
|
-
"CLASS_25": {
|
|
136
|
-
"invalid_transaction_state": "25000",
|
|
137
|
-
"active_sql_transaction": "25001",
|
|
138
|
-
"branch_transaction_already_active": "25002",
|
|
139
|
-
"held_cursor_requires_same_isolation_level": "25008",
|
|
140
|
-
"inappropriate_access_mode_for_branch_transaction": "25003",
|
|
141
|
-
"inappropriate_isolation_level_for_branch_transaction": "25004",
|
|
142
|
-
"no_active_sql_transaction_for_branch_transaction": "25005",
|
|
143
|
-
"read_only_sql_transaction": "25006",
|
|
144
|
-
"schema_and_data_statement_mixing_not_supported": "25007",
|
|
145
|
-
"no_active_sql_transaction": "25P01",
|
|
146
|
-
"in_failed_sql_transaction": "25P02",
|
|
147
|
-
"idle_in_transaction_session_timeout": "25P03"},
|
|
148
|
-
"CLASS_26": {
|
|
149
|
-
"invalid_sql_statement_name": "26000"},
|
|
150
|
-
"CLASS_27": {
|
|
151
|
-
"triggered_data_change_violation": "27000"},
|
|
152
|
-
"CLASS_28": {
|
|
153
|
-
"invalid_authorization_specification": "28000",
|
|
154
|
-
"invalid_password": "28P01",
|
|
155
|
-
"dependent_privilege_descriptors_still_exist": "2B000",
|
|
156
|
-
"dependent_objects_still_exist": "2BP01"},
|
|
157
|
-
"CLASS_2D": {
|
|
158
|
-
|
|
159
|
-
"invalid_transaction_termination": "2D000"},
|
|
160
|
-
"CLASS_2F": {
|
|
161
|
-
|
|
162
|
-
"sql_routine_exception": "2F000",
|
|
163
|
-
"function_executed_no_return_statement": "2F005",
|
|
164
|
-
"modifying_sql_data_not_permitted": "2F002",
|
|
165
|
-
"prohibited_sql_statement_attempted": "2F003",
|
|
166
|
-
"reading_sql_data_not_permitted": "2F004"},
|
|
167
|
-
"CLASS_34": {
|
|
168
|
-
"invalid_cursor_name": "34000"},
|
|
169
|
-
"CLASS_38": {
|
|
170
|
-
"external_routine_exception": "38000",
|
|
171
|
-
"containing_sql_not_permitted": "38001",
|
|
172
|
-
"modifying_sql_data_not_permitted": "38002",
|
|
173
|
-
"prohibited_sql_statement_attempted": "38003",
|
|
174
|
-
"reading_sql_data_not_permitted": "38004"},
|
|
175
|
-
"CLASS_39": {
|
|
176
|
-
"external_routine_invocation_exception": "39000",
|
|
177
|
-
"invalid_sqlstate_returned": "39001",
|
|
178
|
-
"null_value_not_allowed": "39004",
|
|
179
|
-
"trigger_protocol_violated": "39P01",
|
|
180
|
-
"srf_protocol_violated": "39P02",
|
|
181
|
-
"event_trigger_protocol_violated": "39P03"},
|
|
182
|
-
"CLASS_3B": {
|
|
183
|
-
"savepoint_exception": "3B000",
|
|
184
|
-
"invalid_savepoint_specification": "3B001"
|
|
185
|
-
},
|
|
186
|
-
"CLASS_3D": {
|
|
187
|
-
"invalid_catalog_name": "3D000"},
|
|
188
|
-
"CLASS_3F": {
|
|
189
|
-
"invalid_schema_name": "3F000"},
|
|
190
|
-
"CLASS_40": {
|
|
191
|
-
"transaction_rollback": "40000",
|
|
192
|
-
"transaction_integrity_constraint_violation": "40002",
|
|
193
|
-
"serialization_failure": "40001",
|
|
194
|
-
"statement_completion_unknown": "40003",
|
|
195
|
-
"deadlock_detected": "40P01"},
|
|
196
|
-
"CLASS_42": { # Syntax Errors
|
|
197
|
-
"syntax_error_or_access_rule_violation": "42000",
|
|
198
|
-
# DEFAULTS to here:
|
|
199
|
-
"syntax_error": "42601",
|
|
200
|
-
"insufficient_privilege": "42501",
|
|
201
|
-
"cannot_coerce": "42846",
|
|
202
|
-
"grouping_error": "42803",
|
|
203
|
-
"windowing_error": "42P20",
|
|
204
|
-
"invalid_recursion": "42P19",
|
|
205
|
-
"invalid_foreign_key": "42830",
|
|
206
|
-
"invalid_name": "42602",
|
|
207
|
-
"name_too_long": "42622",
|
|
208
|
-
"reserved_name": "42939",
|
|
209
|
-
"datatype_mismatch": "42804",
|
|
210
|
-
"indeterminate_datatype": "42P18",
|
|
211
|
-
"collation_mismatch": "42P21",
|
|
212
|
-
"indeterminate_collation": "42P22",
|
|
213
|
-
"wrong_object_type": "42809",
|
|
214
|
-
"generated_always": "428C9",
|
|
215
|
-
"undefined_column": "42703",
|
|
216
|
-
"undefined_function": "42883",
|
|
217
|
-
"undefined_table": "42P01",
|
|
218
|
-
"undefined_parameter": "42P02",
|
|
219
|
-
"undefined_object": "42704",
|
|
220
|
-
"duplicate_column": "42701",
|
|
221
|
-
"duplicate_cursor": "42P03",
|
|
222
|
-
"duplicate_database": "42P04",
|
|
223
|
-
"duplicate_function": "42723",
|
|
224
|
-
"duplicate_prepared_statement": "42P05",
|
|
225
|
-
"duplicate_schema": "42P06",
|
|
226
|
-
"duplicate_table": "42P07",
|
|
227
|
-
"duplicate_alias": "42712",
|
|
228
|
-
"duplicate_object": "42710",
|
|
229
|
-
"ambiguous_column": "42702",
|
|
230
|
-
"ambiguous_function": "42725",
|
|
231
|
-
"ambiguous_parameter": "42P08",
|
|
232
|
-
"ambiguous_alias": "42P09",
|
|
233
|
-
"invalid_column_reference": "42P10",
|
|
234
|
-
"invalid_column_definition": "42611",
|
|
235
|
-
"invalid_cursor_definition": "42P11",
|
|
236
|
-
"invalid_database_definition": "42P12",
|
|
237
|
-
"invalid_function_definition": "42P13",
|
|
238
|
-
"invalid_prepared_statement_definition": "42P14",
|
|
239
|
-
"invalid_schema_definition": "42P15",
|
|
240
|
-
"invalid_table_definition": "42P16",
|
|
241
|
-
"invalid_object_definition": "42P17"},
|
|
242
|
-
|
|
243
|
-
"CLASS_44": {
|
|
244
|
-
"with_check_option_violation": "44000"},
|
|
245
|
-
|
|
246
|
-
"CLASS_53": {
|
|
247
|
-
"insufficient_resources": "53000",
|
|
248
|
-
"disk_full": "53100",
|
|
249
|
-
"out_of_memory": "53200",
|
|
250
|
-
"too_many_connections": "53300",
|
|
251
|
-
"configuration_limit_exceeded": "53400", },
|
|
252
|
-
|
|
253
|
-
"CLASS_54": {
|
|
254
|
-
"program_limit_exceeded": "54000",
|
|
255
|
-
"statement_too_complex": "54001",
|
|
256
|
-
"too_many_columns": "54011",
|
|
257
|
-
"too_many_arguments": "54023"},
|
|
258
|
-
"CLASS_55": {
|
|
259
|
-
"object_not_in_prerequisite_state": "55000",
|
|
260
|
-
"object_in_use": "55006",
|
|
261
|
-
"cant_change_runtime_param": "55P02",
|
|
262
|
-
"lock_not_available": "55P03",
|
|
263
|
-
"unsafe_new_enum_value_usage": "55P04"},
|
|
264
|
-
"CLASS_57": {
|
|
265
|
-
"operator_intervention": "57000",
|
|
266
|
-
"query_canceled": "57014",
|
|
267
|
-
"admin_shutdown": "57P01",
|
|
268
|
-
"crash_shutdown": "57P02",
|
|
269
|
-
"cannot_connect_now": "57P03",
|
|
270
|
-
"database_dropped": "57P04",
|
|
271
|
-
"idle_session_timeout": "57P05"},
|
|
272
|
-
"CLASS_58": {
|
|
273
|
-
"system_error": "58000",
|
|
274
|
-
"io_error": "58030",
|
|
275
|
-
"undefined_file": "58P01",
|
|
276
|
-
"duplicate_file": "58P02"},
|
|
277
|
-
"CLASS_72": {
|
|
278
|
-
"snapshot_too_old": "72000"},
|
|
279
|
-
"CLASS_F0": {
|
|
280
|
-
"config_file_error": "F0000",
|
|
281
|
-
"lock_file_exists": "F0001"},
|
|
282
|
-
"CLASS_HV": {
|
|
283
|
-
"fdw_error": "HV000",
|
|
284
|
-
"fdw_column_name_not_found": "HV005",
|
|
285
|
-
"fdw_dynamic_parameter_value_needed": "HV002",
|
|
286
|
-
"fdw_function_sequence_error": "HV010",
|
|
287
|
-
"fdw_inconsistent_descriptor_information": "HV021",
|
|
288
|
-
"fdw_invalid_attribute_value": "HV024",
|
|
289
|
-
"fdw_invalid_column_name": "HV007",
|
|
290
|
-
"fdw_invalid_column_number": "HV008",
|
|
291
|
-
"fdw_invalid_data_type": "HV004",
|
|
292
|
-
"fdw_invalid_data_type_descriptors": "HV006",
|
|
293
|
-
"fdw_invalid_descriptor_field_identifier": "HV091",
|
|
294
|
-
"fdw_invalid_handle": "HV00B",
|
|
295
|
-
"fdw_invalid_option_index": "HV00C",
|
|
296
|
-
"fdw_invalid_option_name": "HV00D",
|
|
297
|
-
"fdw_invalid_string_length_or_buffer_length": "HV090",
|
|
298
|
-
"fdw_invalid_string_format": "HV00A",
|
|
299
|
-
"fdw_invalid_use_of_null_pointer": "HV009",
|
|
300
|
-
"fdw_too_many_handles": "HV014",
|
|
301
|
-
"fdw_out_of_memory": "HV001",
|
|
302
|
-
"fdw_no_schemas": "HV00P",
|
|
303
|
-
"fdw_option_name_not_found": "HV00J",
|
|
304
|
-
"fdw_reply_handle": "HV00K",
|
|
305
|
-
"fdw_schema_not_found": "HV00Q",
|
|
306
|
-
"fdw_table_not_found": "HV00R",
|
|
307
|
-
"fdw_unable_to_create_execution": "HV00L",
|
|
308
|
-
"fdw_unable_to_create_reply": "HV00M",
|
|
309
|
-
"fdw_unable_to_establish_connection": "HV00N"},
|
|
310
|
-
"CLASS_P0": {
|
|
311
|
-
"plpgsql_error": "P0000",
|
|
312
|
-
"raise_exception": "P0001",
|
|
313
|
-
"no_data_found": "P0002",
|
|
314
|
-
"too_many_rows": "P0003",
|
|
315
|
-
"assert_failure": "P0004"},
|
|
316
|
-
"CLASS_XX": {
|
|
317
|
-
"internal_error": "XX000",
|
|
318
|
-
"data_corrupted": "XX001",
|
|
319
|
-
"index_corrupted": "XX002"
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
POSTGRES_SYNTAX_ERROR_CODE = POSTGRES_ERROR_CODES["CLASS_42"]["syntax_error"]
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from enum import Enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class PostgresField:
|
|
5
|
-
def __init__(self, name: str, object_id: int, dt_size: int, type_modifier: int, format_code: int, table_id: int = 0,
|
|
6
|
-
column_id: int = 0):
|
|
7
|
-
self.name = name
|
|
8
|
-
self.object_id = object_id
|
|
9
|
-
self.dt_size = dt_size
|
|
10
|
-
self.type_modifier = type_modifier
|
|
11
|
-
self.format_code = format_code
|
|
12
|
-
self.table_id = table_id
|
|
13
|
-
self.column_id = column_id
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class GenericField(PostgresField):
|
|
17
|
-
def __init__(self, name: str, object_id: int, table_id: int = 0, column_id: int = 0):
|
|
18
|
-
super().__init__(name=name, object_id=object_id, dt_size=-1, type_modifier=-1, format_code=0, table_id=table_id,
|
|
19
|
-
column_id=column_id)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class IntField(PostgresField):
|
|
23
|
-
def __init__(self, name: str, table_id: int = 0, column_id: int = 0):
|
|
24
|
-
super().__init__(name=name, object_id=23, dt_size=4, type_modifier=-1, format_code=0, table_id=table_id,
|
|
25
|
-
column_id=column_id)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class POSTGRES_TYPES(Enum):
|
|
29
|
-
VARCHAR = 0
|
|
30
|
-
INT = 1
|
|
31
|
-
LONG = 2
|
|
32
|
-
DOUBLE = 3
|
|
33
|
-
DATETIME = 4
|
|
34
|
-
DATE = 5
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
from typing import Union, BinaryIO
|
|
2
|
-
|
|
3
|
-
from mindsdb.api.postgres.postgres_proxy.postgres_packets.postgres_message_identifiers import \
|
|
4
|
-
PostgresBackendMessageIdentifier, PostgresFrontendMessageIdentifier
|
|
5
|
-
from mindsdb.api.postgres.postgres_proxy.postgres_packets.postgres_packets import PostgresPacketReader, \
|
|
6
|
-
PostgresPacketBuilder
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class PostgresMessage:
|
|
10
|
-
identifier: Union[PostgresBackendMessageIdentifier, PostgresFrontendMessageIdentifier]
|
|
11
|
-
backend_capable: bool
|
|
12
|
-
frontend_capable: bool
|
|
13
|
-
|
|
14
|
-
def __init__(self):
|
|
15
|
-
pass
|
|
16
|
-
|
|
17
|
-
def send(self, write_file: BinaryIO):
|
|
18
|
-
# with open("test_write.txt", "a") as f:
|
|
19
|
-
# f.write(str(type(self)))
|
|
20
|
-
return self.send_internal(write_file=write_file)
|
|
21
|
-
|
|
22
|
-
def send_internal(self, write_file: BinaryIO):
|
|
23
|
-
raise NotImplementedError("Must implement send_internal in sub-class")
|
|
24
|
-
|
|
25
|
-
def read(self, packet_reader: PostgresPacketReader):
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
def get_packet_builder(self) -> PostgresPacketBuilder:
|
|
29
|
-
ppb = PostgresPacketBuilder()
|
|
30
|
-
ppb.set_identifier(self.identifier)
|
|
31
|
-
return ppb
|