fdb2 1.0.33 → 1.0.34

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.
Files changed (38) hide show
  1. package/dist/public/explorer.css +42 -42
  2. package/dist/public/explorer.js +35 -24
  3. package/dist/public/index.js +2 -0
  4. package/dist/public/layout.css +69 -54
  5. package/dist/public/layout.js +15 -8
  6. package/dist/server/core/db-api.js +5 -0
  7. package/dist/server/core/db-api.js.map +1 -1
  8. package/dist/server/core/db-api.ts +5 -0
  9. package/dist/server/core/dialect.d.ts +1 -1
  10. package/dist/server/core/dialect.d.ts.map +1 -1
  11. package/dist/server/core/dialect.js +21 -1
  12. package/dist/server/core/dialect.js.map +1 -1
  13. package/dist/server/core/dialect.ts +23 -2
  14. package/dist/server/service/connection.service.d.ts.map +1 -1
  15. package/dist/server/service/connection.service.js +17 -1
  16. package/dist/server/service/connection.service.js.map +1 -1
  17. package/dist/server/service/connection.service.ts +17 -1
  18. package/dist/server/service/database/clickhouse-connection.d.ts +44 -0
  19. package/dist/server/service/database/clickhouse-connection.d.ts.map +1 -0
  20. package/dist/server/service/database/clickhouse-connection.js +210 -0
  21. package/dist/server/service/database/clickhouse-connection.js.map +1 -0
  22. package/dist/server/service/database/clickhouse-connection.ts +182 -0
  23. package/dist/server/service/database/clickhouse.service.d.ts +138 -0
  24. package/dist/server/service/database/clickhouse.service.d.ts.map +1 -0
  25. package/dist/server/service/database/clickhouse.service.js +794 -0
  26. package/dist/server/service/database/clickhouse.service.js.map +1 -0
  27. package/dist/server/service/database/clickhouse.service.ts +853 -0
  28. package/dist/server/service/database/database.service.d.ts +42 -0
  29. package/dist/server/service/database/database.service.d.ts.map +1 -1
  30. package/dist/server/service/database/database.service.js +37 -0
  31. package/dist/server/service/database/database.service.js.map +1 -1
  32. package/dist/server/service/database/database.service.ts +37 -0
  33. package/dist/server/service/database/index.d.ts +1 -0
  34. package/dist/server/service/database/index.d.ts.map +1 -1
  35. package/dist/server/service/database/index.js +3 -1
  36. package/dist/server/service/database/index.js.map +1 -1
  37. package/dist/server/service/database/index.ts +1 -0
  38. package/package.json +1 -4
@@ -1,19 +1,19 @@
1
1
 
2
2
  /* 继承原有的样式,这里可以添加组件特定的样式 */
