Skip to content

Commit 55b356e

Browse files
bagyi0vim-scripts
authored andcommitted
Version 6.20
Posted by David Fishburn Bug Fixes --------- - Changed the DB2 TOP X syntax (DBExecSQLTopX). - Changed the query used to retrieve the current line for DBExecSQLUnderCursor when no text is selected (Sergey Alekhin). - When parsing a SQL statement for host variables it was possible to miss excluding the INTO clause correctly (Sergey Alekhin).
1 parent e6ab9f7 commit 55b356e

File tree

4 files changed

+45
-30
lines changed

4 files changed

+45
-30
lines changed

autoload/dbext.vim

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
" dbext.vim - Commn Database Utility
22
" Copyright (C) 2002-7, Peter Bagyinszki, David Fishburn
33
" ---------------------------------------------------------------
4-
" Version: 6.10
5-
" Maintainer: David Fishburn <fishburn@ianywhere.com>
6-
" Authors: Peter Bagyinszki <petike1@dpg.hu>
7-
" David Fishburn <fishburn@ianywhere.com>
8-
" Last Modified: Sun 08 Jun 2008 10:31:10 PM Eastern Daylight Time
4+
" Version: 6.20
5+
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
6+
" Authors: Peter Bagyinszki <petike1 at dpg dot hu>
7+
" David Fishburn <dfishburn dot vim at gmail dot com>
8+
" Last Modified: 2008 Aug 09
99
" Based On: sqlplus.vim (author: Jamis Buck)
1010
" Created: 2002-05-24
1111
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
12-
" Contributors: Joerg Schoppet <joerg.schoppet@web.de>
13-
" Hari Krishna Dara <hari_vim@yahoo.com>
12+
" Contributors: Joerg Schoppet <joerg dot schoppet at web dot de>
13+
" Hari Krishna Dara <hari_vim at yahoo dot com>
1414
" Ron Aaron
1515
" Andi Stern
1616
"
@@ -37,7 +37,7 @@ if v:version < 700
3737
echomsg "dbext: Version 4.00 or higher requires Vim7. Version 3.50 can stil be used with Vim6."
3838
finish
3939
endif
40-
let g:loaded_dbext_auto = 610
40+
let g:loaded_dbext_auto = 620
4141

4242
" call confirm("Loaded dbext autoload", "&Ok")
4343
" Script variable defaults, these are used internal and are never displayed
@@ -813,8 +813,8 @@ function! s:DB_getDefault(name)
813813
elseif a:name ==# "DB2_db2cmd_bin" |return (exists("g:dbext_default_DB2_db2cmd_bin")?g:dbext_default_DB2_db2cmd_bin.'':'db2cmd')
814814
elseif a:name ==# "DB2_db2cmd_cmd_options" |return (exists("g:dbext_default_DB2_db2cmd_cmd_options")?g:dbext_default_DB2_db2cmd_cmd_options.'':'-c -w -i -t db2 -s')
815815
elseif a:name ==# "DB2_cmd_terminator" |return (exists("g:dbext_default_DB2_cmd_terminator")?g:dbext_default_DB2_cmd_terminator.'':';')
816-
elseif a:name ==# "DB2_SQL_Top_pat" |return (exists("g:dbext_default_DB2_SQL_Top_pat")?g:dbext_default_DB2_SQL_Top_pat.'':'\(\cselect\)')
817-
elseif a:name ==# "DB2_SQL_Top_sub" |return (exists("g:dbext_default_DB2_SQL_Top_sub")?g:dbext_default_DB2_SQL_Top_sub.'':'\1 TOP @dbext_topX ')
816+
elseif a:name ==# "DB2_SQL_Top_pat" |return (exists("g:dbext_default_DB2_SQL_Top_pat")?g:dbext_default_DB2_SQL_Top_pat.'':'\(.*\)')
817+
elseif a:name ==# "DB2_SQL_Top_sub" |return (exists("g:dbext_default_DB2_SQL_Top_sub")?g:dbext_default_DB2_SQL_Top_sub.'':'\1 FETCH FIRST @dbext_topX ROWS ONLY')
818818
elseif a:name ==# "INGRES_bin" |return (exists("g:dbext_default_INGRES_bin")?g:dbext_default_INGRES_bin.'':'sql')
819819
elseif a:name ==# "INGRES_cmd_options" |return (exists("g:dbext_default_INGRES_cmd_options")?g:dbext_default_INGRES_cmd_options.'':'')
820820
elseif a:name ==# "INGRES_cmd_terminator" |return (exists("g:dbext_default_INGRES_cmd_terminator")?g:dbext_default_INGRES_cmd_terminator.'':'\p\g')
@@ -4866,7 +4866,7 @@ function! dbext#DB_getQueryUnderCursor()
48664866
\ col("'<") == col("'>")
48674867
" No command terminator was found, so just use
48684868
" the current lines content
4869-
let @z = matchstr(getline("'<"), '.\{'.col("'<").'}\zs.*')
4869+
let @z = strpart(getline("'<"), (col("'<")-1))
48704870
endif
48714871
endif
48724872

