Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defun sql-connect* (connection &optional new-name)
(interactive
(list (sql-read-connection "Connection: " nil '(nil))
current-prefix-arg)
nil)
(require 'tramp)
(let ((dir (cadr (assoc 'default-directory
(cdr (assoc connection sql-connection-alist))))))
(if dir
(let ((default-directory dir))
(sql-connect connection new-name))
(sql-connect connection new-name))))
(setq sql-preset-alist
'((whatever
(default-directory "~/")
(sql-product 'postgres)
(sql-user "user")
(sql-database "db")
(sql-server "host"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.