Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.84 KB

README.org

File metadata and controls

61 lines (47 loc) · 2.84 KB

SQL layer

img/sql.png

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 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 BindingDescription
SPC m h kselect a SQL dialect to highlight

Inferior Process Interactions (SQLi)

Key BindingDescription
SPC m b bshow the SQLi buffer name
SPC m b sset the SQLi buffer
SPC m l aList all objects
SPC m l tlist all objects in a table

Send SQL queries to SQLi:

Key BindingDescription
SPC m s bSend the whole buffer to the SQLi buffer
SPC m s BSend the whole buffer to the SQLi buffer and switch to it in insert state
SPC m s iStart the SQLi process
SPC m s fSend the paragraph under the point to the SQLi buffer
SPC m s FSend the paragraph under the point to the SQLi buffer and switch to it in insert state
SPC m s qPrompt for a string to send to the SQLi buffer
SPC m s QPrompt for a string to send to the SQLi buffer and switch to it in insert state
SPC m s rSend the selected region to the SQLi buffer
SPC m s RSend the selected region to the SQLi buffer and switch to it in insert state

SQLi buffer

Key BindingDescription
SPC m b rrename buffer (follow up in the SQL buffer with SPC m b s)
SPC m b Ssave the current connection