Making a plist out of the recorded connection details. Need to ensure new connections get recorded as plists!

This commit is contained in:
Éibhear Ó hAnluain 2019-05-24 17:29:52 +01:00
parent 466b950a3b
commit 8b905487c5

View file

@ -583,12 +583,12 @@ INTERACTIVE"
(active-buffer (current-buffer))
)
;; The user to connect as
(setq conn-user (car conn-details))
(setq conn-user (plist-get conn-details :conn-user))
;; The database to connect to
(setq conn-connection (caddr conn-details))
(setq conn-connection (plist-get conn-details :conn-connection))
;; The password to use: if it's not in the saved connection
;; details...
(setq conn-pass (if (not (cadr conn-details))
(setq conn-pass (if (not (plist-get conn-details :conn-pass))
;; ... if it's one of the locally saved
;; passwords...
(if (assoc connection-description
@ -610,12 +610,18 @@ INTERACTIVE"
enode-passwords-in-use))
my-conn-pass))))
;; The SQL prompt for the SQL engine
(setq conn-prompt (cadddr conn-details))
(setq conn-prompt (plist-get conn-details :conn-prompt))
(setq conn-hostname (plist-get conn-details :conn-hostname))
(setq conn-port (plist-get conn-details :conn-port))
(cond ((eq 'oracle enode-current-connection-type)
;; Connect.
(enode-oracle-connect conn-user conn-pass conn-connection
conn-prompt)
)
((eq 'mysql enode-current-connection-type)
(enode-mysql-connect conn-user conn-pass conn-connection
conn-hostname conn-prompt conn-port)
)
)
;; Say who we're now connected to.
(setq enode-current-connection connection-description)