SQL Interactive mode wrapper which plays nice with org mode code blocks.
Add the following line to your packages.el
then run doom sync
.
(package! sqleye :recipe (:host github :repo "nan0scho1ar/sqleye" :files ("*.el")))
Add some bindings in your config.el
(use-package! sqleye)
(set-eval-handler! 'sql-mode #'sqleye-send-region)
(map! :leader :desc "Open SQLeye Buffer" "o s" #'sqleye-toggle-buffer)
(map! :map sql-interactive-mode-map :v "gr" #'sqleye-buffer-send-region)
- Set up your initial connection with as usual with
sql
and save the connection. - Start up the connection by running
sqleye-toggle-buffer
. - Run your code from either a
.sql
file or an org mode code block with lang set tosql
.