|
1 |
| -*dbext.txt* For Vim version 6.0. Last change: Wed Jun 14 2006 8:35:37 AM |
| 1 | +*dbext.txt* For Vim version 6.0. Last change: Sun Sep 17 2006 11:22:54 AM |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL
|
|
7 | 7 | David Fishburn < [email protected]>
|
8 | 8 |
|
9 | 9 | Database extension plugin (dbext.vim) manual
|
10 |
| - dbext.vim version 3.50 |
| 10 | + dbext.vim version 4.03 |
11 | 11 |
|
12 | 12 | For instructions on installing this file, type
|
13 | 13 | :help add-local-help
|
@@ -53,6 +53,30 @@ SourceForge: $Revision: 1.23 $
|
53 | 53 | ------------------------------------------------------------------------------
|
54 | 54 | What's New *dbext-new*
|
55 | 55 |
|
| 56 | +Version 4.00 |
| 57 | + |
| 58 | + New Features |
| 59 | + ------------ |
| 60 | + - dbext.vim now requires Vim7. |
| 61 | + - dbext.vim required 2 additional plugins multvals and genutil to operate. |
| 62 | + These dependencies have been removed by taking advantage of the new Vim7 |
| 63 | + features (Lists and Dictionaries). |
| 64 | + - When using the DBCompleteTable, DBCompleteProcedure, DBCompleteView |
| 65 | + commands errors are displayed instead of silently ignored. This makes |
| 66 | + them more useful with the sqlComplete plugin (see |sql.txt|). |
| 67 | + - Added new option, dbext_default_MYSQL_version, for MySQL to indicate the |
| 68 | + version you using. |
| 69 | + - You can optionally define a function, DBextPostResult, in your .vimrc, this |
| 70 | + function will be called each time the result window is updated. This |
| 71 | + function can be used to do anything, for example, syntax highlighting the |
| 72 | + result set in the result window. |
| 73 | + |
| 74 | + Bug Fixes |
| 75 | + ------------ |
| 76 | + - Added version support with MySQL to control what SQL is sent for version |
| 77 | + 4 and 5 servers. |
| 78 | + |
| 79 | + |
56 | 80 | Version 3.50
|
57 | 81 |
|
58 | 82 | New Features
|
@@ -330,6 +354,33 @@ Version 2.00
|
330 | 354 | populated the result window. Pressing 'R' calls the DBRefreshResult
|
331 | 355 | command.
|
332 | 356 |
|
| 357 | + If you define a function, DBextPostResult, in your .vimrc (or elsewhere) |
| 358 | + it will be called automatically each time the Result buffer is updated. |
| 359 | + This can be used to do anything you need, the initial request for the |
| 360 | + feature was for the ability to use Vim's syntax highlighting to make |
| 361 | + the results displayed from a MYSQL query more readable. |
| 362 | + |
| 363 | + The function takes two parameters: > |
| 364 | + db_type |
| 365 | +< - The database type specified for the buffer which caused the |
| 366 | + Result buffer to be updated. It will be one of the following: |
| 367 | + ASA,ASE,DB2,INGRES,INTERBASE,MYSQL,ORA,PGSQL,SQLSRV,SQLITE > |
| 368 | + buf_nr |
| 369 | +< - The buffer number of the result window |
| 370 | + Here is a very simple example which will: |
| 371 | + - Do nothing if connected to a database other than MYSQL |
| 372 | + - Highlight any numeric values at the beginning of a line > |
| 373 | + function! DBextPostResult(db_type, buf_nr) |
| 374 | + " If dealing with a MYSQL database |
| 375 | + if a:db_type == 'MYSQL' |
| 376 | + " Assuming the first column is an integer |
| 377 | + " highlight it using the WarningMsg color |
| 378 | + syn match logWarn '^\d\+' |
| 379 | + hi def link logWarn WarningMsg |
| 380 | + endif |
| 381 | + endfunction |
| 382 | +< |
| 383 | + |
333 | 384 | 3.2 Script Variables *dbext-configure-variables*
|
334 | 385 |
|
335 | 386 | Global variables: >
|
@@ -573,6 +624,7 @@ Version 2.00
|
573 | 624 | dbext_default_MYSQL_cmd_header = ''
|
574 | 625 | dbext_default_MYSQL_cmd_terminator = ''
|
575 | 626 | dbext_default_MYSQL_cmd_options = ''
|
| 627 | + dbext_default_MYSQL_version = '5' |
576 | 628 | dbext_default_ASA_bin = 'dbisql'
|
577 | 629 | dbext_default_ASA_cmd_header = ''
|
578 | 630 | dbext_default_ASA_cmd_terminator = ';'
|
@@ -614,7 +666,15 @@ Version 2.00
|
614 | 666 | dbext_default_DB2_cmd_options = '-q del -s off'
|
615 | 667 | dbext_default_DB2_db2cmd_bin = 'db2cmd'
|
616 | 668 | dbext_default_DB2_db2cmd_cmd_options = '-c -w -i -t db2 -s'
|
617 |
| -< |
| 669 | +
|
| 670 | + dbext_default_MYSQL_version |
| 671 | +< - MySQL version 5 supports stored procedures, views and new system |
| 672 | + tables. By default dbext takes advantage of these new |
| 673 | + INFORMATION_SCHEMA tables. If you are using dbext with MySQL 4 |
| 674 | + add the following to your vimrc to prevent the use of the new |
| 675 | + system tables: > |
| 676 | + let g:dbext_default_MYSQL_version = '4' |
| 677 | +
|
618 | 678 |
|
619 | 679 | 3.4 DB2 Modes *dbext-configure-db2*
|
620 | 680 | DB2 provides two different binaries to execute commands: db2batch, db2cmd.
|
|
0 commit comments