MindsDB 25.3.4.0__py3-none-any.whl → 25.3.4.1__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 +2 -2
- mindsdb/integrations/handlers/confluence_handler/confluence_api_client.py +164 -0
- mindsdb/integrations/handlers/confluence_handler/confluence_handler.py +54 -59
- mindsdb/integrations/handlers/confluence_handler/confluence_tables.py +753 -0
- mindsdb/integrations/handlers/confluence_handler/connection_args.py +8 -8
- mindsdb/integrations/handlers/langchain_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/lightwood_handler/requirements.txt +3 -3
- mindsdb/integrations/handlers/litellm_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/llama_index_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/mysql_handler/mysql_handler.py +2 -0
- mindsdb/integrations/handlers/ray_serve_handler/ray_serve_handler.py +18 -16
- mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py +26 -1
- {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.1.dist-info}/METADATA +228 -231
- {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.1.dist-info}/RECORD +17 -17
- {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.1.dist-info}/WHEEL +1 -1
- mindsdb/integrations/handlers/confluence_handler/confluence_table.py +0 -193
- mindsdb/integrations/handlers/confluence_handler/requirements.txt +0 -1
- {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.1.dist-info}/licenses/LICENSE +0 -0
- {mindsdb-25.3.4.0.dist-info → mindsdb-25.3.4.1.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
mindsdb/__about__.py,sha256=
|
|
1
|
+
mindsdb/__about__.py,sha256=H5cqZBE5cU9Hi1AFNnP3KQektq1qDOcsG7OwbOqelCQ,456
|
|
2
2
|
mindsdb/__init__.py,sha256=fZopLiAYa9MzMZ0d48JgHc_LddfFKDzh7n_8icsjrVs,54
|
|
3
3
|
mindsdb/__main__.py,sha256=OOvGVNYi17UNn66OFjRNGcgxR9JefTxLZzL3vHq3AEg,21826
|
|
4
4
|
mindsdb/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -412,11 +412,11 @@ mindsdb/integrations/handlers/coinbase_handler/icon.svg,sha256=MWExiK7-0F7OeLSLK
|
|
|
412
412
|
mindsdb/integrations/handlers/coinbase_handler/requirements.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
413
413
|
mindsdb/integrations/handlers/confluence_handler/__about__.py,sha256=0U9j9CfAa3mfGZPk6sq1n5LfCpnHtCgIH1JkaSsPRnQ,356
|
|
414
414
|
mindsdb/integrations/handlers/confluence_handler/__init__.py,sha256=68yvHlrf7xrRjrOqkzYIXfr4mFEQKs2GtCQKBhvuuWU,646
|
|
415
|
-
mindsdb/integrations/handlers/confluence_handler/
|
|
416
|
-
mindsdb/integrations/handlers/confluence_handler/
|
|
417
|
-
mindsdb/integrations/handlers/confluence_handler/
|
|
415
|
+
mindsdb/integrations/handlers/confluence_handler/confluence_api_client.py,sha256=s-4O6zlk39cWwLuK4CEyAEpZrICEVskWIaGrf8TZ-vM,4980
|
|
416
|
+
mindsdb/integrations/handlers/confluence_handler/confluence_handler.py,sha256=BntGCIyGcZQAe8Uz8TZZsXP3Bs9g4hb6pEtoWNMg4zs,3381
|
|
417
|
+
mindsdb/integrations/handlers/confluence_handler/confluence_tables.py,sha256=m0MEItwvz2Xj7J0NECKvHgKJFphsUrtdOplNABvyDaI,24079
|
|
418
|
+
mindsdb/integrations/handlers/confluence_handler/connection_args.py,sha256=RZOuI3CbJ3VZmWJ5SDQ2vgppFRF42FUhfNAfpHgEdVM,852
|
|
418
419
|
mindsdb/integrations/handlers/confluence_handler/icon.svg,sha256=Piz_ZFABS16FgHfePv3-6yBU2c-h7yeX1bZ5JXFJ_Fk,2500
|
|
419
|
-
mindsdb/integrations/handlers/confluence_handler/requirements.txt,sha256=uGqoPIycab1Q50-NoN8vHp7TdzfHVamy9_t1RvONbog,21
|
|
420
420
|
mindsdb/integrations/handlers/confluence_handler/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
421
421
|
mindsdb/integrations/handlers/confluence_handler/tests/test_confluence_handler.py,sha256=pICgz5DHaXNg8bqL1wtoD_cBWDrgnIHw9vbZoLKciyk,2163
|
|
422
422
|
mindsdb/integrations/handlers/couchbase_handler/__about__.py,sha256=edORh0-jjv2_SYfeqStXH_zhdp_rnsnyPQVhDHUV8Ns,345
|
|
@@ -862,7 +862,7 @@ mindsdb/integrations/handlers/langchain_handler/__about__.py,sha256=rBZQP0fyIkOb
|
|
|
862
862
|
mindsdb/integrations/handlers/langchain_handler/__init__.py,sha256=4POM9M6p9cUDAIeQ4gy4Cj-F1p6RPokk3MC2cR77mSw,504
|
|
863
863
|
mindsdb/integrations/handlers/langchain_handler/icon.svg,sha256=dMV03a2BDQvZTwxDAxRmd-GzmCCVXyYvJqTwdZb5Hbw,73222
|
|
864
864
|
mindsdb/integrations/handlers/langchain_handler/langchain_handler.py,sha256=2MoMZYz4e4f4NCE-hHheJulxFJAkJudrvOn6-EAGv4Y,12816
|
|
865
|
-
mindsdb/integrations/handlers/langchain_handler/requirements.txt,sha256=
|
|
865
|
+
mindsdb/integrations/handlers/langchain_handler/requirements.txt,sha256=X3GMk6YUemVSiVvr0Rd2P2HerVhXFeL84yzrBgAiWHk,238
|
|
866
866
|
mindsdb/integrations/handlers/langchain_handler/tools.py,sha256=lb0zKsVpTafWi5QSVTbQ0hgvVx1Yr1rLg_i6rTHcVsQ,11385
|
|
867
867
|
mindsdb/integrations/handlers/leonardoai_handler/__about__.py,sha256=tohCA4vFctgcIkYTPoEhcNRW9C1YX07Sxe6n57vTl7A,353
|
|
868
868
|
mindsdb/integrations/handlers/leonardoai_handler/__init__.py,sha256=qoDI2PYu2Kw5TapUlHC1QUIfufxvzuJ1RpLBEpd_woE,512
|
|
@@ -896,7 +896,7 @@ mindsdb/integrations/handlers/lightwood_handler/__init__.py,sha256=iW8kT1kCcBjfe
|
|
|
896
896
|
mindsdb/integrations/handlers/lightwood_handler/functions.py,sha256=WkeI0J19WPh_36wZvezpnV2SW6wc9tEkumKil3qTB-4,9139
|
|
897
897
|
mindsdb/integrations/handlers/lightwood_handler/icon.svg,sha256=q8G2Qws-_E79MdxpSDHtNCqLwK0RWauNmRwGszIs_FE,2542
|
|
898
898
|
mindsdb/integrations/handlers/lightwood_handler/lightwood_handler.py,sha256=H-Xq0Zxc3hfGHGmmWSXkAmT79V_8R6DQ00nnPRUl-3M,23643
|
|
899
|
-
mindsdb/integrations/handlers/lightwood_handler/requirements.txt,sha256=
|
|
899
|
+
mindsdb/integrations/handlers/lightwood_handler/requirements.txt,sha256=vB2o7KbynVd_ePEfXGvBZZ-EOsy-KsYOcm82qQ5S8c0,91
|
|
900
900
|
mindsdb/integrations/handlers/lightwood_handler/utils.py,sha256=3dEI41hsgCzt_GeyXQ5k4U-w_NEZ_sLpbChS0wywANw,2242
|
|
901
901
|
mindsdb/integrations/handlers/lightwood_handler/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
902
902
|
mindsdb/integrations/handlers/lightwood_handler/tests/test_lightwood_handler.py,sha256=kQlcLZqpZEgn03-SMGOxHS5Z-2ayOO-wyaU_r4d-754,10985
|
|
@@ -911,13 +911,13 @@ mindsdb/integrations/handlers/litellm_handler/__about__.py,sha256=qKuzAOGHI5gYpk
|
|
|
911
911
|
mindsdb/integrations/handlers/litellm_handler/__init__.py,sha256=phvu1-lcM1HovXh4GHunND_ScTON4Yb3s4VXNVd_epU,550
|
|
912
912
|
mindsdb/integrations/handlers/litellm_handler/icon.png,sha256=mfPLH1-n3D1q3U57hADzl7s2G-W-EDevUHzmvnLTjy8,37122
|
|
913
913
|
mindsdb/integrations/handlers/litellm_handler/litellm_handler.py,sha256=-C82eH--GVPD-4P7_lPk3GbcTGmyqYLjuGZwW9iQ4pk,4911
|
|
914
|
-
mindsdb/integrations/handlers/litellm_handler/requirements.txt,sha256=
|
|
914
|
+
mindsdb/integrations/handlers/litellm_handler/requirements.txt,sha256=dy-zvg7q-XWnmLu6dh1DSphrzDsLZHec2oSRuF-jWmw,18
|
|
915
915
|
mindsdb/integrations/handlers/litellm_handler/settings.py,sha256=LUnndIS2pqpQB84fLe2AhBWzSzpeHbeoeVNz3T6-Rlk,2301
|
|
916
916
|
mindsdb/integrations/handlers/llama_index_handler/__about__.py,sha256=BtxlhE6R27NMF-AQRn5hhTK3cSdkyUDU6f9venjZ0dU,359
|
|
917
917
|
mindsdb/integrations/handlers/llama_index_handler/__init__.py,sha256=xR7fPvGnYIOw4QOUZ88Gs6tUZHbcr-Wp2V-NmVK-Mlw,506
|
|
918
918
|
mindsdb/integrations/handlers/llama_index_handler/icon.svg,sha256=yjhd8lFNW75F5o5ZRC69UMAu2P_Fxjj7SgLADwUQeJc,12609
|
|
919
919
|
mindsdb/integrations/handlers/llama_index_handler/llama_index_handler.py,sha256=GJvKsXkFnrkCg1A6MZJApe9IQDC7g0n_aSSOWPZkG7s,7859
|
|
920
|
-
mindsdb/integrations/handlers/llama_index_handler/requirements.txt,sha256=
|
|
920
|
+
mindsdb/integrations/handlers/llama_index_handler/requirements.txt,sha256=xoOq5UyUuLyAbii-dIMeUoLts_iloEsv6qM9KBe4cvs,101
|
|
921
921
|
mindsdb/integrations/handlers/llama_index_handler/settings.py,sha256=4L4-EJn_D6z_DcVaQ3o22BpPwSsdmyG1ayRIrIaMTsU,2156
|
|
922
922
|
mindsdb/integrations/handlers/ludwig_handler/__about__.py,sha256=5pC8567sj_ZZW70dm7Chkc4He6-F8l5oUKE1W9V98Ck,343
|
|
923
923
|
mindsdb/integrations/handlers/ludwig_handler/__init__.py,sha256=Bz_CZB8XJiMLYb7rK_zPFFAIHGjEsGR_rc2FK8r8HyM,536
|
|
@@ -1051,7 +1051,7 @@ mindsdb/integrations/handlers/mysql_handler/__about__.py,sha256=UCFLhlYJ-_DenwFc
|
|
|
1051
1051
|
mindsdb/integrations/handlers/mysql_handler/__init__.py,sha256=ikcK9oIUFjMfyRDAUKKvb8JQ4Fw-P1zLBeEHo2ZMPY8,592
|
|
1052
1052
|
mindsdb/integrations/handlers/mysql_handler/connection_args.py,sha256=--9ZuX6QSTbWPcRQuptMElStU6p_wkYAUGuxVhRi9JU,2288
|
|
1053
1053
|
mindsdb/integrations/handlers/mysql_handler/icon.svg,sha256=yvGRJXlDZ7tyqGSjbgEgG-gDhrKPUVt2ifG6xdjSfAA,4136
|
|
1054
|
-
mindsdb/integrations/handlers/mysql_handler/mysql_handler.py,sha256=
|
|
1054
|
+
mindsdb/integrations/handlers/mysql_handler/mysql_handler.py,sha256=ugQ3S_wO1MFZ3e4KxkTHgZwIz-e03h6r0BJgheldhp8,7005
|
|
1055
1055
|
mindsdb/integrations/handlers/mysql_handler/requirements.txt,sha256=uDDh7neCc41qZxjCFB2rpKPTSZvD58RCfa7DjZJykw0,30
|
|
1056
1056
|
mindsdb/integrations/handlers/mysql_handler/settings.py,sha256=3a6VexTd2nD72WiXYG_IGeZ-n59ANggeE3X5OkdxHI8,1692
|
|
1057
1057
|
mindsdb/integrations/handlers/neuralforecast_handler/__about__.py,sha256=qfziv8flt2mMSNCiZMOzXHN7karhW69QZy3rRnCdSY8,377
|
|
@@ -1275,7 +1275,7 @@ mindsdb/integrations/handlers/rag_handler/settings.py,sha256=5T4_oZt9dUD67AJXeZr
|
|
|
1275
1275
|
mindsdb/integrations/handlers/ray_serve_handler/__about__.py,sha256=42oqKM1C-nIisvPvAL5fIxBDP-rxEduXnGrUUjrfLIU,345
|
|
1276
1276
|
mindsdb/integrations/handlers/ray_serve_handler/__init__.py,sha256=MYDLydWeimQ74znwnrrgnh9S6YgtE7UnJcYBVlWv6r8,596
|
|
1277
1277
|
mindsdb/integrations/handlers/ray_serve_handler/icon.svg,sha256=spxNMpiGLzxt46VM70-m-z4xButrIQ_dzLTarJKYSOA,1990
|
|
1278
|
-
mindsdb/integrations/handlers/ray_serve_handler/ray_serve_handler.py,sha256=
|
|
1278
|
+
mindsdb/integrations/handlers/ray_serve_handler/ray_serve_handler.py,sha256=TvaOR1rkdjOe2dxvieGkqxSrvNAjtwtd7jDEluB_uQM,4710
|
|
1279
1279
|
mindsdb/integrations/handlers/reddit_handler/__about__.py,sha256=Xp4s3kJp-REycH83S1RLSaPZHpFqbn-MjRuQZ5BpBuQ,336
|
|
1280
1280
|
mindsdb/integrations/handlers/reddit_handler/__init__.py,sha256=n3dhcPIHT_89hQxEXKQbHApOGBGQxtvWxp-fvFL083s,496
|
|
1281
1281
|
mindsdb/integrations/handlers/reddit_handler/icon.svg,sha256=JAhHkvjiEfOz_BSbBVosQs8VXegNanxdnNUNz1bHyRM,3986
|
|
@@ -1402,7 +1402,7 @@ mindsdb/integrations/handlers/snowflake_handler/__init__.py,sha256=tPpKf8KwyX2DI
|
|
|
1402
1402
|
mindsdb/integrations/handlers/snowflake_handler/connection_args.py,sha256=7pnJbHpbXMZwQbAS4U7LJUk8OWLLpPN2_q9IPr7wpec,1778
|
|
1403
1403
|
mindsdb/integrations/handlers/snowflake_handler/icon.svg,sha256=Syi1A_eltgZH6HjPuKi8bi9Pzf8T879RfVAZnNzK0Qo,4088
|
|
1404
1404
|
mindsdb/integrations/handlers/snowflake_handler/requirements.txt,sha256=RC9MdPLYC6oRsCC2k5sLfgxDTEuEPvqe8OpyjMYEECs,63
|
|
1405
|
-
mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py,sha256=
|
|
1405
|
+
mindsdb/integrations/handlers/snowflake_handler/snowflake_handler.py,sha256=zNJwQr6up7NKW76YJS24uqXoLQQLgllWrJLyX3iUAqo,12134
|
|
1406
1406
|
mindsdb/integrations/handlers/snowflake_handler/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1407
1407
|
mindsdb/integrations/handlers/snowflake_handler/tests/test_snowflake_handler.py,sha256=2_zTKNxqbvhzwVhU9JRmv5Chhh9rulGnMfj-GVIPA60,7369
|
|
1408
1408
|
mindsdb/integrations/handlers/solace_handler/__about__.py,sha256=C-y1qVOGsPDdMEjUocH_juhmrpRwN2-U61sJT_lwzE0,354
|
|
@@ -1934,8 +1934,8 @@ mindsdb/utilities/profiler/__init__.py,sha256=d4VXl80uSm1IotR-WwbBInPmLmACiK0Azx
|
|
|
1934
1934
|
mindsdb/utilities/profiler/profiler.py,sha256=KCUtOupkbM_nCoof9MtiuhUzDGezx4a4NsBX6vGWbPA,3936
|
|
1935
1935
|
mindsdb/utilities/render/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1936
1936
|
mindsdb/utilities/render/sqlalchemy_render.py,sha256=E6_sJv9kfwOwUMurDklFOKpwplASwUBFhfknUqwbUCw,30627
|
|
1937
|
-
mindsdb-25.3.4.
|
|
1938
|
-
mindsdb-25.3.4.
|
|
1939
|
-
mindsdb-25.3.4.
|
|
1940
|
-
mindsdb-25.3.4.
|
|
1941
|
-
mindsdb-25.3.4.
|
|
1937
|
+
mindsdb-25.3.4.1.dist-info/licenses/LICENSE,sha256=ziqdjujs6WDn-9g3t0SISjHCBc2pLRht3gnRbQoXmIs,5804
|
|
1938
|
+
mindsdb-25.3.4.1.dist-info/METADATA,sha256=VRCxtEU0DqArwI1rMwp54IoNXf-DvvkwTBQQes3xLUU,41758
|
|
1939
|
+
mindsdb-25.3.4.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
1940
|
+
mindsdb-25.3.4.1.dist-info/top_level.txt,sha256=10wPR96JDf3hM8aMP7Fz0lDlmClEP480zgXISJKr5jE,8
|
|
1941
|
+
mindsdb-25.3.4.1.dist-info/RECORD,,
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
import pandas as pd
|
|
4
|
-
from mindsdb_sql_parser import ast
|
|
5
|
-
|
|
6
|
-
from mindsdb.integrations.libs.api_handler import APITable
|
|
7
|
-
from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
|
|
8
|
-
from mindsdb.utilities import log
|
|
9
|
-
|
|
10
|
-
from mindsdb_sql_parser import ast
|
|
11
|
-
|
|
12
|
-
logger = log.getLogger(__name__)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ConfluencePagesTable(APITable):
|
|
16
|
-
"""Confluence Pages Table implementation"""
|
|
17
|
-
|
|
18
|
-
def select(self, query: ast.Select) -> pd.DataFrame:
|
|
19
|
-
"""Pulls data from the Confluence "get_all_pages_from_space" API endpoint"""
|
|
20
|
-
conditions = extract_comparison_conditions(query.where)
|
|
21
|
-
if query.limit:
|
|
22
|
-
total_results = query.limit.value
|
|
23
|
-
else:
|
|
24
|
-
total_results = 50
|
|
25
|
-
|
|
26
|
-
space_name = None
|
|
27
|
-
page_id = None
|
|
28
|
-
|
|
29
|
-
for a_where in conditions:
|
|
30
|
-
if a_where[1] == "space":
|
|
31
|
-
space_name = a_where[2]
|
|
32
|
-
if a_where[0] != "=":
|
|
33
|
-
raise ValueError("Unsupported where operation for space")
|
|
34
|
-
elif a_where[1] == "id":
|
|
35
|
-
page_id = a_where[2]
|
|
36
|
-
if a_where[0] != "=":
|
|
37
|
-
raise ValueError("Unsupported where operation for id")
|
|
38
|
-
elif a_where[1] not in ["id", "space"]:
|
|
39
|
-
raise ValueError(f"Unsupported where argument {a_where[1]}")
|
|
40
|
-
|
|
41
|
-
if space_name is None:
|
|
42
|
-
raise ValueError("Space name must be provided in the WHERE clause")
|
|
43
|
-
|
|
44
|
-
if page_id is not None:
|
|
45
|
-
try:
|
|
46
|
-
page = self.handler.connect().get_page_by_id(page_id, expand='body.storage,space')
|
|
47
|
-
confluence_pages_records = [page] if page['space']['key'] == space_name else []
|
|
48
|
-
except Exception as e:
|
|
49
|
-
logger.error(f"Error fetching page with ID {page_id}: {str(e)}")
|
|
50
|
-
confluence_pages_records = []
|
|
51
|
-
else:
|
|
52
|
-
confluence_pages_records = self.handler.connect().get_all_pages_from_space(
|
|
53
|
-
space_name, start=0, limit=total_results, expand="body.storage,space"
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
if not confluence_pages_records:
|
|
57
|
-
return pd.DataFrame(columns=self.get_columns())
|
|
58
|
-
|
|
59
|
-
confluence_pages_df = pd.json_normalize(confluence_pages_records)
|
|
60
|
-
|
|
61
|
-
confluence_pages_df.columns = confluence_pages_df.columns.str.replace("body.storage.value", "body")
|
|
62
|
-
confluence_pages_df['space'] = confluence_pages_df['space.key']
|
|
63
|
-
|
|
64
|
-
confluence_pages_df = confluence_pages_df[self.get_columns()]
|
|
65
|
-
|
|
66
|
-
selected_columns = []
|
|
67
|
-
for target in query.targets:
|
|
68
|
-
if isinstance(target, ast.Star):
|
|
69
|
-
selected_columns = self.get_columns()
|
|
70
|
-
break
|
|
71
|
-
elif isinstance(target, ast.Identifier):
|
|
72
|
-
col = target.parts[-1]
|
|
73
|
-
if col in self.get_columns():
|
|
74
|
-
selected_columns.append(col)
|
|
75
|
-
else:
|
|
76
|
-
raise ValueError(f"Unknown column: {col}")
|
|
77
|
-
else:
|
|
78
|
-
raise ValueError(f"Unknown query target {type(target)}")
|
|
79
|
-
|
|
80
|
-
confluence_pages_df = confluence_pages_df[selected_columns]
|
|
81
|
-
|
|
82
|
-
if query.order_by and len(query.order_by) > 0:
|
|
83
|
-
sort_columns = []
|
|
84
|
-
sort_ascending = []
|
|
85
|
-
for an_order in query.order_by:
|
|
86
|
-
if isinstance(an_order.field, ast.Identifier):
|
|
87
|
-
column = an_order.field.parts[-1]
|
|
88
|
-
if column in selected_columns:
|
|
89
|
-
sort_columns.append(column)
|
|
90
|
-
sort_ascending.append(an_order.direction == "ASC")
|
|
91
|
-
else:
|
|
92
|
-
raise ValueError(f"Order by unknown column {column}")
|
|
93
|
-
else:
|
|
94
|
-
raise ValueError(f"Unsupported order by clause: {an_order}")
|
|
95
|
-
|
|
96
|
-
if sort_columns:
|
|
97
|
-
confluence_pages_df = confluence_pages_df.sort_values(
|
|
98
|
-
by=sort_columns,
|
|
99
|
-
ascending=sort_ascending
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
return confluence_pages_df
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def get_columns(self) -> List[str]:
|
|
106
|
-
"""Gets all columns to be returned in pandas DataFrame responses
|
|
107
|
-
Returns
|
|
108
|
-
-------
|
|
109
|
-
List[str]
|
|
110
|
-
List of columns
|
|
111
|
-
"""
|
|
112
|
-
return [
|
|
113
|
-
"id",
|
|
114
|
-
"type",
|
|
115
|
-
"status",
|
|
116
|
-
"title",
|
|
117
|
-
"space",
|
|
118
|
-
"body",
|
|
119
|
-
"_links.self",
|
|
120
|
-
"_links.webui",
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
def insert(self, query: ast.Insert):
|
|
124
|
-
"""Inserts a new page into the Confluence space
|
|
125
|
-
|
|
126
|
-
Parameters
|
|
127
|
-
----------
|
|
128
|
-
query : ast.Insert
|
|
129
|
-
Given SQL INSERT query
|
|
130
|
-
|
|
131
|
-
Raises
|
|
132
|
-
------
|
|
133
|
-
ValueError
|
|
134
|
-
If the query contains an unsupported condition
|
|
135
|
-
"""
|
|
136
|
-
|
|
137
|
-
columns = [col.name for col in query.columns]
|
|
138
|
-
|
|
139
|
-
for i, val in enumerate(query.values):
|
|
140
|
-
params = dict(zip(columns, val))
|
|
141
|
-
|
|
142
|
-
self.handler.connect().create_page(
|
|
143
|
-
space=params["space"],
|
|
144
|
-
title=params["title"],
|
|
145
|
-
body=params["body"],
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
def update(self, query: ast.Update):
|
|
149
|
-
"""Updates a page in the Confluence space
|
|
150
|
-
|
|
151
|
-
Parameters
|
|
152
|
-
----------
|
|
153
|
-
query : ast.Update
|
|
154
|
-
Given SQL UPDATE query
|
|
155
|
-
|
|
156
|
-
Raises
|
|
157
|
-
------
|
|
158
|
-
ValueError
|
|
159
|
-
If the query contains an unsupported condition
|
|
160
|
-
"""
|
|
161
|
-
params = extract_comparison_conditions(query.where)
|
|
162
|
-
title = query.update_columns["title"].get_string()
|
|
163
|
-
body = query.update_columns["body"].get_string()
|
|
164
|
-
|
|
165
|
-
for param in params:
|
|
166
|
-
if param[1] == "id":
|
|
167
|
-
id = param[2]
|
|
168
|
-
self.handler.connect().update_page(
|
|
169
|
-
page_id=id,
|
|
170
|
-
title=title,
|
|
171
|
-
body=body,
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
def delete(self, query: ast.Delete):
|
|
175
|
-
"""Deletes a page from the Confluence space
|
|
176
|
-
|
|
177
|
-
Parameters
|
|
178
|
-
----------
|
|
179
|
-
query : ast.Delete
|
|
180
|
-
Given SQL DELETE query
|
|
181
|
-
|
|
182
|
-
Raises
|
|
183
|
-
------
|
|
184
|
-
ValueError
|
|
185
|
-
If the query contains an unsupported condition
|
|
186
|
-
"""
|
|
187
|
-
params = extract_comparison_conditions(query.where)
|
|
188
|
-
for param in params:
|
|
189
|
-
if param[1] == "id":
|
|
190
|
-
id = param[2]
|
|
191
|
-
self.handler.connect().remove_page(
|
|
192
|
-
page_id=id,
|
|
193
|
-
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
atlassian-python-api
|
|
File without changes
|
|
File without changes
|