Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cweijan/vscode-database-client
Database Client For Visual Studio Code
https://github.com/cweijan/vscode-database-client
mysql-database sql vscode vscode-extension
Last synced: 2 days ago
JSON representation
Database Client For Visual Studio Code
- Host: GitHub
- URL: https://github.com/cweijan/vscode-database-client
- Owner: cweijan
- License: mit
- Created: 2020-03-27T19:13:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T10:52:45.000Z (about 1 month ago)
- Last Synced: 2024-12-03T05:03:24.484Z (9 days ago)
- Topics: mysql-database, sql, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://database-client.com
- Size: 9.22 MB
- Stars: 2,509
- Watchers: 15
- Forks: 288
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- stars - cweijan/vscode-database-client
- awesomeLibrary - vscode-database-client
- my-awesome-list - vscode-database-client
- awesome-starts - cweijan/vscode-database-client - Database Client For Visual Studio Code (TypeScript)
README
#### This repository is the early source code of Database Client, the new version is closed source.
# Database Client for Visual Studio Code
The online document is migrate to https://doc.database-client.com.
---
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!
> 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
- [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)## Installation
Install from vscode marketplace [vscode-database-client](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2).
## 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.
## Table
1. Click table to open table view.
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)
## Execute SQL Query
In the Database Explorer panel, click the `Open Query` button.
![newquery](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).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](images/run.jpg)
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)## 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)
## Backup/Import
Move to ant DatabaseNode or TableNode. The export/import options are listed in the context menu (right click to open).
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)
## 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.
![filter](images/filter.gif)
## Generate Mock Data
You can easily generate test data.
![mockData](images/mockData.jpg)
## History
Click the history button to open the list of recently executed query history records.
![history](images/history.jpg)
## 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.
- 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.