aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-02-07 23:54:09 -0800
committerGlenn Morris2012-02-07 23:54:09 -0800
commit34e8a2da58131aa0e30f2b7427829b41d2997f10 (patch)
tree3364592f7d78c633bd558444ffce2ae0d9f6133b
parent14a1f3806c3d189d0dd10db863320fa36d428fd1 (diff)
downloademacs-34e8a2da58131aa0e30f2b7427829b41d2997f10.tar.gz
emacs-34e8a2da58131aa0e30f2b7427829b41d2997f10.zip
Shorten SQL mode NEWS entry, moving more details to doc strings
* lisp/progmodes/sql.el (sql-port, sql-connection-alist, sql-list-all) (sql-list-table): Doc fixes. * etc/NEWS: Related edits.
-rw-r--r--etc/NEWS57
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/sql.el34
3 files changed, 40 insertions, 54 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 5cdf92d91fb..07b9db9989f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -781,63 +781,50 @@ directory is a remote file name and neither the environment variable
781$ESHELL nor the variable `explicit-shell-file-name' is set. 781$ESHELL nor the variable `explicit-shell-file-name' is set.
782 782
783--- 783---
784** SQL Mode enhancements. 784** SQL mode
785 785
786*** `sql-dialect' is an alias for `sql-product'. 786---
787*** New options `sql-port', `sql-connection-alist', `sql-send-terminator',
788and `sql-oracle-scan-on'.
787 789
788*** New variable `sql-port' specifies the port number for connecting 790---
789to a MySQL or Postgres server. 791*** New custom variables control prompting for login parameters.
792Each supported product has a custom variable `sql-*-login-params',
793which is a list of the parameters to be prompted for before a
794connection is established.
790 795
796---
791*** The command `sql-product-interactive' now takes a prefix argument, 797*** The command `sql-product-interactive' now takes a prefix argument,
792which causes it to prompt for an SQL product instead of the current 798which causes it to prompt for an SQL product.
793value of `sql-product'.
794 799
795*** Product-specific SQL interactive commands now take prefix args. 800---
801*** Product-specific SQL interactive commands now take prefix arguments.
796These commands (`sql-sqlite', `sql-postgres', `sql-mysql', etc.), 802These commands (`sql-sqlite', `sql-postgres', `sql-mysql', etc.),
797given a prefix argument, prompt for a name for the SQL interactive 803given a prefix argument, prompt for a name for the SQL interactive
798buffer. This reduces the need for calling `sql-rename-buffer'. 804buffer. This reduces the need for calling `sql-rename-buffer'.
799 805
806---
800*** SQL interactive modes suppress command continuation prompts, and 807*** SQL interactive modes suppress command continuation prompts, and
801replace tabs with spaces. The first change impacts multiple line SQL 808replace tabs with spaces. The first change impacts multiple line SQL
802statements entered with C-j between each line, statements yanked into 809statements entered with C-j between each line, statements yanked into
803the buffer and statements sent with `sql-send-*' functions. The 810the buffer and statements sent with `sql-send-*' functions. The
804second change prevents the MySQL and Postgres interpreters from 811second prevents the MySQL and Postgres interpreters from listing
805listing object name completions when sent text via `sql-send-*' 812object name completions when sent text via `sql-send-*' functions.
806functions.
807
808*** New custom variables control prompting for login parameters.
809Each supported product has a custom variable `sql-*-login-params',
810which is a list of the parameters to be prompted for before a
811connection is established.
812
813*** New variable `sql-connection-alist' for login parameter values.
814This can be used to store different username, database and server
815values. Connections defined in this variable appear in the submenu
816SQL->Start... for making new SQLi sessions.
817 813
814---
818*** New command `sql-connect' starts a predefined SQLi session, 815*** New command `sql-connect' starts a predefined SQLi session,
819using the login parameters from `sql-connection-alist'. 816using the login parameters from `sql-connection-alist'.
820 817
818---
821*** New "Save Connection" menu item in SQLi buffers. 819*** New "Save Connection" menu item in SQLi buffers.
822This gathers the login params specified for the SQLi session, if it 820This gathers the login params specified for the SQLi session, if it
823was not started by a connection, and saves them as a new connection. 821was not started by a connection, and saves them as a new connection.
824 822
825*** Commands for listing database objects and details. 823---
826In an SQLi session, you can get a list of objects in the database. 824*** New commands for listing database objects and details:
827The contents of these lists are product specific. 825sql-list-all and sql-list-table.
828
829**** `C-c C-l a' or the "SQL->List all objects" menu item
830lists all the objects in the database. With a prefix argument, it
831displays additional details or extend the listing to include other
832schemas objects.
833
834**** `C-c C-l t' or the "SQL->List Table details" menu item
835prompts for the name of a database table or view and displays the list
836of columns in the relation. With a prefix argument, it displays
837additional details about each column.
838
839*** New options `sql-send-terminator' and `sql-oracle-scan-on'.
840 826
827---
841*** An API for manipulating SQL product definitions has been added. 828*** An API for manipulating SQL product definitions has been added.
842 829
843** TeX modes 830** TeX modes
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e8ed552ba07..9cda0d38acb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-02-08 Glenn Morris <rgm@gnu.org> 12012-02-08 Glenn Morris <rgm@gnu.org>
2 2
3 * progmodes/sql.el (sql-port, sql-connection-alist, sql-list-all)
4 (sql-list-table): Doc fixes.
5
3 * image-mode.el (image-transform-minor-mode-map, image-transform-mode): 6 * image-mode.el (image-transform-minor-mode-map, image-transform-mode):
4 Comment out (does nothing). 7 Comment out (does nothing).
5 8
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 2e59d8f8517..f8f62d113e6 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -285,7 +285,7 @@ Customizing your password will store it in your ~/.emacs file."
285 :safe 'stringp) 285 :safe 'stringp)
286 286
287(defcustom sql-port 0 287(defcustom sql-port 0
288 "Default port." 288 "Default port for connecting to a MySQL or Postgres server."
289 :version "24.1" 289 :version "24.1"
290 :type 'number 290 :type 'number
291 :group 'SQL 291 :group 'SQL
@@ -613,30 +613,22 @@ settings.")
613 '(:font-lock :sqli-program :sqli-options :sqli-login :statement)) 613 '(:font-lock :sqli-program :sqli-options :sqli-login :statement))
614 614
615(defcustom sql-connection-alist nil 615(defcustom sql-connection-alist nil
616 "An alist of connection parameters for interacting with a SQL 616 "An alist of connection parameters for interacting with a SQL product.
617 product.
618
619Each element of the alist is as follows: 617Each element of the alist is as follows:
620 618
621 \(CONNECTION \(SQL-VARIABLE VALUE) ...) 619 \(CONNECTION \(SQL-VARIABLE VALUE) ...)
622 620
623Where CONNECTION is a symbol identifying the connection, SQL-VARIABLE 621Where CONNECTION is a symbol identifying the connection, SQL-VARIABLE
624is the symbol name of a SQL mode variable, and VALUE is the value to 622is the symbol name of a SQL mode variable, and VALUE is the value to
625be assigned to the variable. 623be assigned to the variable. The most common SQL-VARIABLE settings
626 624associated with a connection are: `sql-product', `sql-user',
627The most common SQL-VARIABLE settings associated with a connection 625`sql-password', `sql-port', `sql-server', and `sql-database'.
628are:
629
630 `sql-product'
631 `sql-user'
632 `sql-password'
633 `sql-port'
634 `sql-server'
635 `sql-database'
636 626
637If a SQL-VARIABLE is part of the connection, it will not be 627If a SQL-VARIABLE is part of the connection, it will not be
638prompted for during login." 628prompted for during login. The command `sql-connect' starts a
639 629predefined SQLi session using the parameters from this list.
630Connections defined here appear in the submenu SQL->Start... for
631making new SQLi sessions."
640 :type `(alist :key-type (string :tag "Connection") 632 :type `(alist :key-type (string :tag "Connection")
641 :value-type 633 :value-type
642 (set 634 (set
@@ -3647,7 +3639,9 @@ The list is maintained in SQL interactive buffers.")
3647 (read-from-minibuffer prompt tname)))) 3639 (read-from-minibuffer prompt tname))))
3648 3640
3649(defun sql-list-all (&optional enhanced) 3641(defun sql-list-all (&optional enhanced)
3650 "List all database objects." 3642 "List all database objects.
3643With optional prefix argument ENHANCED, displays additional
3644details or extends the listing to include other schemas objects."
3651 (interactive "P") 3645 (interactive "P")
3652 (let ((sqlbuf (sql-find-sqli-buffer))) 3646 (let ((sqlbuf (sql-find-sqli-buffer)))
3653 (unless sqlbuf 3647 (unless sqlbuf
@@ -3659,7 +3653,9 @@ The list is maintained in SQL interactive buffers.")
3659 (set (make-local-variable 'sql-buffer) sqlbuf)))) 3653 (set (make-local-variable 'sql-buffer) sqlbuf))))
3660 3654
3661(defun sql-list-table (name &optional enhanced) 3655(defun sql-list-table (name &optional enhanced)
3662 "List the details of a database table. " 3656 "List the details of a database table named NAME.
3657Displays the columns in the relation. With optional prefix argument
3658ENHANCED, displays additional details about each column."
3663 (interactive 3659 (interactive
3664 (list (sql-read-table-name "Table name: ") 3660 (list (sql-read-table-name "Table name: ")
3665 current-prefix-arg)) 3661 current-prefix-arg))