Skip to content

Commit 707e94f

Browse files
bagyi0vim-scripts
authored andcommitted
Version 2.20
New Features ------------ - Added new connection parameter called "extra", you can place any additional command line parameters in this option. - DBGetOption displays all options including the dbext version. - Better support for command terminators that have newline or special characters in them. For example ASE/SQLSRV use "\ngo\n", now the command DBExecSQLUnderCursor will correctly find the statement. - Use_tbl_alias defaults to "ask", instead of "default on". - For most supported databases, when displaying the Table / Procedure / View List, you can now enter a partial string "DBA.", and if a . is included it will only display objects created / owned by that userid. - DBExecSQLUnderCursor would sometimes stop in the middle of a query if the command terminator was included (inside a quoted string), now it ensures there is no text following the terminator. - The result window also includes the error code returned by the binary used to execute the command. This can be useful for debugging. - The first line of the result window includes a line showing the connection information, if you have many buffers open, it can be difficult to determine which database you are executing commands against. A glance at this line will tell you immediately. - g:dbext_default_always_prompt_for_variables = 0 will prevent you from being prompted for substitution parameters. Setting this value to 1 will always prompt the user. - You can now abort the execution of a statement if you are prompted for substitution parameters. - If you are prompted for parameters, if you choose "Stop Prompting" the command will be executed immediate. If "Never Prompt" is chosen, no further prompting will occur for this buffer. Bug Fixes --------- - SQLSRV did not have a default command terminator, now it is "\ngo\n". - Changed the Oracle command terminator to ";", and the routine that executes the statements automatically adds the "\nquit;\n" so that sqlplus will complete. - Spaces were not correctly removed from column lists in all cases, this showed up as an issue with the SQL Intellisense plugin. - When executing SELECT statements the INTO clause (if present) is removed so the results are displayed in the result window. Refined the removal of the INTO clause to ensure it does not interfer with an INSERT or MERGE statement.
1 parent 7a26256 commit 707e94f

File tree

2 files changed

+259
-94
lines changed

2 files changed

+259
-94
lines changed

doc/dbext.txt

Lines changed: 73 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*dbext.txt* For Vim version 6.0. Last change: Wed Sep 22 2004 10:40:23 AM
1+
*dbext.txt* For Vim version 6.0. Last change: Sat Feb 19 2005 5:43:26 PM
22

33

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

99
Database extension plugin (dbext.vim) manual
10-
dbext.vim version 2.11
10+
dbext.vim version 2.20
1111

1212
For instructions on installing this file, type
1313
:help add-local-help
1414
|add-local-help| inside Vim.
1515

1616
Homepage: http://vim.sourceforge.net/script.php?script_id=356
17-
SourceForge: $Revision: 1.18 $
17+
SourceForge: $Revision: 1.20 $
1818

1919
*dbext* *dbext.vim* *db_ext* *db_ext.vim* *database-extension* *pgsql* *mysql*
2020
*asa* *ase* *ingres* *interbase* *sqlite* *sqlsrv* *ora* *db2*
@@ -49,6 +49,58 @@ SourceForge: $Revision: 1.18 $
4949
------------------------------------------------------------------------------
5050
What's New *dbext-new*
5151

