This layer provides support for ejc-sql which turns Emacs into simple SQL client
- Uses JDBC connection to databases via clojure/java.jdbc lib
- Use multiple connections at the same time
- Autocompletion and basic SQL scripts formatting are also available.
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add my-ejc-sql
to the existing dotspacemacs-configuration-layers
list in this
file.
Connections are defined in ~/.my-ejc-sql-connections.el
. Can be overridden by setting
(setq *my-ejc-sql-connections-file* "~/connections.el")
Key Binding | Description |
---|---|
SPC m x x | Evaluate SQL/JPQL script bounded by the `ejc-sql-separator` or/and buffer boundaries |
SPC m x r | Evaluate SQL/JPQL statements in selected region |
SPC m t d | Describe SQL table |
SPC m r | Show last result |
SPC m l t | Show tables list |
SPC m a s | Strip SQL (trim java string tokens) |
SPC m a j | Dress SQL (to copy-paste it to java code) |
SPC m c | Connect to database for current buffer |
SPC m q | Close all database connections, quit Clojure REPL |
SPC m a f | Format SQL |
SPC m m | Mark SQL script bounded by the `ejc-sql-separator` or/and buffer boundaries |
SPC m l c | Show constraints list |
SPC m l p | Show procedures list |
SPC m L | Open log |
SPC m b | Create buffer with `ejc-sql-mode` |
SPC m C | Clean your current connection cache (database owners and tables list) |