Mercurial > emacs
comparison etc/NEWS @ 110424:03a492f2d1ce
SQL Mode, Version 2.8 - sql-list-all and sql-list-table functions.
* progmodes/sql.el: Version 2.8
(sql-login-params): Updated widget structure; changes still
needed.
(sql-product-alist): Add :list-all and :list-table features for
SQLite, Postgres and MySQL products.
(sql-redirect): Handle default value.
(sql-execute, sql-execute-feature): New functions.
(sql-read-table-name): New function.
(sql-list-all, sql-list-table): New functions. User API
(sql-mode-map, sql-interactive-mode-map): Add key definitions
for above functions.
(sql-mode-menu, sql-interactive-mode-menu): Add menu definitions
for above functions.
(sql-postgres-login-params): Add user and database defaults.
(sql-buffer-live-p): Bug fix.
(sql-product-history); New variable.
(sql-read-product): New function. Use it.
(sql-set-product, sql-product-interactive): Use it.
(sql-connection-history): New variable.
(sql-read-connection): New function. Use it.
(sql-connect): New function.
(sql-for-each-login): Redesign function interface.
(sql-make-alternate-buffer-name, sql-save-connection): Use it.
(sql-get-login-ext, sql-get-login): Use it. Handle default values.
(sql-comint): Check for program. Existing live buffer.
(sql-comint-postgres): Add port parameter.
author | Michael Mauger <mmaug@yahoo.com> |
---|---|
date | Sat, 18 Sep 2010 22:11:18 -0400 |
parents | 0abd5adc0fae |
children | 52590453d4f9 |
comparison
equal
deleted
inserted
replaced
110423:6c2baabc9d98 | 110424:03a492f2d1ce |
---|---|
318 variables `sql-product', `sql-user', `sql-server', `sql-database' and | 318 variables `sql-product', `sql-user', `sql-server', `sql-database' and |
319 `sql-port' can now be safely used as local variables. | 319 `sql-port' can now be safely used as local variables. |
320 | 320 |
321 *** `sql-dialect' is a synonym for `sql-product'. | 321 *** `sql-dialect' is a synonym for `sql-product'. |
322 | 322 |
323 *** Added ability to login with a port on MySQL. | 323 *** Added ability to login with a port on MySQL and Postgres. |
324 The custom variable `sql-port' can be specified for connection to | 324 The custom variable `sql-port' can be specified for connection to |
325 MySQL servers. | 325 MySQL or Postgres servers. By default, the port is not listed in |
326 either login parameter, but will be added to the command line if set | |
327 to a non-zero value. | |
326 | 328 |
327 *** Dynamic selection of product in an SQL interactive session. | 329 *** Dynamic selection of product in an SQL interactive session. |
328 If you use `sql-product-interactive' to start an SQL interactive | 330 If you use `sql-product-interactive' to start an SQL interactive |
329 session it uses the current value of `sql-product'. Preceding the | 331 session it uses the current value of `sql-product'. Preceding the |
330 invocation with C-u will force it to ask for the product before | 332 invocation with C-u will force it to ask for the product before |
347 *** Custom variables control prompting for login parameters. | 349 *** Custom variables control prompting for login parameters. |
348 Each supported product has a custom variable `sql-*-login-params' | 350 Each supported product has a custom variable `sql-*-login-params' |
349 which is a list of the parameters to be prompted for before a | 351 which is a list of the parameters to be prompted for before a |
350 connection is established. | 352 connection is established. |
351 | 353 |
352 By default, the value of the parameter is simply prompted for. For | 354 The lists consist of the following five tokens: `user', `password', |
353 `server' and `database', they can be specified in a list as shown | 355 `database', `server', and `port'. The order in which they appear is |
354 below: | 356 the order in which they are prompted. The tokens symbols can be |
355 | 357 replaced by a sublist starting with the token and followed by a plist |
356 (server :file ARG) | 358 which control the prompting for values. The tokens `user', |
357 (database :file ARG) | 359 `database', and `server' each can take a property of :default which |
358 (server :completion ARG) | 360 specifies the value to be used if no value is entered. The |
359 (database :completion ARG) | 361 `database', `server', and `port' tokens handle the :completion |
360 | 362 property which restricts the entry to either one of the values in the |
361 The ARG when :file is specified is a regexp that will match valid file | 363 list or to one of the values returned by the function provided as the |
362 names (without the directory portion). Generally these strings will | 364 property value. The `database' and `server' tokens also accept the |
363 be of the form ".+\.SUF" where SUF is the desired file suffix. | 365 :file property whose value is a regexp to identify useful file names. |
364 | 366 |
365 When :completion is specified, the ARG corresponds to the PREDICATE | 367 (user :default DEF) |
366 argument to the `completing-read' function (a list of possible values | 368 (database :default DEF |
367 or a function returning such a list). | 369 :file FILEPAT |
370 :completion COMPLETE) | |
371 (server :default DEF | |
372 :file FILEPAT | |
373 :completion COMPLETE) | |
374 | |
375 The FILEPAT when :file is specified is a regexp that will match valid | |
376 file names (without the directory portion). Generally these strings | |
377 will be of the form ".+\.SUF" where SUF is the desired file suffix. | |
378 | |
379 When :completion is specified, the COMPLETE corresponds to the | |
380 PREDICATE argument to the `completing-read' function (a list of | |
381 possible values or a function returning such a list). | |
368 | 382 |
369 *** Added `sql-connection-alist' to record login parameter values. | 383 *** Added `sql-connection-alist' to record login parameter values. |
370 An alist for recording different username, database and server | 384 An alist for recording different username, database and server |
371 values. If there are multiple databases that you connect to the | 385 values. If there are multiple databases that you connect to the |
372 parameters needed can be stored in this alist. | 386 parameters needed can be stored in this alist. |
401 | 415 |
402 **** Added "Save Connection" menu item in SQLi buffers. | 416 **** Added "Save Connection" menu item in SQLi buffers. |
403 When a SQLi session is not started by a connection then | 417 When a SQLi session is not started by a connection then |
404 `sql-save-connection' will gather the login params specified for the | 418 `sql-save-connection' will gather the login params specified for the |
405 session and save them as a new connection. | 419 session and save them as a new connection. |
420 | |
421 *** List database objects and details. | |
422 Once a SQL interactive session has been started, you can get a list of | |
423 the objects in the database and see details of those objects. The | |
424 objects shown and the details available are product specific. | |
425 | |
426 **** List all objects. | |
427 Using `M-x sql-list-all', `C-c C-l a' or selecting "SQL->List all | |
428 objects" will list all the objects in the database. At a minimum it | |
429 lists the tables and views in the database. Preceeding the command by | |
430 universal argument may provide additional details or extend the | |
431 listing to include other schemas objects. The list will appear in a | |
432 separate window in view-mode. | |
433 | |
434 **** List Table details. | |
435 Using `M-x sql-list-table', `C-c C-l t' or selecting "SQL->List Table | |
436 details" will ask for the name of a database table or view and display | |
437 the list of columns in the relation. Preceeding the comand with the | |
438 universal argument may provide additional details about each column. | |
439 The list will appear in a separate window in view-mode. | |
406 | 440 |
407 *** Added option `sql-send-terminator'. | 441 *** Added option `sql-send-terminator'. |
408 When set makes sure that each command sent with `sql-send-*' commands | 442 When set makes sure that each command sent with `sql-send-*' commands |
409 are properly terminated and submitted to the SQL processor. | 443 are properly terminated and submitted to the SQL processor. |
410 | 444 |