spacemacs/contrib/lang/sql
2015-04-24 01:05:06 -04:00
..
img sql layer: update to match conventions 2015-04-24 01:05:06 -04:00
extensions.el
packages.el sql layer: update to match conventions 2015-04-24 01:05:06 -04:00
README.md sql layer: update to match conventions 2015-04-24 01:05:06 -04:00

SQL contribution layer for Spacemacs

logo

Table of Contents

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 contribution layer add it to your ~/.spacemacs

(set-default dotspacemacs-configuration-layers '(sql))

Key bindings

Dialects and Clients

Database Client + Dialect Dialect (highlighting) only
ANSI SQL n/a SPC m h k a
DB2 SPC m c d SPC m h k d
Informix SPC m c i SPC m h k i
Ingrex SPC m c n SPC m h k n
Interbase SPC m c t SPC m h k t
Linter SPC m c l SPC m h k l
Microsoft SPC m c s SPC m h k s
MySQL SPC m c m SPC m h k m
Oracle SPC m c o SPC m h k o
Postgres SPC m c p SPC m h k p
Solid SPC m c S SPC m h k S
SQLite SPC m c q SPC m h k q
Sybase SPC m c b SPC m h k b
Vertica SPC m c v SPC m h k v

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 f Send the paragraph under the point to the SQLi buffer
SPC m s F Send the paragraph under the 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