diff --git a/README.md b/README.md index 593e59c..74d087d 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,32 @@ -#### This repository is the early source code of Database Client, the new version is closed source. -# Database Client for Visual Studio Code +# Database Client -The online document is migrate to https://doc.database-client.com. +#### This repository contains the early source code. The new version is closed source. --- -

- - - - - - - - - - - - - - GitHub - -

-
- -This project is a database client for VSCode, supports manager **MySQL/MariaDB, PostgreSQL, SQLite, Redis, ClickHouse, 达梦**, and **ElasticSearch**, and works as an **SSH** client, boost your maximum productivity! +This project is a database client for Visual Studio Code, supporting the management **MySQL/MariaDB, PostgreSQL, SQLite, Redis, ClickHouse, 达梦**, and **ElasticSearch**, and works as an **SSH** client, boost your maximum productivity! > Project site: [vscode-database-client](https://github.com/cweijan/vscode-database-client), [中文文档](README_CN.md) [![Logo](./public/logo_dark.png)](https://database-client.com) -## Features +## Installation -- [Database Client](#database-client) - - [Connect](#connect) - - [Table](#table) - - [Execute SQL Query](#execute-sql-query) - - [Backup/Import](#backupimport) - - [Setting](#setting) - - [Filter](#filter) - - [Generate Mock Data](#generate-mock-data) - - [History](#history) +Install from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2) or [Open VSX](https://open-vsx.org/extension/cweijan/vscode-mysql-client2). -## Installation +## Telemetry Reporting -Install from vscode marketplace [vscode-database-client](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2). +The Database Client extension will collects and sends anonymous usage data to the Database Client server to help improve our products and services. Read our [Privacy Statement](https://database-client.com/#/privacyPolicy) to learn more. + +Telemetry reporting follows the telemetry settings of VS Code. Additionally, you can independently disable it by setting `"database-client.telemetry.usesOnlineServices": false`. ## Connect 1. Open Database Explorer panel, then click the `+` button. 2. Select your database type, input connection config then click the connect button. -![connection](images/connection.jpg) - -Two panels are created because in some cases you need to view both SQL and NoSQL data at the same time, you can drag the panel to the other by long-pressing. +![connection](https://doc.database-client.com/images/connection.jpg) ## Table @@ -62,33 +34,32 @@ Two panels are created because in some cases you need to view both SQL and NoSQL 2. Click button beside table to open new table view. 3. Then you can do data modification on the table view. -![query](images/QueryTable.jpg) +![query](https://doc.database-client.com/images/view.png) ## Execute SQL Query In the Database Explorer panel, click the `Open Query` button. -![newquery](images/newquery.jpg) +![newquery](https://doc.database-client.com/images/newquery.jpg) That will open a SQL editor bind of database, it provider: 1. IntelliSense SQL edit. 2. snippets:`sel、del、ins、upd、joi`... 3. Run selected or current cursor SQL (Shortcut : Ctrl+Enter). -4. Run all SQL (Shortcut : Ctrl+Shift+Enter). +4. Run all SQL (Shortcut : Ctrl+Shift+Enter, Command ID: `mysql.runSQL`). -Note: The extension is developed using Nodejs. Nodejs does not allow duplicate name attributes, so you need to avoid columns with the same name in your query, otherwise the results will not be displayed in full. +![run](https://doc.database-client.com/images/run.jpg) -![run](images/run.jpg) +The database can be searched by clicking the search button to the right of "Tables". -This extension supports codelen, but does not support stored procedures and functions. If you use them frequently, it is recommended to disable codelen -![image](https://user-images.githubusercontent.com/27798227/144196926-e581872e-5392-4744-a646-a644749c548c.png) +![1708594027208](image/README/1708594027208.png) ## Cache In order to improve performance, the database information is cached. If your database structure changes externally, you need to click the refresh button to refresh the cache。 -![](images/1638342622208.png) +![](https://doc.database-client.com/image/connection/1638342622208.png) ## Backup/Import @@ -96,28 +67,19 @@ Move to ant DatabaseNode or TableNode. The export/import options are listed in t The extension implements the backup function, but it is not stable enough. You can add mysql_dump or pg_dump to the environment variable, and the extension will use these tools for backup. -![bakcup](images/Backup.jpg) +![bakcup](https://doc.database-client.com/images/Backup.jpg) ## Setting -This extension contain some setting, can be modified as follows. - -The default settings can get the best experience, don't worry - -![image](https://user-images.githubusercontent.com/27798227/146523121-9de9c708-8a8e-4e3b-ae1d-9da36f3217e1.png) -![](images/1611910592756.png) - -## Filter - -Used to quickly filter the table, if there is an input box to simplify the search operation, but unfortunately VSCode does not support this function. +The extension provides some settings, you can refer to the following operations to go to the console settings. -![filter](images/filter.gif) +![1708593458624](image/README_CN/1708593458624.png) ## Generate Mock Data You can easily generate test data. -![mockData](images/mockData.jpg) +![mockData](https://doc.database-client.com/image/minor/mockData.jpg) ## History @@ -127,12 +89,11 @@ Click the history button to open the list of recently executed query history rec ## Credits -- [sql-formatter](https://github.com/zeroturnaround/sql-formatter) Sql format lib. -- [umy-ui](https://github.com/u-leo/umy-ui): Result view render. - [ssh2](https://github.com/mscdex/ssh2): SSH client. +- [sql-formatter](https://github.com/zeroturnaround/sql-formatter) SQL format lib. - Client Lib: - [node-mysql2](https://github.com/sidorares/node-mysql2) : MySQL client. - [node-postgres](https://github.com/brianc/node-postgres): PostgreSQL client. - [tedious](https://github.com/tediousjs/tedious): SqlServer client. - [ioredis](https://github.com/luin/ioredis): Redis client. - - [vscode-sqlite](https://github.com/AlexCovizzi/vscode-sqlite): SQLite client code reference. + - [vscode-sqlite](https://github.com/AlexCovizzi/vscode-sqlite): SQLite client code reference. \ No newline at end of file diff --git a/README_CN.md b/README_CN.md index c0adfba..7454ae0 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,106 +1,78 @@ -# Database Client for Visual Studio Code - -在线文档已迁移至 [doc.database-client.com](https://doc.database-client.com/#/zh/). - ---- - -

- - - - - - - - - - - - - - GitHub - -

-
- -该项目为Visual Studio Code的数据库客户端扩展, 支持**MySQL/MariaDB, PostgreSQL, SQLite, Redis, ClickHouse, 达梦**以及**ElasticSearch**的管理, 且可以作为一个SSH客户端, 最大程度地提高你的生产力! - -Logo - -## 功能 - -- [连接](#连接) -- [数据表](#数据表) -- [执行SQL](#执行SQL) -- [备份/导出](#备份/导出) -- [设置](#设置) -- [表过滤](#表过滤) -- [生成测试数据](#生成测试数据) -- [历史记录](#历史记录) +# Database Client + +该项目是一个用于 Visual Studio Code 的数据库客户端扩展,支持 **MySQL/MariaDB、PostgreSQL、SQLite、Redis、ClickHouse、达梦** 和 **ElasticSearch** 等数据库的管理,并可用作 SSH 客户端,极大地提升您的生产力! + +> 相关链接:[最新文档](https://doc.database-client.com/#/zh/),[Database Client电报群](https://t.me/dbclient) + +[![Logo](./public/logo_dark.png)](https://database-client.com) ## 安装 -在 Visual Studio Code 扩展中心安装 [Database Client](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2). +从 [Visual Studio Code 扩展商店](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2) 或 [Open VSX](https://open-vsx.org/extension/cweijan/vscode-mysql-client2) 安装 + +## 遥测报告 + +Database Client扩展会收集匿名使用数据并将其发送到Database Client服务器以帮助改进我们的产品和服务。阅读我们的[隐私声明](https://database-client.com/#/privacyPolicy)以了解更多信息。 + +遥测报告遵循 VS Code 的遥测设置。此外,您可以通过设置 `"database-client.telemetry.usesOnlineServices": false` 单独禁用它。 ## 连接 1. 打开左侧数据库面板, 点击添加按钮 2. 在连接页面配置相应的数据库信息 -![connection](images/connection.jpg) - -创建两个面板是因为部分情况下你需要同时查看SQL和NoSQL的数据, 可通过长按拖动面板到另一个里面. +![connection](https://doc.database-client.com/images/connection.jpg) ## 数据表 1. 点击数据库表打开数据页, 点击表旁边的按钮则是打开新的数据页. -2. 之后就可在页面进行CRUD、数据导出(**Excel、JSON**)等操作.![query](images/QueryTable.jpg) +2. 之后就可在页面进行CRUD、数据导出(**Excel、JSON**)等操作. + +![query](https://doc.database-client.com/images/view.png) ## 执行SQL -点击数据库节点的 `Open Query` 按钮.![newquery](images/newquery.jpg) +点击数据库节点的 `Open Query` 按钮. +![newquery](https://doc.database-client.com/images/newquery.jpg) 将会打开新的SQL编辑器, 可编辑和执行SQL, 提供了以下功能 1. SQL自动补全. 2. snippets:`sel、del、ins、upd、joi.` 3. 执行已选择或当前光标SQL (快捷键: Ctrl+Enter). -4. 执行全部SQL (快捷键: Ctrl+Shift+Enter). +4. 执行全部SQL (快捷键: Ctrl+Shift+Enter, 命令ID: `mysql.runSQL`). -注意: 扩展由Nodejs开发, Nodejs不支持同名属性, 所以你需要避免在你的查询中出现同名列, 否则结果无法显示完整. +![run](https://doc.database-client.com/images/run.jpg) -![run](images/run.jpg) +可通过点击"Tables"右侧的搜索按钮对数据库进行全文搜索. -该扩展支持了codelen, 但不支持存储过程和函数, 如果你经常使用他们, 则建议禁用codelen. -![image](https://user-images.githubusercontent.com/27798227/144196926-e581872e-5392-4744-a646-a644749c548c.png) +![1708594027208](image/README/1708594027208.png) ## 缓存 为了提高性能,缓存了数据库信息,如果你的数据库结构在外部发生了变更,需要点击以下按钮刷新缓存。 -![](images/1638342622208.png) +![](https://doc.database-client.com/image/connection/1638342622208.png) ## 备份/导入 在表或者数据库节点右击, 之后便可以进行数据的导入导出; 扩展实现了备份功能, 但不够稳定, 可将mysql_dump或pg_dump加到环境变量, 扩展就会使用这些工具进行备份. -![bakcup](images/Backup.jpg) +![bakcup](https://doc.database-client.com/images/Backup.jpg) ## 设置 -该扩展包含一些设置, 可通过以下方式进行设置, 默认的设置就可以得到最好的使用体验, 不用纠结. +扩展提供了一些设置, 你可以参考以下操作前往控制台设置. -![img](images/1611910592756.png) +![1708593458624](image/README_CN/1708593458624.png) ## 表过滤 用于快速筛选表, 如果有输入框可简化搜索操作, 但不幸的是VSCode并不支持该功能. -![filter](images/filter.gif) - ## 生成测试数据 -- 该扩展提供一键生成虚拟数据的功能, 再也不用为没有测试数据而烦恼.![mockData](images/mockData.jpg) +- 该扩展提供一键生成虚拟数据的功能, 再也不用为没有测试数据而烦恼.![mockData](https://doc.database-client.com/image/minor/mockData.jpg) ## 历史记录