色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

ess mysql

ESS MySQL 是一種在 Emacs 編輯器中運(yùn)行 MySql 數(shù)據(jù)庫的插件。它提供了一個交互式的 MySQL shell 窗口,讓用戶可以在 Emacs 中直接編寫 SQL 語句并執(zhí)行。ESS MySQL 的優(yōu)點(diǎn)在于它具有 Emacs 編輯器的便捷性,比如語法高亮、自動提示等等,同時又可以直接操作 MySQL 數(shù)據(jù)庫,大大提高了數(shù)據(jù)庫操作的效率。

(defun ess-mysql ()
"Start MySQL mode. Prompts for inputs HOST, USER, PASS, and DB."
(interactive)
(let ((mysql-buffer (get-buffer-create "*mysql*"))
(mysql-host (read-string "Enter MySQL Host: "))
(mysql-user (read-string "Enter MySQL User: "))
(mysql-pass (read-passwd "Enter MySQL Password: "))
(mysql-db (read-string "Enter MySQL database: ")))
(switch-to-buffer mysql-buffer)
(mysql-mode)
(ess-execute "mysql" mysql-buffer nil
(concat "mysql " "-h" mysql-host " -u"
mysql-user (if mysql-pass (concat " -p" mysql-pass) "") " "
mysql-db))))
(defun mysql-get-result (beg end)
"Grabs the query from the MySQL prompt and puts it in a results buffer."
(interactive "r")
(ess-execute "mysql" "*mysql-results*" nil
(concat "mysql " "-e \"" (buffer-substring-no-properties beg end) "\""))
(switch-to-buffer "*mysql-results*")
(sql-mode)
(rename-buffer (concat "*mysql-results* " (buffer-name (current-buffer))) t))

上面是 ESS MySQL 的一些基本函數(shù),包括啟動 MySQL 模式、獲取 MySQL 查詢結(jié)果等,其中涉及到了 Emacs Lisp 和 MySQL 的命令行工具。使用 ESS MySQL 可以輕松地在 Emacs 中管理 MySQL 數(shù)據(jù)庫,提高開發(fā)效率,降低出錯幾率。

下一篇escilpe mysql