52+
Version 2.20
53+
54+
New Features
55+
------------
56+
- Added new connection parameter called "extra", you can place any
57+
additional command line parameters in this option.
58+
- DBGetOption displays all options including the dbext version.
59+
- Better support for command terminators that have newline or special
60+
characters in them. For example ASE/SQLSRV use "\ngo\n", now the
61+
command DBExecSQLUnderCursor will correctly find the statement.
62+
- Use_tbl_alias defaults to "ask", instead of "default on".
63+
- For most supported databases, when displaying the Table / Procedure / View
64+
List, you can now enter a partial string "DBA.", and if a . is included
65+
it will only display objects created / owned by that userid.
66+
- DBExecSQLUnderCursor would sometimes stop in the middle of a query
67+
if the command terminator was included (inside a quoted string), now
68+
it ensures there is no text following the terminator.
69+
- The result window also includes the error code returned by the binary
70+
used to execute the command. This can be useful for debugging.
71+
- The first line of the result window includes a line showing the connection
72+
information, if you have many buffers open, it can be difficult to
73+
determine which database you are executing commands against. A glance at
74+
this line will tell you immediately.
75+
- g:dbext_default_always_prompt_for_variables = 0 will prevent you from
76+
being prompted for substitution parameters. Setting this value to 1
77+
will always prompt the user.
78+
- You can now abort the execution of a statement if you are prompted
79+
for substitution parameters.
80+
- If you are prompted for parameters, if you choose "Stop Prompting" the
81+
command will be executed immediate. If "Never Prompt" is chosen, no
82+
further prompting will occur for this buffer.
83+
84+
Bug Fixes
85+
---------
86+
- SQLSRV did not have a default command terminator, now it is "\ngo\n".
87+
- Changed the Oracle command terminator to ";", and the routine that
88+
executes the statements automatically adds the "\nquit;\n" so that
89+
sqlplus will complete.
90+
- Spaces were not correctly removed from column lists in all cases, this
91+
showed up as an issue with the SQL Intellisense plugin.
92+
- When executing SELECT statements the INTO clause (if present) is
93+
removed so the results are displayed in the result window. Refined the
94+
removal of the INTO clause to ensure it does not interfer with an
95+
INSERT or MERGE statement.
96+
97+
Version 2.11
98+
99+
Bug Fixes
100+
---------
101+
- On some platforms the temporary file created to execute SQL statements must
102+
end in ".sql". Corrected this for all databases
103+
52104
Version 2.10
53105

54106
New Features
@@ -198,6 +250,8 @@ Version 2.00
198250
< - Default host the server is running on >
199251
dbext_default_port
200252
< - Default port to connect to >
253+
dbext_default_extra
254+
< - Customization string if the above options are not enough >
201255
dbext_default_use_result_buffer
202256
< - Whether to use the result buffer, or echo the results of the command >
203257
dbext_default_use_sep_result_buffer
@@ -211,7 +265,11 @@ Version 2.00
211265
dbext_default_always_prompt_for_variables
212266
< - If host variables are found, you are asked if you want to be
213267
prompted, setting this variable assumes you always want to be
214-
prompted, so it saves you a dialog. >
268+
prompted, so it saves you a dialog.
269+
- This option can have 3 values:
270+
1 - Always prompt for variables
271+
0 - Ask if you want to (if variables are found)
272+
-1 - Never prompt for variables >
215273
dbext_default_display_cmd_line
216274
< - When the command is run, the results are displayed in the Result
217275
buffer, setting display_cmd_line = 1, will also display the command
@@ -308,6 +366,14 @@ Version 2.00
308366
< - Machine name or IP address of server >
309367
port
310368
< - Port server is running on >
369+
extra
370+
< - Based on the database you are connecting to, you can add
371+
additional items to the tools command line. For example,
372+
using ASA, I could run: >
373+
DBSetOption extra=CON=myconn
374+
<
375+
This has the net result of creating the following command line: >
376+
dbisql -c "UID=dba;PWD=sql;CON=myconn"
311377
bin_path
312378
< - If tools provided by the database are not in the path, you can
313379
optionally supply full path to the binaries. This is also useful
@@ -330,7 +396,8 @@ Version 2.00
330396
< - Name of the binary which dbext uses to execute commands >
331397
cmd_header
332398
< - SQL statements sent before the command you are executing. This
333-
setting is usually used to set temporary options, or output options. >
399+
setting is usually used to set temporary options, or output
400+
options. >
334401
cmd_terminator
335402
< - Command terminator (varies per database, see following section) >
336403
cmd_options
@@ -1030,7 +1097,7 @@ To specify the type of database you connect to most often, you can place the
10301097
VALUES( 5, 'Joe', '555-1214' );
10311098
COMMIT;
10321099
1033-
CREATE TABLE contact
1100+
CREATE TABLE contact(
10341101
id INTEGER NOT NULL,
10351102
cont_name VARCHAR(30) NOT NULL,
10361103
phone_nbr VARCHAR(30) NULL,

0 commit comments

Comments
 (0)