@@ -6062,7 +6062,7 @@ function! s:DB_parseHostVariables(query)
60626062
" For some reason [\n\s]* does not work
60636063
if query =~? '^[\n \t]*select'
60646064
let query = substitute(query,
6065-
\ '\c\%(\<\%(insert\|merge\)\s\+\)\@<!INTO.\{-}FROM',
6065+
\ '\c\%(\<\%(insert\|merge\)\s\+\)\@<!\<INTO\>.\{-}\<FROM\>',
60666066
\ 'FROM', 'g')
60676067
endif
60686068

autoload/dbext_dbi.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
" It adds transaction support and the ability
55
" to reach any database currently supported
66
" by Perl and DBI.
7-
" Version: 6.10
8-
" Maintainer: David Fishburn <fishburn@ianywhere.com>
9-
" Authors: David Fishburn <fishburn@ianywhere.com>
10-
" Last Modified: Wed 28 May 2008 10:43:28 PM Eastern Daylight Time
7+
" Version: 6.20
8+
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
9+
" Authors: David Fishburn <dfishburn dot vim at gmail dot com>
10+
" Last Modified: 2008 Jul 04
1111
" Created: 2007-05-24
1212
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
1313
"
@@ -114,7 +114,7 @@ if !has('perl')
114114
let g:loaded_dbext_dbi_msg = 'Vim does not have perl support enabled'
115115
finish
116116
endif
117-
let g:loaded_dbext_dbi = 610
117+
let g:loaded_dbext_dbi = 620
118118

119119
if !exists("dbext_dbi_debug")
120120
let g:dbext_dbi_debug = 0
@@ -1421,4 +1421,4 @@ EOCore
14211421
let g:dbext_dbi_loaded_perl_subs = 1
14221422
endfunction
14231423

1424-
" vim:fdm=marker:nowrap:ts=4:expandtab:ff=unix:
1424+
" vim:fdm=marker:nowrap:ts=4:expandtab:

doc/dbext.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
*dbext.txt* For Vim version 7.0. Last change: Sun 08 Jun 2008 10:39:26 PM Eastern Daylight Time
1+
*dbext.txt* For Vim version 7.0. Last change: 2008 Aug 09
22

33

44
VIM REFERENCE MANUAL
55
by
6-
David Fishburn <fishburn@ianywhere.com>
7-
Peter Bagyinszki <petike1@dpg.hu>
6+
David Fishburn <dfishburn dot vim at gmail dot com>
7+
Peter Bagyinszki <petike1 at dpg dot hu>
88

99
Database extension plugin (dbext.vim) manual
10-
dbext.vim version 6.10
10+
dbext.vim version 6.20
1111

1212
For instructions on installing this file, type
1313
:help add-local-help
@@ -79,6 +79,21 @@ David Fishburn
7979
==============================================================================
8080
2. What's New *dbext-new*
8181

82+
Version 6.20
83+
84+
New Features
85+
------------
86+
- None
87+
88+
Bug Fixes
89+
---------
90+
- Changed the DB2 TOP X syntax (DBExecSQLTopX).
91+
- Changed the query used to retrieve the current line for
92+
DBExecSQLUnderCursor when no text is selected (Sergey Alekhin).
93+
- When parsing a SQL statement for host variables it was possible
94+
to miss excluding the INTO clause correctly (Sergey Alekhin).
95+
96+
8297
Version 6.10
8398

8499
New Features

plugin/dbext.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
" dbext.vim - Commn Database Utility
22
" Copyright (C) 2002-7, Peter Bagyinszki, David Fishburn
33
" ---------------------------------------------------------------
4-
" Version: 6.10
5-
" Maintainer: David Fishburn <fishburn@ianywhere.com>
6-
" Authors: Peter Bagyinszki <petike1@dpg.hu>
7-
" David Fishburn <fishburn@ianywhere.com>
8-
" Last Modified: Wed 28 May 2008 11:22:28 PM Eastern Daylight Time
4+
" Version: 6.20
5+
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
6+
" Authors: Peter Bagyinszki <petike1 at dpg dot hu>
7+
" David Fishburn <dfishburn dot vim at gmail dot com>
8+
" Last Modified: 2008 Jul 04
99
" Based On: sqlplus.vim (author: Jamis Buck)
1010
" Created: 2002-05-24
1111
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
12-
" Contributors: Joerg Schoppet <joerg.schoppet@web.de>
13-
" Hari Krishna Dara <hari_vim@yahoo.com>
12+
" Contributors: Joerg Schoppet <joerg dot schoppet at web dot de>
13+
" Hari Krishna Dara <hari_vim at yahoo dot com>
1414
" Ron Aaron
1515
"
1616
" SourceForge: $Revision: 1.38 $
@@ -38,7 +38,7 @@ if v:version < 700
3838
echomsg "dbext: Version 4.00 or higher requires Vim7. Version 3.50 can stil be used with Vim6."
3939
finish
4040
endif
41-
let g:loaded_dbext = 610
41+
let g:loaded_dbext = 620
4242

4343
if !exists('g:dbext_default_menu_mode')
4444
let g:dbext_default_menu_mode = 3

0 commit comments

Comments
 (0)