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/25] 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 | +❌ | +✅ | +✅ | +
智能看板 | +❌ | +✅ | +✅ | +
编辑器设置 | +❌ | +✅ | +✅ | +
自定义快捷键 | +❌ | +✅ | +✅ | +
跨多设备使用 | +❌ | +❌ | +✅ | +
- - - -
+## 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). + + From 9b22a462886f853101b9eb570f8ca4830c1072c4 Mon Sep 17 00:00:00 2001 From: SwallowGG <1558143046@qq.com> Date: Thu, 26 Dec 2024 12:47:57 +0800 Subject: [PATCH 13/25] update README_CN.md --- README_CN.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README_CN.md b/README_CN.md index fbefd397f..ed218b875 100644 --- a/README_CN.md +++ b/README_CN.md @@ -12,12 +12,6 @@ - - - -+ + + + + + + -**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 - -[![Stargazers repo roster for @chat2db/Chat2DB](https://reporoster.com/stars/chat2db/Chat2DB)](https://github.com/chat2db/Chat2DB/stargazers) - -## Forkers - -[![Forkers repo roster for @chat2db/Chat2DB](https://reporoster.com/forks/chat2db/Chat2DB)](https://github.com/chat2db/Chat2DB/network/members) - -## 👋 Join Us - -### On WeChat - - - -### On Discord - -[![Discord](https://img.shields.io/badge/-Join%20us%20on%20Discord-%237289DA.svg?style=flat&logo=discord&logoColor=white)](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 +
+ + + +https://github.com/user-attachments/assets/4ae824cf-7d14-4d5b-9ceb-66481bcefc19 + + +Chat2DB is an intelligent, universal SQL client and data reporting tool that integrates AI capabilities. Chat2DB helps you write SQL queries faster, manage databases, generate reports, explore data, and interact with multiple databases. Chat2DB is an open-source project, and we welcome your contributions. + +**1. Intelligent SQL Generation**: +Chat2DB Pro supports AI-driven intelligent SQL development to help you write SQL queries faster. + +**2. Database Management**: +Supports more than 10 databases, including MySQL, PostgreSQL, H2, Oracle, SQLServer, SQLite, MariaDB, ClickHouse, DM, Presto, DB2, OceanBase, Hive, KingBase, MongoDB, Redis, Snowflake, and more. + +**3. Intelligent Report Generation**: +Chat2DB Pro supports AI-driven intelligent data reporting to help you generate dashboards faster. + +**4. Data Structure Synchronization**: +Chat2DB Pro supports database table structure synchronization to help you sync database table structures faster. + +## Feature Comparison + +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 | +❌ | +❌ | +✅ | +
- - - -
+## 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). + From 89302f348a7fca690cc2ed40e0aa76d050ec1bf6 Mon Sep 17 00:00:00 2001 From: SwallowGG <1558143046@qq.com> Date: Thu, 26 Dec 2024 15:20:45 +0800 Subject: [PATCH 22/25] update README_CN.md --- README.md | 8 +- README_CN.md | 8 +- README_JA.md | 312 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 314 insertions(+), 14 deletions(-) create mode 100644 README_JA.md diff --git a/README.md b/README.md index df765f15d..81402a844 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,7 @@ - - - - - - - + diff --git a/README_CN.md b/README_CN.md index fe72bf8c0..07097519d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,13 +20,7 @@ - - - - - - - + diff --git a/README_JA.md b/README_JA.md new file mode 100644 index 000000000..732b01762 --- /dev/null +++ b/README_JA.md @@ -0,0 +1,312 @@ + + + + ++ + + + + + + + +
+ + + +https://github.com/user-attachments/assets/4ae824cf-7d14-4d5b-9ceb-66481bcefc19 + + +Chat2DBはAI機能を統合したインテリジェントで汎用的なSQLクライアントおよびデータ報告ツールです。Chat2DBは、SQLクエリの作成を迅速化し、データベースの管理、レポートの生成、データの探索、および複数のデータベースとのインタラクションをサポートします。Chat2DBはオープンソースプロジェクトであり、皆様の貢献を歓迎します。 + +**1. インテリジェントSQL生成**: +Chat2DB Proは、AI駆動によるインテリジェントなSQL開発をサポートし、SQLクエリをより速く作成する手助けをします。 + +**2. データベース管理**: +MySQL、PostgreSQL、H2、Oracle、SQLServer、SQLite、MariaDB、ClickHouse、DM、Presto、DB2、OceanBase、Hive、KingBase、MongoDB、Redis、Snowflakeなど、10種類以上のデータベースをサポートしています。 + +**3. インテリジェントレポート生成**: +Chat2DB Proは、AI駆動によるインテリジェントなデータ報告をサポートし、ダッシュボードの作成を迅速に行う手助けをします。 + +**4. データ構造の同期**: +Chat2DB Proは、データベーステーブル構造の同期をサポートし、データベーステーブルの構造を迅速に同期する手助けをします。 + +## 機能比較 + +機能 | +コミュニティ オープンソース | +ローカル | +Pro | +
---|---|---|---|
データベースの種類 | +16種類以上 | +100種類以上を対象 | +100種類以上を対象 | +
サポートされているAI | +AI設定が必要 | +インストール時にAIが利用可能 | +インストール時にAIが利用可能 | +
AI機能 | +基本的 | +多様 | +多様 | +
視覚的テーブルエディタ | +✅ | +✅ | +✅ | +
SQLコンソール | +✅ | +✅ | +✅ | +
SQLフォーマット | +✅ | +✅ | +✅ | +
クエリ記録の保存 | +✅ | +✅ | +✅ | +
テーマカラー設定 | +✅ | +✅ | +✅ | +
データ構造の同期 | +❌ | +✅ | +✅ | +
データベースのグループ化 | +❌ | +✅ | +✅ | +
データベース構造のインポート/エクスポート | +❌ | +✅ | +✅ | +
データのインポート/エクスポート | +❌ | +✅ | +✅ | +
データ移行 | +❌ | +✅ | +✅ | +
テーブルのコピー/削除 | +❌ | +✅ | +✅ | +
SQLファイルのオープンと実行 | +❌ | +✅ | +✅ | +
UMLダイアグラム | +❌ | +開発中 | +開発中 | +
コード生成 | +❌ | +✅ | +✅ | +
インサート/アップデートとして結果をコピー | +❌ | +✅ | +✅ | +
クエリ結果の修正 | +❌ | +✅ | +✅ | +
インテリジェントSQLエディタ | +❌ | +✅ | +✅ | +
AIによるテーブル作成 | +❌ | +✅ | +✅ | +
AIデータセット | +❌ | +✅ | +✅ | +
Chat2Excel | +❌ | +✅ | +✅ | +
インテリジェントダッシュボード | +❌ | +✅ | +✅ | +
エディタ設定 | +❌ | +✅ | +✅ | +
カスタムショートカット | +❌ | +✅ | +✅ | +
クロスデバイス使用 | +❌ | +❌ | +✅ | +