dadbod.vim : Modern database interface for Vim
| script karma
Downloaded by 81
Comments, bugs, improvements
script versions (upload new version)
|Dadbod is a Vim plugin for interacting with databases. It's a more modern take on dbext.vim (vimscript #356), improving on it on the following ways:
* Connections are specified with a single URL, rather than prompting you for 14 separate variables
* All interaction is through invoking :DB, not 53 different commands and 35 different maps (omitting many of the more esoteric features, of course)
* Supports a modern array of backends, including NoSQL databases:
- Your own easily implemented adapter
* Easily configurable based on a project directory (as seen in rails.vim (vimscript #1567), for example), rather than just globally or in a per-file modeline
The :DB command has a few different usages. All forms accept a URL as the first parameter, which can be omitted if a default is configured or provided by a plugin.
Omit further arguments to spawn an interactive console (like `psql` or `redis-cli`).
If additional arguments are provided, they are interpreted as a query string to pass to the database. Results are displayed in a preview window.
:DB sqlite:myfile.sqlite3 select count(*) from widgets
:DB redis:/// CLIENT LIST
Give a range to run part or all of the current buffer as a query.
Use `<` to pass in a filename.
:DB mongo:///test < big_query.js
There's also a special assignment syntax for saving a URL to a Vim variable for later use.
:DB g:prod = postgres://user:firstname.lastname@example.org/production_database
:DB g:prod drop table users
A few additonal URL like formats are accepted for interop:
* `:DB jdbc:postgresql://...`
* `:DB dbext:profile_name`
* `:DB dbext:type=PGSQL:host=...`
* `:DB $DATABASE_URL` (with optional dotenv.vim (vimscript #5176) support)
Plugins can provide their own URL handlers as well. For example, heroku.vim (vimscript #4915) provides support for `heroku:appname` style URLs.
|Extract in ~/.vim (~\vimfiles on Windows). Or use https://tpope.io/vim/dadbod.git with your favorite package manager.|
Click on the package to download.
ip used for rating:
||Support SQL Server.
Provide automatic management of dbext configuration.
Fix tab completion issues.
Minor bug fixes.
||Rename to Dadbod.
Fix issue with screen failing to redraw.
Fix various issues with shell execution.
Rearrange psql arguments to avoid warning.
Support SSL for MongoDB.
Support custom port in dbext wrapper.