A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tpope/vim-dadbod below:

tpope/vim-dadbod: dadbod.vim: Modern database interface for Vim

Dadbod is a Vim plugin for interacting with databases. It's a more modern take on dbext.vim, improving on it on the following ways:

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).

:DB postgresql:///foobar
:DB redis:

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.

:%DB mysql://root@localhost/bazquux

Use < to pass in a filename.

:DB mongodb:///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:pass@db.example.com/production_database
:DB g:prod drop table users

A few additional URL like formats are accepted for interop:

Plugins can provide their own URL handlers as well. For example, heroku.vim provides support for heroku:appname style URLs.

If you want to manage multiple connections at once through UI, try dadbod-ui.

Install using your favorite package manager, or use Vim's built-in package support:

mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://tpope.io/vim/dadbod.git
vim -u NONE -c "helptags dadbod/doc" -c q

Like dadbod.vim? Star the repository on GitHub and vote for it on vim.org.

Love dadbod.vim? Follow tpope on GitHub and Twitter.

Copyright © Tim Pope. Distributed under the same terms as Vim itself. See :help license.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4