Skip to content

Commit 3214a61

Browse files
bagyi0vim-scripts
authored andcommitted
Version 18.0
Posted by David Fishburn New Features ------------ - Added support for parsing C# files (Raul Segura Acevedo). Bug Fixes --------- - Changed the Oracle calls to SQLPlus from using single quotes to using double quotes (David Sweeney). - The <Leader>sbp and <Leader>tcl mapping were missing with version 17.00. - The DBI interface could report: "E15: Invalid expression" when retrieving table lists from DB2, but this could also affect other SQL commands that returned strings surrounded in double quotes (Charles McGarvey).
1 parent 794c9a1 commit 3214a61

File tree

5 files changed

+51
-17
lines changed

5 files changed

+51
-17
lines changed

README

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
This is a mirror of http://www.vim.org/scripts/script.php?script_id=356
22

3-
This plugin contains functions/mappings/commands to enable Vim to access several databases. Current databases supported are: Mysql, PostgreSQL, Ingres, Oracle, Oracle Rdb (VMS), Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise, Microsoft SQL Server, DB2, Interbase and SQLite and ODBC are supported. New to version 5.x of dbext introduces the support for Perl's DBI layer. If the database you are using is not *natively* supported by dbext, but has a DBI interface, dbext's standard feature set is available. For those already using dbext, the DBI interface should provide a performance boost when running statements against your database. DBI also provides an ODBC bridge, therefore any ODBC compliant database is also accessible.
3+
This plugin contains functions/mappings/commands to enable Vim to access several databases.
4+
5+
Current databases supported are:
6+
Mysql,
7+
PostgreSQL,
8+
Ingres,
9+
Oracle,
10+
Oracle Rdb (VMS),
11+
Sybase Adaptive Server Anywhere,
12+
Sybase Adaptive Server Enterprise,
13+
Microsoft SQL Server,
14+
DB2,
15+
Interbase,
16+
SQLite,
17+
SAP HANA,
18+
ODBC / Perl DBI
19+
20+
For Perl's DBI layer if the database you are using is not *natively* supported by dbext, but has a DBI interface, dbext's standard feature set is available. For those already using dbext, the DBI interface should provide a performance boost when running statements against your database. DBI also provides an ODBC bridge, therefore any ODBC compliant database is also accessible.
421

522
NOTE: As of version 4.0 this plugin requires Vim 7.
623
Version 5.0 supports Vim 7's autoload feature.

autoload/dbext.vim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
" dbext.vim - Commn Database Utility
22
" Copyright (C) 2002-10, Peter Bagyinszki, David Fishburn
33
" ---------------------------------------------------------------
4-
" Version: 17.00
4+
" Version: 18.00
55
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
66
" Authors: Peter Bagyinszki <petike1 at dpg dot hu>
77
" David Fishburn <dfishburn dot vim at gmail dot com>
8-
" Last Modified: 2012 Sep 29
8+
" Last Modified: 2012 Oct 31
99
" Based On: sqlplus.vim (author: Jamis Buck)
1010
" Created: 2002-05-24
1111
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
@@ -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_auto = 1700
41+
let g:loaded_dbext_auto = 1800
4242

4343
" Turn on support for line continuations when creating the script
4444
let s:cpo_save = &cpo
@@ -2924,11 +2924,11 @@ function! s:DB_ORA_execSql(str)
29242924

