Making a plist out of the recorded connection details. Need to ensure new connections get recorded as plists!
This commit is contained in:
parent
466b950a3b
commit
8b905487c5
1 changed files with 10 additions and 4 deletions
|
@ -583,12 +583,12 @@ INTERACTIVE"
|
||||||
(active-buffer (current-buffer))
|
(active-buffer (current-buffer))
|
||||||
)
|
)
|
||||||
;; The user to connect as
|
;; 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
|
;; 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
|
;; The password to use: if it's not in the saved connection
|
||||||
;; details...
|
;; 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
|
;; ... if it's one of the locally saved
|
||||||
;; passwords...
|
;; passwords...
|
||||||
(if (assoc connection-description
|
(if (assoc connection-description
|
||||||
|
@ -610,12 +610,18 @@ INTERACTIVE"
|
||||||
enode-passwords-in-use))
|
enode-passwords-in-use))
|
||||||
my-conn-pass))))
|
my-conn-pass))))
|
||||||
;; The SQL prompt for the SQL engine
|
;; 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)
|
(cond ((eq 'oracle enode-current-connection-type)
|
||||||
;; Connect.
|
;; Connect.
|
||||||
(enode-oracle-connect conn-user conn-pass conn-connection
|
(enode-oracle-connect conn-user conn-pass conn-connection
|
||||||
conn-prompt)
|
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.
|
;; Say who we're now connected to.
|
||||||
(setq enode-current-connection connection-description)
|
(setq enode-current-connection connection-description)
|
||||||
|
|
Loading…
Reference in a new issue