MindsDB 25.3.4.0__py3-none-any.whl → 25.3.4.2__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.

Files changed (32) hide show
  1. mindsdb/__about__.py +2 -2
  2. mindsdb/api/executor/datahub/datanodes/integration_datanode.py +5 -2
  3. mindsdb/api/executor/datahub/datanodes/system_tables.py +131 -138
  4. mindsdb/api/mysql/mysql_proxy/libs/constants/mysql.py +74 -0
  5. mindsdb/integrations/handlers/confluence_handler/confluence_api_client.py +176 -0
  6. mindsdb/integrations/handlers/confluence_handler/confluence_handler.py +54 -59
  7. mindsdb/integrations/handlers/confluence_handler/confluence_tables.py +753 -0
  8. mindsdb/integrations/handlers/confluence_handler/connection_args.py +8 -8
  9. mindsdb/integrations/handlers/langchain_handler/requirements.txt +1 -1
  10. mindsdb/integrations/handlers/lightwood_handler/requirements.txt +3 -3
  11. mindsdb/integrations/handlers/litellm_handler/requirements.txt +1 -1
  12. mindsdb/integrations/handlers/llama_index_handler/requirements.txt +1 -1
  13. mindsdb/integrations/handlers/ms_teams_handler/ms_graph_api_teams_client.py +278 -55
  14. mindsdb/integrations/handlers/ms_teams_handler/ms_teams_handler.py +52 -21
  15. mindsdb/integrations/handlers/ms_teams_handler/ms_teams_tables.py +6 -29
  16. mindsdb/integrations/handlers/mssql_handler/mssql_handler.py +37 -1
  17. mindsdb/integrations/handlers/mysql_handler/mysql_handler.py +30 -1
  18. mindsdb/integrations/handlers/oracle_handler/oracle_handler.py +53 -5
  19. mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +37 -1
  20. mindsdb/integrations/handlers/ray_serve_handler/ray_serve_handler.py +18 -16
  21. mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py +68 -2
  22. mindsdb/integrations/utilities/handlers/auth_utilities/__init__.py +1 -1
  23. mindsdb/integrations/utilities/handlers/auth_utilities/microsoft/__init__.py +1 -1
  24. mindsdb/integrations/utilities/handlers/auth_utilities/microsoft/ms_graph_api_auth_utilities.py +97 -18
  25. mindsdb/utilities/render/sqlalchemy_render.py +30 -6
  26. {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.2.dist-info}/METADATA +226 -231
  27. {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.2.dist-info}/RECORD +30 -30
  28. {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.2.dist-info}/WHEEL +1 -1
  29. mindsdb/integrations/handlers/confluence_handler/confluence_table.py +0 -193
  30. mindsdb/integrations/handlers/confluence_handler/requirements.txt +0 -1
  31. {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.2.dist-info}/licenses/LICENSE +0 -0
  32. {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.2.dist-info}/top_level.txt +0 -0
@@ -27,6 +27,7 @@ types_map = {}
27
27
  for type_name in sa_type_names:
28
28
  types_map[type_name.upper()] = getattr(sa.types, type_name)
29
29
  types_map['BOOL'] = types_map['BOOLEAN']
30
+ types_map['DEC'] = types_map['DECIMAL']
30
31
 
31
32
 
32
33
  class RenderError(Exception):
@@ -43,6 +44,11 @@ class INTERVAL(ColumnElement):
43
44
  @compiles(INTERVAL)
44
45
  def _compile_interval(element, compiler, **kw):
45
46
  items = element.info.split(' ', maxsplit=1)
47
+ if compiler.dialect.name == 'oracle' and len(items) == 2:
48
+ # replace to singular names (remove leading S if exists)
49
+ if items[1].upper().endswith('S'):
50
+ items[1] = items[1][:-1]
51
+
46
52
  if compiler.dialect.driver in ['snowflake']:
47
53
  # quote all
48
54
  args = " ".join(map(str, items))
@@ -118,6 +124,8 @@ class SqlalchemyRender:
118
124
  self.dialect = dialect(paramstyle="named")
119
125
  self.dialect.div_is_floordiv = False
120
126
 
127
+ self.selects_stack = []
128
+
121
129
  if dialect_name == 'mssql':
122
130
  # update version to MS_2008_VERSION for supports_multivalues_insert
123
131
  self.dialect.server_version_info = (10,)
@@ -143,8 +151,10 @@ class SqlalchemyRender:
143
151
  part = self.dialect.identifier_preparer.quote(i)
144
152
 
145
153
  parts2.append(part)
146
-
147
- return sa.column('.'.join(parts2), is_literal=True)
154
+ text = '.'.join(parts2)
155
+ if identifier.is_outer and self.dialect.name == 'oracle':
156
+ text += '(+)'
157
+ return sa.column(text, is_literal=True)
148
158
 
149
159
  def get_alias(self, alias):
150
160
  if alias is None or len(alias.parts) == 0:
@@ -152,6 +162,9 @@ class SqlalchemyRender:
152
162
  if len(alias.parts) > 1:
153
163
  raise NotImplementedError(f'Multiple alias {alias.parts}')
154
164
 
165
+ if self.selects_stack:
166
+ self.selects_stack[-1]['aliases'].append(alias)
167
+
155
168
  is_quoted = get_is_quoted(alias)[0]
156
169
  return AttributedStr(alias.parts[0], is_quoted)
157
170
 
@@ -205,12 +218,18 @@ class SqlalchemyRender:
205
218
  alias = self.get_alias(t.alias)
206
219
  col = col.label(alias)
207
220
  elif isinstance(t, ast.Function):
208
- fnc = self.to_function(t)
221
+ col = self.to_function(t)
209
222
  if t.alias:
210
223
  alias = self.get_alias(t.alias)
224
+ col = col.label(alias)
211
225
  else:
212
226
  alias = str(t.op)
213
- col = fnc.label(alias)
227
+ if self.selects_stack:
228
+ aliases = self.selects_stack[-1]['aliases']
229
+ if alias not in aliases:
230
+ aliases.append(alias)
231
+ col = col.label(alias)
232
+
214
233
  elif isinstance(t, ast.BinaryOperation):
215
234
  ops = {
216
235
  "+": operators.add,
@@ -432,9 +451,9 @@ class SqlalchemyRender:
432
451
  return typename
433
452
 
434
453
  typename = typename.upper()
435
- if re.match(r'^INT[\d]*$', typename):
454
+ if re.match(r'^INT[\d]+$', typename):
436
455
  typename = 'BIGINT'
437
- if re.match(r'^FLOAT[\d]*$', typename):
456
+ if re.match(r'^FLOAT[\d]+$', typename):
438
457
  typename = 'FLOAT'
439
458
 
440
459
  return types_map[typename]
@@ -513,6 +532,9 @@ class SqlalchemyRender:
513
532
  return self.prepare_union(node)
514
533
 
515
534
  cols = []
535
+
536
+ self.selects_stack.append({'aliases': []})
537
+
516
538
  for t in node.targets:
517
539
  col = self.to_expression(t)
518
540
  cols.append(col)
@@ -647,6 +669,8 @@ class SqlalchemyRender:
647
669
  else:
648
670
  raise NotImplementedError(f'Select mode: {node.mode}')
649
671
 
672
+ self.selects_stack.pop()
673
+
650
674
  return query
651
675
 
652
676
  def prepare_union(self, from_table):