This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/sql
2016-03-30 22:59:55 -04:00
..
img Use + instead of ! for layer categories 2015-09-11 00:13:51 -04:00
packages.el Use evil in holy-mode 2016-03-13 21:16:55 -04:00
README.org Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00

SQL layer

/TakeV/spacemacs/media/commit/052896e78212da0ffa9761b1223fb8fc3f0512ef/layers/+lang/sql/img/sql.png

Description

This layer adds key bindings and configuration for sql-mode, which manages interactive SQL buffers and highlights a wide range of SQL dialects.

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add sql to the existing dotspacemacs-configuration-layers list in this file.

Key bindings

Highlighting

Key Binding Description
SPC m h k select a SQL dialect to highlight

Inferior Process Interactions (SQLi)

Key Binding Description
SPC m b b show the SQLi buffer name
SPC m b s set the SQLi buffer
SPC m l a List all objects
SPC m l t list all objects in a table

Send SQL queries to SQLi:

Key Binding Description
SPC m s b Send the whole buffer to the SQLi buffer
SPC m s B Send the whole buffer to the SQLi buffer and switch to it in insert state
SPC m s i Start the SQLi process
SPC m s f Send the paragraph around point to the SQLi buffer
SPC m s F Send the paragraph around point to the SQLi buffer and switch to it in insert state
SPC m s q Prompt for a string to send to the SQLi buffer
SPC m s Q Prompt for a string to send to the SQLi buffer and switch to it in insert state
SPC m s r Send the selected region to the SQLi buffer
SPC m s R Send the selected region to the SQLi buffer and switch to it in insert state

SQLi buffer

Key Binding Description
SPC m b r rename buffer (follow up in the SQL buffer with SPC m b s)
SPC m b S save the current connection