3
- .connection-form-modern[data-v-d27f5508] {
3
+ .connection-form-modern[data-v-3a550e2d] {
4
4
  padding: 0;
5
5
  }
6
- .form-section[data-v-d27f5508] {
6
+ .form-section[data-v-3a550e2d] {
7
7
  margin-bottom: 2rem;
8
8
  }
9
- .section-header[data-v-d27f5508] {
9
+ .section-header[data-v-3a550e2d] {
10
10
  display: flex;
11
11
  align-items: center;
12
12
  margin-bottom: 1.5rem;
13
13
  padding-bottom: 0.75rem;
14
14
  border-bottom: 2px solid #cbd5e1;
15
15
  }
16
- .section-icon[data-v-d27f5508] {
16
+ .section-icon[data-v-3a550e2d] {
17
17
  width: 40px;
18
18
  height: 40px;
19
19
  border-radius: 8px;
@@ -24,24 +24,24 @@
24
24
  color: white;
25
25
  margin-right: 1rem;
26
26
  }
27
- .section-title[data-v-d27f5508] {
27
+ .section-title[data-v-3a550e2d] {
28
28
  font-size: 1.1rem;
29
29
  font-weight: 600;
30
30
  margin: 0;
31
31
  color: #1e293b;
32
32
  }
33
- .section-content[data-v-d27f5508] {
33
+ .section-content[data-v-3a550e2d] {
34
34
  padding-left: 56px;
35
35
  }
36
- .form-grid[data-v-d27f5508] {
36
+ .form-grid[data-v-3a550e2d] {
37
37
  display: grid;
38
38
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
39
39
  gap: 1.5rem;
40
40
  }
41
- .form-group-modern[data-v-d27f5508] {
41
+ .form-group-modern[data-v-3a550e2d] {
42
42
  margin-bottom: 1rem;
43
43
  }
44
- .form-label-modern[data-v-d27f5508] {
44
+ .form-label-modern[data-v-3a550e2d] {
45
45
  display: flex;
46
46
  align-items: center;
47
47
  font-weight: 600;
@@ -49,8 +49,8 @@
49
49
  margin-bottom: 0.5rem;
50
50
  font-size: 0.9rem;
51
51
  }
52
- .form-control-modern[data-v-d27f5508],
53
- .form-select-modern[data-v-d27f5508] {
52
+ .form-control-modern[data-v-3a550e2d],
53
+ .form-select-modern[data-v-3a550e2d] {
54
54
  width: 100%;
55
55
  padding: 0.75rem;
56
56
  border: 2px solid #94a3b8;
@@ -60,46 +60,46 @@
60
60
  color: #1e293b;
61
61
  background-color: #ffffff;
62
62
  }
63
- .form-control-modern[data-v-d27f5508]:focus,
64
- .form-select-modern[data-v-d27f5508]:focus {
63
+ .form-control-modern[data-v-3a550e2d]:focus,
64
+ .form-select-modern[data-v-3a550e2d]:focus {
65
65
  outline: none;
66
66
  border-color: #667eea;
67
67
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
68
68
  }
69
- .form-check-modern[data-v-d27f5508] {
69
+ .form-check-modern[data-v-3a550e2d] {
70
70
  display: flex;
71
71
  align-items: flex-start;
72
72
  padding: 0;
73
73
  }
74
- .form-check-input-modern[data-v-d27f5508] {
74
+ .form-check-input-modern[data-v-3a550e2d] {
75
75
  margin-right: 0.75rem;
76
76
  margin-top: 0.25rem;
77
77
  }
78
- .form-check-label-modern[data-v-d27f5508] {
78
+ .form-check-label-modern[data-v-3a550e2d] {
79
79
  display: flex;
80
80
  flex-direction: column;
81
81
  cursor: pointer;
82
82
  }
83
- .check-text[data-v-d27f5508] {
83
+ .check-text[data-v-3a550e2d] {
84
84
  font-weight: 500;
85
85
  color: #1e293b;
86
86
  margin-bottom: 0.25rem;
87
87
  }
88
- .check-description[data-v-d27f5508] {
88
+ .check-description[data-v-3a550e2d] {
89
89
  font-size: 0.85rem;
90
90
  color: #475569;
91
91
  }
92
- .required[data-v-d27f5508] {
92
+ .required[data-v-3a550e2d] {
93
93
  color: #dc3545;
94
94
  margin-left: 0.25rem;
95
95
  }
96
- .error-content[data-v-d27f5508] {
96
+ .error-content[data-v-3a550e2d] {
97
97
  display: flex;
98
98
  align-items: center;
99
99
  padding: 1.5rem;
100
100
  gap: 1rem;
101
101
  }
102
- .error-icon[data-v-d27f5508] {
102
+ .error-icon[data-v-3a550e2d] {
103
103
  width: 48px;
104
104
  height: 48px;
105
105
  border-radius: 50%;
@@ -111,7 +111,7 @@
111
111
  font-size: 1.5rem;
112
112
  flex-shrink: 0;
113
113
  }
114
- .error-message[data-v-d27f5508] {
114
+ .error-message[data-v-3a550e2d] {
115
115
  flex: 1;
116
116
  color: #1e293b;
117
117
  font-size: 0.95rem;
@@ -1777,12 +1777,12 @@ to {
1777
1777
  }
1778
1778
  }
1779
1779
 
1780
- .about-page[data-v-9b3e61a1] {
1780
+ .about-page[data-v-5a974f04] {
1781
1781
  padding: 2rem;
1782
1782
  max-width: 800px;
1783
1783
  margin: 0 auto;
1784
1784
  }
1785
- .about-header[data-v-9b3e61a1] {
1785
+ .about-header[data-v-5a974f04] {
1786
1786
  display: flex;
1787
1787
  align-items: center;
1788
1788
  gap: 1rem;
@@ -1790,7 +1790,7 @@ to {
1790
1790
  padding-bottom: 1rem;
1791
1791
  border-bottom: 1px solid #e2e8f0;
1792
1792
  }
1793
- .about-logo[data-v-9b3e61a1] {
1793
+ .about-logo[data-v-5a974f04] {
1794
1794
  width: 60px;
1795
1795
  height: 60px;
1796
1796
  border-radius: 12px;
@@ -1801,62 +1801,62 @@ to {
1801
1801
  color: white;
1802
1802
  font-size: 2rem;
1803
1803
  }
1804
- .about-title h2[data-v-9b3e61a1] {
1804
+ .about-title h2[data-v-5a974f04] {
1805
1805
  margin: 0;
1806
1806
  font-size: 2rem;
1807
1807
  font-weight: 700;
1808
1808
  color: #1e293b;
1809
1809
  }
1810
- .about-title p[data-v-9b3e61a1] {
1810
+ .about-title p[data-v-5a974f04] {
1811
1811
  margin: 0.25rem 0 0 0;
1812
1812
  color: #64748b;
1813
1813
  font-size: 1.125rem;
1814
1814
  }
1815
- .about-content[data-v-9b3e61a1] {
1815
+ .about-content[data-v-5a974f04] {
1816
1816
  display: flex;
1817
1817
  flex-direction: column;
1818
1818
  gap: 2rem;
1819
1819
  }
1820
- .about-section[data-v-9b3e61a1] {
1820
+ .about-section[data-v-5a974f04] {
1821
1821
  background: white;
1822
1822
  padding: 1.5rem;
1823
1823
  border-radius: 12px;
1824
1824
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
1825
1825
  }
1826
- .about-section h3[data-v-9b3e61a1] {
1826
+ .about-section h3[data-v-5a974f04] {
1827
1827
  margin: 0 0 1rem 0;
1828
1828
  font-size: 1.25rem;
1829
1829
  font-weight: 600;
1830
1830
  color: #1e293b;
1831
1831
  }
1832
- .about-section p[data-v-9b3e61a1] {
1832
+ .about-section p[data-v-5a974f04] {
1833
1833
  margin: 0 0 1rem 0;
1834
1834
  color: #64748b;
1835
1835
  line-height: 1.6;
1836
1836
  }
1837
- .feature-list[data-v-9b3e61a1] {
1837
+ .feature-list[data-v-5a974f04] {
1838
1838
  list-style: none;
1839
1839
  padding: 0;
1840
1840
  margin: 0;
1841
1841
  }
1842
- .feature-list li[data-v-9b3e61a1] {
1842
+ .feature-list li[data-v-5a974f04] {
1843
1843
  display: flex;
1844
1844
  align-items: flex-start;
1845
1845
  gap: 0.75rem;
1846
1846
  margin-bottom: 0.75rem;
1847
1847
  color: #64748b;
1848
1848
  }
1849
- .feature-list li i[data-v-9b3e61a1] {
1849
+ .feature-list li i[data-v-5a974f04] {
1850
1850
  color: #10b981;
1851
1851
  margin-top: 0.25rem;
1852
1852
  flex-shrink: 0;
1853
1853
  }
1854
- .database-types[data-v-9b3e61a1] {
1854
+ .database-types[data-v-5a974f04] {
1855
1855
  display: grid;
1856
1856
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1857
1857
  gap: 0.5rem;
1858
1858
  }
1859
- .db-type[data-v-9b3e61a1] {
1859
+ .db-type[data-v-5a974f04] {
1860
1860
  display: flex;
1861
1861
  justify-content: space-between;
1862
1862
  align-items: center;
@@ -1864,20 +1864,20 @@ to {
1864
1864
  background: #f8fafc;
1865
1865
  border-radius: 6px;
1866
1866
  }
1867
- .db-name[data-v-9b3e61a1] {
1867
+ .db-name[data-v-5a974f04] {
1868
1868
  font-weight: 500;
1869
1869
  color: #374151;
1870
1870
  }
1871
- .db-port[data-v-9b3e61a1] {
1871
+ .db-port[data-v-5a974f04] {
1872
1872
  color: #6b7280;
1873
1873
  font-size: 0.875rem;
1874
1874
  }
1875
- .about-links[data-v-9b3e61a1] {
1875
+ .about-links[data-v-5a974f04] {
1876
1876
  display: flex;
1877
1877
  flex-direction: column;
1878
1878
  gap: 0.75rem;
1879
1879
  }
1880
- .about-link[data-v-9b3e61a1] {
1880
+ .about-link[data-v-5a974f04] {
1881
1881
  display: flex;
1882
1882
  align-items: center;
1883
1883
  gap: 0.75rem;
@@ -1889,11 +1889,11 @@ to {
1889
1889
  font-weight: 500;
1890
1890
  transition: all 0.3s ease;
1891
1891
  }
1892
- .about-link[data-v-9b3e61a1]:hover {
1892
+ .about-link[data-v-5a974f04]:hover {
1893
1893
  background: #e0e7ff;
1894
1894
  transform: translateX(4px);
1895
1895
  }
1896
- .about-link i[data-v-9b3e61a1] {
1896
+ .about-link i[data-v-5a974f04] {
1897
1897
  flex-shrink: 0;
1898
1898
  }
1899
1899
 
@@ -1,6 +1,6 @@
1
1
  import { i as __require, n as __esmMin, t as __commonJSMin } from "./rolldown-runtime.js";
2
2
  import { C as createCommentVNode, D as createTextVNode, E as createStaticVNode, F as onBeforeUnmount, G as withDirectives, I as onMounted, O as createVNode, P as nextTick, R as openBlock, S as createBlock, T as createSlots, U as watch, W as withCtx, _ as vShow, a as init_vue_router, at as normalizeClass, b as computed, d as init_vue_runtime_esm_bundler, et as ref, g as vModelText, h as vModelSelect, k as defineComponent, l as init_vue_i18n, m as vModelCheckbox, o as useRoute, ot as normalizeStyle, s as useRouter, st as toDisplayString, u as useI18n, v as withModifiers, w as createElementBlock, x as createBaseVNode, y as Fragment, z as renderList } from "./vue.js";
3
- import { _ as init_i18n, a as dataGrid_default, b as defineStore, c as modal_default, d as toast, f as init_toast, g as getT, h as init__plugin_vue_export_helper, i as showConfirm, l as init_loading, m as _plugin_vue_export_helper_default, n as init_modal$2, o as init_dataGrid, p as toast_default, r as showAlert, s as init_modal$1, t as getModalInstance, u as init_toast$1, v as init_base, x as init_pinia, y as request } from "./index.js";
3
+ import { _ as init_i18n, a as dataGrid_default, b as defineStore, c as modal_default, d as toast, f as init_toast$1, g as getT, h as init__plugin_vue_export_helper, i as showConfirm, l as init_loading, m as _plugin_vue_export_helper_default, n as init_modal$2, o as init_dataGrid, p as toast_default, r as showAlert, s as init_modal$1, t as getModalInstance, u as init_toast, v as init_base, x as init_pinia, y as request } from "./index.js";
4
4
  //#region src/service/database.ts
5
5
  var ConnectionService, DatabaseService;
6
6
  var init_database = __esmMin((() => {
@@ -510,7 +510,6 @@ var init_index_vue_vue_type_script_setup_true_lang = __esmMin((() => {
510
510
  const props = __props;
511
511
  const emit = __emit;
512
512
  const connectionModal = ref();
513
- const toastRef = ref();
514
513
  const errorModal = ref();
515
514
  const errorMessage = ref("");
516
515
  const editingConnection = ref(null);
@@ -621,26 +620,32 @@ var init_index_vue_vue_type_script_setup_true_lang = __esmMin((() => {
621
620
  async function saveAndTestConnection() {
622
621
  try {
623
622
  await saveConnection(false);
624
- await testConnection(connectionForm.value);
625
- hide();
626
- emit("saved", connectionForm.value);
627
- showToast("", editingConnection.value ? t("connection.configUpdateAndTestSuccess") : t("connection.configAddAndTestSuccess"));
628
- } catch (error) {
629
- console.error("保存并测试连接失败:", error);
630
- if (error.message && error.message.includes("连接测试失败")) {
623
+ if (await testConnection(connectionForm.value)) {
624
+ hide();
625
+ emit("saved", connectionForm.value);
626
+ showToast("", editingConnection.value ? t("connection.configUpdateAndTestSuccess") : t("connection.configAddAndTestSuccess"));
627
+ } else {
631
628
  showToast(t("common.warning"), t("connection.configSavedButTestFailed"), "warning");
632
629
  hide();
633
630
  emit("saved", connectionForm.value);
634
631
  }
632
+ } catch (error) {
633
+ console.error("保存并测试连接失败:", error);
635
634
  }
636
635
  }
637
636
  async function testConnection(connection) {
638
637
  try {
639
- if (await new ConnectionService().testConnection(connection)) showToast("", `"${connection.name}" 连接测试成功`, "success");
640
- else showToast("", `"${connection.name}" 连接测试失败`, "error");
638
+ const body = await new ConnectionService().testConnection(connection) || {};
639
+ if (body.ret === 0 && body.data === true) {
640
+ showToast("", `"${connection.name}" 连接测试成功`, "success");
641
+ return true;
642
+ }
643
+ showToast("", `"${connection.name}" 连接测试失败`, "error");
644
+ return false;
641
645
  } catch (error) {
642
646
  console.error("测试连接失败:", error);
643
- showToast("", `"${connection.name}" 连接测试失败: ${error.message || "未知错误"}`, "error");
647
+ showToast("", `"${connection.name}" 连接测试失败: ${error?.message || "未知错误"}`, "error");
648
+ return false;
644
649
  }
645
650
  }
646
651
  function handleModalClose() {
@@ -651,7 +656,9 @@ var init_index_vue_vue_type_script_setup_true_lang = __esmMin((() => {
651
656
  if (selectedType?.defaultPort) connectionForm.value.port = selectedType.defaultPort;
652
657
  }
653
658
  function showToast(title, message, type) {
654
- toastRef.value?.show(title, message, type);
659
+ if (type === "error") toast.error(message, title);
660
+ else if (type === "warning") toast.warning(message, title);
661
+ else toast.success(message, title);
655
662
  }
656
663
  async function loadDatabaseTypes() {
657
664
  try {
@@ -852,17 +859,17 @@ var init_index_vue_vue_type_script_setup_true_lang = __esmMin((() => {
852
859
  });
853
860
  }));
854
861
  //#endregion
855
- //#region src/components/connection-editor/index.vue?vue&type=style&index=0&scoped=d27f5508&lang.css
856
- var init_index_vue_vue_type_style_index_0_scoped_d27f5508_lang = __esmMin((() => {}));
862
+ //#region src/components/connection-editor/index.vue?vue&type=style&index=0&scoped=3a550e2d&lang.css
863
+ var init_index_vue_vue_type_style_index_0_scoped_3a550e2d_lang = __esmMin((() => {}));
857
864
  //#endregion
858
865
  //#region src/components/connection-editor/index.vue
859
866
  var connection_editor_default;
860
867
  var init_connection_editor = __esmMin((() => {
861
868
  init_index_vue_vue_type_script_setup_true_lang();
862
869
  init_index_vue_vue_type_script_setup_true_lang();
863
- init_index_vue_vue_type_style_index_0_scoped_d27f5508_lang();
870
+ init_index_vue_vue_type_style_index_0_scoped_3a550e2d_lang();
864
871
  init__plugin_vue_export_helper();
865
- connection_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d27f5508"]]);
872
+ connection_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3a550e2d"]]);
866
873
  })), ModalHelper, modal;
867
874
  var init_modal = __esmMin((() => {
868
875
  init_vue_runtime_esm_bundler();
@@ -971,7 +978,7 @@ var init_connection = __esmMin((() => {
971
978
  init_pinia();
972
979
  init_database();
973
980
  init_modal();
974
- init_toast$1();
981
+ init_toast();
975
982
  init_i18n();
976
983
  databaseService = new DatabaseService();
977
984
  connectionService = new ConnectionService();
@@ -55829,7 +55836,7 @@ var init_db_tools_vue_vue_type_script_setup_true_lang = __esmMin((() => {
55829
55836
  init_vue_i18n();
55830
55837
  init_database();
55831
55838
  init_modal();
55832
- init_toast$1();
55839
+ init_toast();
55833
55840
  _hoisted_1$6 = { class: "db-tools" };
55834
55841
  _hoisted_2$6 = { class: "tools-header" };
55835
55842
  _hoisted_3$6 = { class: "tools-title" };
@@ -58873,6 +58880,10 @@ var init_about_vue_vue_type_script_setup_true_lang = __esmMin((() => {
58873
58880
  {
58874
58881
  name: "SAP HANA",
58875
58882
  port: "39013"
58883
+ },
58884
+ {
58885
+ name: "ClickHouse",
58886
+ port: "8123"
58876
58887
  }
58877
58888
  ];
58878
58889
  return (_ctx, _cache) => {
@@ -58899,17 +58910,17 @@ var init_about_vue_vue_type_script_setup_true_lang = __esmMin((() => {
58899
58910
  });
58900
58911
  }));
58901
58912
  //#endregion
58902
- //#region src/platform/database/components/about.vue?vue&type=style&index=0&scoped=9b3e61a1&lang.css
58903
- var init_about_vue_vue_type_style_index_0_scoped_9b3e61a1_lang = __esmMin((() => {}));
58913
+ //#region src/platform/database/components/about.vue?vue&type=style&index=0&scoped=5a974f04&lang.css
58914
+ var init_about_vue_vue_type_style_index_0_scoped_5a974f04_lang = __esmMin((() => {}));
58904
58915
  //#endregion
58905
58916
  //#region src/platform/database/components/about.vue
58906
58917
  var about_default;
58907
58918
  var init_about = __esmMin((() => {
58908
58919
  init_about_vue_vue_type_script_setup_true_lang();
58909
58920
  init_about_vue_vue_type_script_setup_true_lang();
58910
- init_about_vue_vue_type_style_index_0_scoped_9b3e61a1_lang();
58921
+ init_about_vue_vue_type_style_index_0_scoped_5a974f04_lang();
58911
58922
  init__plugin_vue_export_helper();
58912
- about_default = /*#__PURE__*/ _plugin_vue_export_helper_default(about_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-9b3e61a1"]]);
58923
+ about_default = /*#__PURE__*/ _plugin_vue_export_helper_default(about_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5a974f04"]]);
58913
58924
  }));
58914
58925
  //#endregion
58915
58926
  //#region src/platform/database/explorer.vue?vue&type=script&setup=true&lang.ts
@@ -58919,7 +58930,7 @@ var init_explorer_vue_vue_type_script_setup_true_lang = __esmMin((() => {
58919
58930
  init_vue_router();
58920
58931
  init_database();
58921
58932
  init_connection_editor();
58922
- init_toast();
58933
+ init_toast$1();
58923
58934
  init_loading();
58924
58935
  init_connection_detail();
58925
58936
  init_database_detail();
@@ -4767,6 +4767,7 @@ var init_zh_CN = __esmMin((() => {
4767
4767
  tip: "提示",
4768
4768
  confirmTitle: "确认"
4769
4769
  },
4770
+ app: { version: "当前版本" },
4770
4771
  nav: {
4771
4772
  databaseManagement: "数据库管理",
4772
4773
  databaseHome: "数据库管理首页",
@@ -5516,6 +5517,7 @@ var init_en_US = __esmMin((() => {
5516
5517
  tip: "Tip",
5517
5518
  confirmTitle: "Confirm"
5518
5519
  },
5520
+ app: { version: "Current Version" },
5519
5521
  nav: {
5520
5522
  databaseManagement: "Database Management",
5521
5523
  databaseHome: "Database Home",