You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Posted by David Fishburn (maintainer)
New Features
------------
- Added new DBI/ODBC option DBI_max_column_width to restrict the width displayed in the DBI result window (Luke Mauldin).
- Improved the pattern used to find the query under the cursor. Besides finding the command terminator, it will also look for the first blank line or the end of the file (Jason Quirk).
- The dbext menu now uses the maps rather than calls to the commands. A new option will control this behaviour, g:dbext_map_or_cmd.
- Changed the default SQLite binary to be sqlite3 instead of sqlite (Greg Kapfhammer).
- Added a profile example for using the "sqsh" binary to connect to SQL Server instead of "osql" (Brian Iván Martínez).
- The cmd_terminator displayed under Connection Options in the DBGetOption output was always blank.
- Improved support for SAP HANA database, pulling objects from the system catalogue.
Bug Fixes
---------
- Controlling the DBI max rows (:DBSetOption DBI_max_rows=100) and DBI column separator did not work on a per buffer basis.
- Undefined variable, s:dbext_prev_winnr, was reported when using DBI/ODBC connections through the sqlComplete plugin and completing objects which require an active database connection (i.e. Tables, Procedures, ...) which had failed to connect to the database.
- dbext was not prompting for ? parameters in PHP files. This also affected all languages (Jérémie).
- Changing a database's global cmd terminator was not necessarily picked up when using that database type (Jason Quirk).
- ODBC or DBI could report an error about using length() instead of scalar() (Micah Duke).
- Various errors on Linux with DBI (Micah Duke).
- Using the console version of Vim displayed a number of "debug" messages during initialization.
Copy file name to clipboardExpand all lines: README
+38-12Lines changed: 38 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,22 @@ This is a mirror of http://www.vim.org/scripts/script.php?script_id=356
3
3
This plugin contains functions/mappings/commands to enable Vim to access several databases.
4
4
5
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
6
ODBC / Perl DBI
7
+
Mysql
8
+
Oracle
9
+
Oracle Rdb (VMS)
10
+
SAP HANA
11
+
SAP Sybase SQL Anywhere (SA/ASA)
12
+
SAP Sybase IQ (ASA)
13
+
SAP Sybase Adaptive Server Enterprise (ASE)
14
+
SAP Sybase UltraLite (UL)
15
+
Microsoft SQL Server
16
+
IBM DB2
17
+
Interbase
18
+
SQLite
19
+
PostgreSQL
20
+
Ingres
21
+
Firebird
19
22
20
23
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.
21
24
@@ -37,6 +40,29 @@ Connection Profiles
37
40
-----------------------------
38
41
You can create as many profiles as you like in your vimrc. Each profile specifies various connection information. Each buffer can be connected to a different database. The plugin will automatically prompt the user for connection information. If you have defined profiles in your vimrc, for ease of use, you can choose from a numbered list.
39
42
43
+
Adding connection profiles is the best way to use dbext, :h dbext.txt has lots of examples of different profiles for different databases.
44
+
let g:dbext_default_profile_myASA = 'type=ASA:user=DBA:passwd=SQL'
45
+
let g:dbext_default_profile_mySQLServer = 'type=SQLSRV:integratedlogin=1:srvname=mySrv:dbname=myDB'
46
+
let g:dbext_default_profile_mySQL = 'type=MYSQL:user=root:passwd=whatever:dbname=mysql'
47
+
let g:dbext_default_profile_mySQL_DBI = 'type=DBI:user=root:passwd=whatever:driver=mysql:conn_parms=database=mysql;host=localhost'
48
+
let g:dbext_default_profile_myORA = 'type=ORA:srvname=zzz42ga:user=john:passwd=whatever'
49
+
50
+
Assuming you work on many different projects, you can automatically have dbext choose the correct database connection profile by adding autocmds that use the filesystem path to choose the correct profile:
Or from the menu or the maps created you can choose a profile at any time.
65
+
40
66
SQL History
41
67
-----------
42
68
As of version 3.0, dbext maintains a history file which is shared between multiple instances of Vim. A statement added in one instance of Vim will be immediately available in a different instance of Vim on the same computer. To re-run a statement you can either press <enter> on the line, or if you prefer the mouse you can double click on the statement.
0 commit comments