diff --git a/enode-lisp/enode-mysql.el b/enode-lisp/enode-mysql.el new file mode 100644 index 0000000..efdb673 --- /dev/null +++ b/enode-lisp/enode-mysql.el @@ -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 . + +(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\\}> ") + ) + ) diff --git a/enode-lisp/enode.el b/enode-lisp/enode.el index 79886da..f99c809 100755 --- a/enode-lisp/enode.el +++ b/enode-lisp/enode.el @@ -562,6 +562,8 @@ INTERACTIVE" "A function to start the SQL engine for the connection type" (cond ((eq 'oracle enode-current-connection-type) (enode-oracle-start-sql-engine)) + ((eq 'mysql enode-current-connection-type) + t) ) )