29252925
let cmd = dbext_bin .
29262926
\ ' ' . dbext#DB_getWType("cmd_options") .
2927-
\ s:DB_option(" '", s:DB_get("user"), '') .
2927+
\ s:DB_option(' "', s:DB_get("user"), '') .
29282928
\ s:DB_option('/', s:DB_get("passwd"), '') .
29292929
\ s:DB_option('@', s:DB_get("srvname"), '') .
29302930
\ s:DB_option(' ', dbext#DB_getWTypeDefault("extra"), '') .
2931-
\ "' @" . s:dbext_tempfile
2931+
\ '" @' . s:dbext_tempfile
29322932
let result = s:DB_runCmd(cmd, output, "")
29332933

29342934
return result
@@ -6982,6 +6982,7 @@ function! dbext#DB_parseQuery(query)
69826982
" let query = s:DB_parseSQL(a:query)
69836983
return s:DB_parseHostVariables(a:query)
69846984
elseif matchstr( l:filetype, "java" ) == "java" ||
6985+
\ matchstr( l:filetype, "cs" ) == "cs" ||
69856986
\ matchstr( l:filetype, "jsp" ) == "jsp" ||
69866987
\ matchstr( l:filetype, "html" ) == "html" ||
69876988
\ matchstr( l:filetype, "javascript" ) == "javascript"

autoload/dbext_dbi.vim

Lines changed: 4 additions & 4 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: 17.00
7+
" Version: 18.00
88
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
99
" Authors: David Fishburn <dfishburn dot vim at gmail dot com>
10-
" Last Modified: 2012 Jun 26
10+
" Last Modified: 2012 Oct 29
1111
" Created: 2007-05-24
1212
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
1313
"
@@ -119,7 +119,7 @@
119119
if exists("g:loaded_dbext_dbi")
120120
finish
121121
endif
122-
let g:loaded_dbext_dbi = 1700
122+
let g:loaded_dbext_dbi = 1800
123123

124124
" Turn on support for line continuations when creating the script
125125
let s:cpo_save = &cpo
@@ -507,8 +507,8 @@ sub db_escape
507507
{
508508
my $escaped = shift;
509509
if( defined($escaped) ) {
510-
$escaped =~ s/"/\\"/g;
511510
$escaped =~ s/\\/\\\\/g;
511+
$escaped =~ s/"/\\"/g;
512512
$escaped =~ s/\n/\\n/g;
513513
}
514514

doc/dbext.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*dbext.txt* For Vim version 7.0. Last change: 2012 Oct 09
1+
*dbext.txt* For Vim version 7.0. Last change: 2012 Nov 27
22

33

44
VIM REFERENCE MANUAL
@@ -7,7 +7,7 @@
77
Peter Bagyinszki
88

99
Database extension plugin (dbext.vim) manual
10-
dbext.vim version 17.00
10+
dbext.vim version 18.00
1111

1212
For instructions on installing this file, type
1313
:help add-local-help
@@ -116,6 +116,22 @@ David Fishburn
116116
==============================================================================
117117
2. What's New *dbext-new*
118118

119+
Version 18.00
120+
121+
New Features
122+
------------
123+
- Added support for parsing C# files (Raul Segura Acevedo).
124+
125+
Bug Fixes
126+
---------
127+
- Changed the Oracle calls to SQLPlus from using single quotes to using
128+
double quotes (David Sweeney).
129+
- The <Leader>sbp and <Leader>tcl mapping were missing with version 17.00.
130+
- The DBI interface could report: "E15: Invalid expression" when retrieving
131+
table lists from DB2, but this could also affect other SQL commands
132+
that returned strings surrounded in double quotes (Charles McGarvey).
133+
134+
119135
Version 17.00
120136

121137
New Features

plugin/dbext.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
" dbext.vim - Commn Database Utility
22
" Copyright (C) 2002-10, Peter Bagyinszki, David Fishburn
33
" ---------------------------------------------------------------
4-
" Version: 17.00
4+
" Version: 18.00
55
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
66
" Authors: Peter Bagyinszki <petike1 at dpg dot hu>
77
" David Fishburn <dfishburn dot vim at gmail dot com>
8-
" Last Modified: 2012 Oct 04
8+
" Last Modified: 2012 Oct 29
99
" Based On: sqlplus.vim (author: Jamis Buck)
1010
" Created: 2002-05-24
1111
" Homepage: http://vim.sourceforge.net/script.php?script_id=356
@@ -36,7 +36,7 @@ if v:version < 700
3636
echomsg "dbext: Version 4.00 or higher requires Vim7. Version 3.50 can stil be used with Vim6."
3737
finish
3838
endif
39-
let g:loaded_dbext = 1700
39+
let g:loaded_dbext = 1800
4040

4141
" Turn on support for line continuations when creating the script
4242
let s:cpo_save = &cpo
@@ -286,7 +286,7 @@ endif
286286
if maparg(g:dbext_map_prefix.'dpa', 'n') == ''
287287
exec 'nmap <unique> '.g:dbext_map_prefix.'dpa <Plug>DBDescribeProcedureAskName'
288288
endif
289-
if maparg(g:dbext_map_prefix.'bp', 'n')
289+
if maparg(g:dbext_map_prefix.'bp', 'n') == ''
290290
exec 'nmap <unique> '.g:dbext_map_prefix.'bp <Plug>DBPromptForBufferParameters'
291291
endif
292292
if maparg(g:dbext_map_prefix.'lc', 'n') == ''
@@ -304,7 +304,7 @@ endif
304304
if maparg(g:dbext_map_prefix.'lv', 'n') == ''
305305
exec 'nmap <unique> '.g:dbext_map_prefix.'lv <Plug>DBListView'
306306
endif
307-
if maparg(g:dbext_map_prefix.'tcl', 'n')
307+
if maparg(g:dbext_map_prefix.'tcl', 'n') == ''
308308
exec 'nmap <unique> '.g:dbext_map_prefix.'tcl <Plug>DBListColumn'
309309
endif
310310
if maparg(g:dbext_map_prefix.'tcl', 'x') == ''

0 commit comments

Comments
 (0)