Starter for mysql/mariadb support

This commit is contained in:
Éibhear Ó hAnluain 2019-05-23 15:30:09 +01:00
parent a125d9574f
commit ed13dbbdd4
2 changed files with 30 additions and 0 deletions

28
enode-lisp/enode-mysql.el Normal file
View file

@ -0,0 +1,28 @@
;; Copyright 2019 Éibhear Ó hAnluain
;; This file is part of ENODE.
;;
;; ENODE is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; ENODE is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with ENODE. If not, see <http://www.gnu.org/licenses/>.
(defun enode-mysql-start-sql-engine ()
"A function to set up the SQL engine for connecting to a mysql or MariaDB database."
(call-interactively 'sql-mysql)
;; Set the prompt regexps properly
(save-excursion
(set-buffer "*SQL*")
(setq comint-prompt-regexp "^[0-9A-Za-z]\\{3\\}> ")
(setq sql-prompt-regexp "^[0-9A-Za-z]\\{3\\}> ")
)
)

View file

@ -562,6 +562,8 @@ INTERACTIVE"
"A function to start the SQL engine for the connection type" "A function to start the SQL engine for the connection type"
(cond ((eq 'oracle enode-current-connection-type) (cond ((eq 'oracle enode-current-connection-type)
(enode-oracle-start-sql-engine)) (enode-oracle-start-sql-engine))
((eq 'mysql enode-current-connection-type)
t)
) )
) )