Commit 30c4d8dc authored by Michael Mauger's avatar Michael Mauger
Browse files

SQL Mode V2.2 - Added sql-connect and sql-connection-alist

parent 8d16a259
......@@ -42,7 +42,7 @@ lib-src/Makefile by hand in order to use the associated features.
This is only useful if your crt*.o files are in a non-standard location.
---
** Emacs can be compiled against Gtk+ 3.0 if you pass --with-x-toolkit=gtk3
** Emacs can be compiled against Gtk+ 3.0 if you pass --with-x-toolkit=gtk3
to configure. Note that other libraries used by Emacs, RSVG and GConf,
also depend on Gtk+. You can disable them with --without-rsvg and
--without-gconf.
......@@ -256,9 +256,9 @@ For example, adding "(diff-mode . ((mode . whitespace)))" to your
** SQL Mode enhancements.
*** Several variables have been marked as safe local variables.
The variables `sql-product', `sql-user', `sql-server', and
`sql-database' can now be safely used as local variables.
*** Several variables have been marked as safe local variables. The
variables `sql-product', `sql-user', `sql-server', `sql-database' and
`sql-port' can now be safely used as local variables.
*** Added ability to login with a port on MySQL.
The custom variable `sql-port' can be specified for connection to
......@@ -269,15 +269,42 @@ Each supported product has a custom variable `sql-*-login-params'
which is a list of the parameters to be prompted for before a
connection is established.
*** Added `sql-connection-alist' to record login parameter values.
An alist for recording different username, database and server
values. If there are multiple databases that you connect to the
parameters needed can be stored in this alist.
For example, the following might be set in the user's init.el:
(setq sql-connection-alist
'((dev (sql-product 'sqlite)
(sql-database "/home/mmaug/dev.db"))
(prd (sql-product 'oracle)
(sql-user "mmaug")
(sql-database "iprd2a"))))
This defines two connections named "dev" and "prd".
*** Added `sql-connect' to use predefined connections.
Sets the login parameters based on the values in the
`sql-connection-alist' and start a SQL interactive session. Any
values specified in the connection will not be prompted for.
In the example above, if the user were to invoke M-x sql-connect, they
would be prompted for the connection. The user can respond with
either "dev" or "prd". The "dev" connection would connect to the
SQLite database without prompting; the "prd" connection would prompt
for the users password and then connect to the Oracle database.
*** Added option `sql-send-terminator'.
When set makes sure that each command sent with `sql-send-*' commands
are properly terminated and submitted to the SQL processor.
*** Added option `sql-oracle-scan-on'.
When set commands sent to Oracle's SQL*Plus are scanned for strings
starting with an ampersand and the user is asked for replacement
text. In general, the SQL*Plus option SCAN should be set OFF under
SQL interactive mode.
starting with an ampersand and the user is asked for replacement text.
In general, the SQL*Plus option SCAN should always be set OFF under
SQL interactive mode and this option used in its place.
*** SQL interactive mode will replace tabs with spaces.
This prevents the comand interpretter for MySQL and Postgres from
......
2010-07-18 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el: Version 2.2.
(sql-product, sql-user, sql-database, sql-server, sql-port): Use
defcustom :safe keyword rather than putting safe-local-variable
property.
(sql-password): Use defcustom :risky keyword rather than putting
risky-local-variable property.
(sql-oracle-login-params, sql-sqlite-login-params)
(sql-solid-login-params, sql-sybase-login-params)
(sql-informix-login-params, sql-ingres-login-params)
(sql-ms-login-params, sql-postgres-login-params)
(sql-interbase-login-params, sql-db2-login-params)
(sql-linter-login-params): Add `port' option
(sql-get-product-feature): Added NO-INDIRECT parameter.
(sql-comint-oracle, sql-comint-sybase)
(sql-comint-informix, sql-comint-sqlite, sql-comint-mysql)
(sql-comint-solid, sql-comint-ingres, sql-comint-ms)
(sql-comint-postgres, sql-comint-interbase, sql-comint-db2)
(sql-comint-linter): Renamed sql-connect-* functions to
sql-comint-*.
(sql-product-alist, sql-mode-menu): Renamed as above and
:sqli-connect-func to :sqli-comint-func.
(sql-connection): New variable
(sql-interactive-mode): Set it.
(sql-connection-alist): New variable.
(sql-connect): New function.
(sql--alt-buffer-part, sql--alt-if-not-empty)
(sql-make-alternate-buffer-name): Improved alternative buffer
name.
2010-07-17 Thierry Volpiatto <thierry.volpiatto@gmail.com>
 
* image-mode.el (image-bookmark-make-record): Do not set context
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment