From 33837ec903ad425851c1016873ba12efbbde82fd Mon Sep 17 00:00:00 2001 From: SwallowGG <1558143046@qq.com> Date: Mon, 28 Oct 2024 14:42:14 +0800 Subject: [PATCH 01/27] feat:support download task --- .../chat2db/plugin/clickhouse/builder/ClickHouseSqlBuilder.java | 2 ++ .../chat2db-h2/src/main/java/ai/chat2db/plugin/h2/H2Meta.java | 1 + .../java/ai/chat2db/plugin/hive/builder/HiveSqlBuilder.java | 2 ++ .../web/api/controller/rdb/converter/RdbWebConverter.java | 2 ++ 4 files changed, 7 insertions(+) diff --git a/chat2db-server/chat2db-plugins/chat2db-clickhouse/src/main/java/ai/chat2db/plugin/clickhouse/builder/ClickHouseSqlBuilder.java b/chat2db-server/chat2db-plugins/chat2db-clickhouse/src/main/java/ai/chat2db/plugin/clickhouse/builder/ClickHouseSqlBuilder.java index 9f313c27c..0eef415af 100644 --- a/chat2db-server/chat2db-plugins/chat2db-clickhouse/src/main/java/ai/chat2db/plugin/clickhouse/builder/ClickHouseSqlBuilder.java +++ b/chat2db-server/chat2db-plugins/chat2db-clickhouse/src/main/java/ai/chat2db/plugin/clickhouse/builder/ClickHouseSqlBuilder.java @@ -10,6 +10,8 @@ import ai.chat2db.spi.model.TableIndex; import org.apache.commons.lang3.StringUtils; +import java.util.List; + public class ClickHouseSqlBuilder extends DefaultSqlBuilder { @Override diff --git a/chat2db-server/chat2db-plugins/chat2db-h2/src/main/java/ai/chat2db/plugin/h2/H2Meta.java b/chat2db-server/chat2db-plugins/chat2db-h2/src/main/java/ai/chat2db/plugin/h2/H2Meta.java index 1b1cc2fd6..05f938c3b 100644 --- a/chat2db-server/chat2db-plugins/chat2db-h2/src/main/java/ai/chat2db/plugin/h2/H2Meta.java +++ b/chat2db-server/chat2db-plugins/chat2db-h2/src/main/java/ai/chat2db/plugin/h2/H2Meta.java @@ -3,6 +3,7 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; +import java.sql.SQLException; import java.util.*; import java.util.stream.Collectors; diff --git a/chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive/builder/HiveSqlBuilder.java b/chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive/builder/HiveSqlBuilder.java index 02a761df7..a3ca677dd 100644 --- a/chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive/builder/HiveSqlBuilder.java +++ b/chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive/builder/HiveSqlBuilder.java @@ -2,6 +2,7 @@ import ai.chat2db.plugin.hive.type.HiveColumnTypeEnum; import ai.chat2db.plugin.hive.type.HiveIndexTypeEnum; +import ai.chat2db.spi.SqlBuilder; import ai.chat2db.spi.jdbc.DefaultSqlBuilder; import ai.chat2db.spi.model.Database; import ai.chat2db.spi.model.Table; @@ -9,6 +10,7 @@ import ai.chat2db.spi.model.TableIndex; import org.apache.commons.lang3.StringUtils; +import java.util.List; public class HiveSqlBuilder extends DefaultSqlBuilder implements SqlBuilder
功能 | +社区开源版 | +Local版(收费) | +Pro版(收费) | +
---|---|---|---|
数据库类型 | +16+ | +目标100+ | +目标100+ | +
支持的 AI | +需要配置AI | +安装即可使用AI | +安装即可使用AI | +
AI 能力 | +简单 | +多样 | +多样 | +
可视化编辑表 | +✅ | +✅ | +✅ | +
SQL控制台 | +✅ | +✅ | +✅ | +
SQL格式化 | +✅ | +✅ | +✅ | +
保存查询记录 | +✅ | +✅ | +✅ | +
主题颜色设置 | +✅ | +✅ | +✅ | +
数据结构同步 | +❌ | +✅ | +✅ | +
数据库分组 | +❌ | +✅ | +✅ | +
数据库结构导入导出 | +❌ | +✅ | +✅ | +
数据导入导出 | +❌ | +✅ | +✅ | +
数据迁移 | +❌ | +✅ | +✅ | +
复制/清空表 | +❌ | +✅ | +✅ | +
打开运行SQL文件 | +❌ | +✅ | +✅ | +
UML图 | +❌ | +开发中 | +开发中 | +
生成代码 | +❌ | +✅ | +✅ | +
复制结果为 +Insert/update + | +❌ | +✅ | +✅ | +
修改查询结果 | +❌ | +✅ | +✅ | +
智能SQL编辑器 | +❌ | +✅ | +✅ | +
AI建表 | +❌ | +✅ | +✅ | +
AI数据集 | +❌ | +✅ | +✅ | +
Chat2Excel | +❌ | +✅ | +✅ | +
智能看板 | +❌ | +✅ | +✅ | +
编辑器设置 | +❌ | +✅ | +✅ | +
自定义快捷键 | +❌ | +✅ | +✅ | +
跨多设备使用 | +❌ | +❌ | +✅ | +
-
-
-
-
+
+
+
+
+
+
+
-**English** | [中文](README_CN.md)· 🏆 Top 100 Open Project!
-
-## Download and Install Chat2DB(Pro)
-
-[Download](https://chat2db.ai/download)
-Double click package to install
-
-#### AI-driven intelligent SQL development
-
-
-
-
-
-
-
-
-
-
-#### AI-driven Intelligent Reports
-
-
-
-
-#### AI-driven Data Exploration
-
-
-
-
-### We have also open-sourced our first GLM, [Chat2DB-SQL-7B](https://github.com/chat2db/Chat2DB-GLM). You can refer more details from below links.
-
-- github: [Chat2DB-SQL-7B](https://github.com/chat2db/Chat2DB-GLM)
-- huggingface🤗:[Chat2DB-SQL-7B](https://huggingface.co/Chat2DB/Chat2DB-SQL-7B)
-- modelscope:[Chat2DB-SQL-7B](https://modelscope.cn/models/Chat2DB/Chat2DB-SQL-7B/summary)
-
-### Deploy the InternLM model on Chat2DB
-
-Thanks to [InternLM](https://github.com/InternLM/InternLM) for the strong support for this project. In the custom models of this project, multiple model weights from InternLM can be integrated. For more details, please refer to [chat2db-internlm-deploy](https://github.com/chat2db/chat2db-internlm-deploy)
-
-## Supported databases
-Chat2DB Pro supports all the following databases, including the most requested Redis feature.
-- MySQL
-- PostgreSQL
-- H2
-- Oracle
-- SQLServer
-- SQLite
-- MariaDB
-- ClickHouse
-- DM
-- Presto
-- DB2
-- OceanBase
-- Hive
-- KingBase
-- MongoDB
-- Redis
-- Snowflake
-
-
-## Using Chat2DB
-Refer to the [Quick Start Guide](https://docs.chat2db.ai/) to get started with Chat2DB.
-
-
-## Contribution Guide
-We welcome and encourage community members to contribute to the Chat2DB project. Whether it's by reporting issues, proposing new features, or directly submitting code fixes and improvements, your help is invaluable.
-If you're interested in contributing, please follow our contribution guidelines:
-
-- Report Issues: Report any issues or bugs encountered via GitHub Issues.
-- Submit Pull Requests: If you wish to contribute directly to the codebase, please fork the repository and submit a pull request (PR).
-- Improve Documentation: Contributions to best practices, example code, documentation improvements, etc., are welcome.
-
-## Stargazers
-
-[](https://github.com/chat2db/Chat2DB/stargazers)
-
-## Forkers
-
-[](https://github.com/chat2db/Chat2DB/network/members)
-
-## 👋 Join Us
-
-### On WeChat
-
-
-
-### On Discord
-
-[](https://discord.com/invite/uNjb3n5JVN)
-
-## LICENSE
-
-The primary license used by this software is the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), supplemented by the [Chat2DB License](./Chat2DB_LICENSE).
-
-
-## ❤️ Acknowledgements
+
Feature | +Community Open Source | +Local | +Pro | +
---|---|---|---|
Database Types | +16+ | +Target 100+ | +Target 100+ | +
Supported AI | +Requires AI Configuration | +AI ready on installation | +AI ready on installation | +
AI Capabilities | +Basic | +Varied | +Varied | +
Visual Table Editor | +✅ | +✅ | +✅ | +
SQL Console | +✅ | +✅ | +✅ | +
SQL Formatting | +✅ | +✅ | +✅ | +
Save Query Records | +✅ | +✅ | +✅ | +
Theme Color Settings | +✅ | +✅ | +✅ | +
Data Structure Sync | +❌ | +✅ | +✅ | +
Database Grouping | +❌ | +✅ | +✅ | +
Database Structure Import/Export | +❌ | +✅ | +✅ | +
Data Import/Export | +❌ | +✅ | +✅ | +
Data Migration | +❌ | +✅ | +✅ | +
Copy/Clear Table | +❌ | +✅ | +✅ | +
Open and Run SQL Files | +❌ | +✅ | +✅ | +
UML Diagram | +❌ | +In Development | +In Development | +
Generate Code | +❌ | +✅ | +✅ | +
Copy Results as Insert/Update | +❌ | +✅ | +✅ | +
Modify Query Results | +❌ | +✅ | +✅ | +
Intelligent SQL Editor | +❌ | +✅ | +✅ | +
AI Table Creation | +❌ | +✅ | +✅ | +
AI Data Sets | +❌ | +✅ | +✅ | +
Chat2Excel | +❌ | +✅ | +✅ | +
Intelligent Dashboard | +❌ | +✅ | +✅ | +
Editor Settings | +❌ | +✅ | +✅ | +
Custom Shortcuts | +❌ | +✅ | +✅ | +
Cross-device Usage | +❌ | +❌ | +✅ | +
-
-
-
-
+
+
+
+
+
+
+
+
+
機能 | +コミュニティ オープンソース | +ローカル | +Pro | +
---|---|---|---|
データベースの種類 | +16種類以上 | +100種類以上を対象 | +100種類以上を対象 | +
サポートされているAI | +AI設定が必要 | +インストール時にAIが利用可能 | +インストール時にAIが利用可能 | +
AI機能 | +基本的 | +多様 | +多様 | +
視覚的テーブルエディタ | +✅ | +✅ | +✅ | +
SQLコンソール | +✅ | +✅ | +✅ | +
SQLフォーマット | +✅ | +✅ | +✅ | +
クエリ記録の保存 | +✅ | +✅ | +✅ | +
テーマカラー設定 | +✅ | +✅ | +✅ | +
データ構造の同期 | +❌ | +✅ | +✅ | +
データベースのグループ化 | +❌ | +✅ | +✅ | +
データベース構造のインポート/エクスポート | +❌ | +✅ | +✅ | +
データのインポート/エクスポート | +❌ | +✅ | +✅ | +
データ移行 | +❌ | +✅ | +✅ | +
テーブルのコピー/削除 | +❌ | +✅ | +✅ | +
SQLファイルのオープンと実行 | +❌ | +✅ | +✅ | +
UMLダイアグラム | +❌ | +開発中 | +開発中 | +
コード生成 | +❌ | +✅ | +✅ | +
インサート/アップデートとして結果をコピー | +❌ | +✅ | +✅ | +
クエリ結果の修正 | +❌ | +✅ | +✅ | +
インテリジェントSQLエディタ | +❌ | +✅ | +✅ | +
AIによるテーブル作成 | +❌ | +✅ | +✅ | +
AIデータセット | +❌ | +✅ | +✅ | +
Chat2Excel | +❌ | +✅ | +✅ | +
インテリジェントダッシュボード | +❌ | +✅ | +✅ | +
エディタ設定 | +❌ | +✅ | +✅ | +
カスタムショートカット | +❌ | +✅ | +✅ | +
クロスデバイス使用 | +❌ | +❌ | +✅ | +