Skip to content

Commit 164e8d2

Browse files
bagyi0vim-scripts
authored andcommitted
Version 4.03
Posted by David Fishburn. New Features ------------ - dbext.vim now requires Vim7. - dbext.vim no longer has dependencies on other plugins by utilizing the new Vim7 features (Lists and Dictionaries). - When using the DBCompleteTable, DBCompleteProcedure, DBCompleteView commands errors are displayed instead of silently ignored. This makes them more useful with the sqlComplete plugin (see |sql.txt|). - Added new option, dbext_default_MYSQL_version, for MySQL to indicate the version you using. - You can optionally define a function, DBextPostResult, in your .vimrc, this function will be called each time the result window is updated. This function can be used to do anything, for example, syntax highlighting the result set in the result window. Bug Fixes ------------ - Added version support with MySQL to control what SQL is sent for version 4 and 5 servers.
1 parent 647865d commit 164e8d2

File tree

2 files changed

+358
-324
lines changed

2 files changed

+358
-324
lines changed

doc/dbext.txt

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33

44
VIM REFERENCE MANUAL
@@ -7,7 +7,7 @@
77
David Fishburn <[email protected]>
88

99
Database extension plugin (dbext.vim) manual
10-
dbext.vim version 3.50
10+
dbext.vim version 4.03
1111

1212
For instructions on installing this file, type
1313
:help add-local-help
@@ -53,6 +53,30 @@ SourceForge: $Revision: 1.23 $
5353
------------------------------------------------------------------------------
5454
What's New *dbext-new*
5555

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+
5680
Version 3.50
5781

5882
New Features
@@ -330,6 +354,33 @@ Version 2.00
330354
populated the result window. Pressing 'R' calls the DBRefreshResult
331355
command.
332356

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+
333384
3.2 Script Variables *dbext-configure-variables*
334385

335386
Global variables: >
@@ -573,6 +624,7 @@ Version 2.00
573624
dbext_default_MYSQL_cmd_header = ''
574625
dbext_default_MYSQL_cmd_terminator = ''
575626
dbext_default_MYSQL_cmd_options = ''
627+
dbext_default_MYSQL_version = '5'
576628
dbext_default_ASA_bin = 'dbisql'
577629
dbext_default_ASA_cmd_header = ''
578630
dbext_default_ASA_cmd_terminator = ';'
@@ -614,7 +666,15 @@ Version 2.00
614666
dbext_default_DB2_cmd_options = '-q del -s off'
615667
dbext_default_DB2_db2cmd_bin = 'db2cmd'
616668
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+
618678
619679
3.4 DB2 Modes *dbext-configure-db2*
620680
DB2 provides two different binaries to execute commands: db2batch, db2cmd.

0 commit comments

Comments
 (0)