Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulfitz/visql
edit slices of SQL databases in vi
https://github.com/paulfitz/visql
sql vi
Last synced: 18 days ago
JSON representation
edit slices of SQL databases in vi
- Host: GitHub
- URL: https://github.com/paulfitz/visql
- Owner: paulfitz
- Created: 2017-10-13T21:12:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-14T20:59:32.000Z (about 7 years ago)
- Last Synced: 2024-10-11T07:43:18.801Z (about 1 month ago)
- Topics: sql, vi
- Language: Python
- Size: 2.93 KB
- Stars: 48
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
visql
===Edit slices of SQL tables in vi. Just specify a table and any filters
you want to apply, and the table will show up in vi in csv format.
Any edits you make will be applied back to the original source.![demo](https://user-images.githubusercontent.com/118367/31579274-e3cc78b4-b100-11e7-88a2-63be8a358dbb.gif)
## Install
To edit local Sqlite databases, just do:
```
pip install visql
```For PostgreSQL or MySQL support, add `catsql[postgres]` or `catsql[mysql]`:
```
pip install visql catsql[mysql]
pip install visql catsql[postgres]
```For other databases, just install the appropriate [SQLAlchemy dialect](http://docs.sqlalchemy.org/en/latest/dialects/index.html).
## Use
```
visql test.sqlite3
visql test.sqlite3 --table users
visql postgres[ql]://user:pass@host/db --table users
visql mysql://user:pass@host/db --table users
visql test.sqlite3 --table users --grep paul
visql test.sqlite3 --table comments --sql "length(txt) < 40"
```For all filters, see https://github.com/paulfitz/catsql#examples