1
- *dbext.txt* For Vim version 6.0. Last change: Wed Jul 21 2004 8:55:37 AM
1
+ *dbext.txt* For Vim version 6.0. Last change: Tue Sep 14 2004 5:48:25 PM
2
2
3
3
4
4
VIM REFERENCE MANUAL
7
7
David Fishburn <
[email protected] >
8
8
9
9
Database extension plugin (dbext.vim) manual
10
- dbext.vim version 2.01
10
+ dbext.vim version 2.10
11
11
12
12
For instructions on installing this file, type
13
13
:help add-local-help
14
14
| add-local-help | inside Vim.
15
15
16
+ Homepage: http://vim.sourceforge.net/script.php?script_id=356
17
+ SourceForge: $Revision: 1.17 $
18
+
16
19
*dbext* *dbext.vim* *db_ext* *db_ext.vim* *database-extension* *pgsql* *mysql*
17
- *asa* *ase* *ingres* *interbase* *sqlsrv* *ora* *db2*
20
+ *asa* *ase* *ingres* *interbase* *sqlite* * sqlsrv* *ora* *db2*
18
21
19
22
1. Overview | dbext-overview |
20
23
2. Installation | dbext-install |
@@ -46,28 +49,55 @@ For instructions on installing this file, type
46
49
------------------------------------------------------------------------------
47
50
What's New *dbext-new*
48
51
52
+ Version 2.10
53
+
54
+ New Features
55
+ ------------
56
+ - Added support for the database SQLite (thanks to Ron Aaron).
57
+ - Added a tutorial in the documentation for first time users.
58
+ - New functionality for better integration with the Intellisense SQL plugin.
59
+ - Ability to change the title of the window/buffer.
60
+ - Integrated Login support for windows.
61
+ - Added new functionality to these commands: | dbext-mappings |
62
+ DBGetOption
63
+ DBSetOption
64
+ DBExecRangeSQL
65
+ - Added 4 new options: | dbext-configure-variables |
66
+ replace_title
67
+ custom_title
68
+ use_tbl_alias
69
+ delete_temp_file
70
+
71
+ Bug Fixes
72
+ ---------
73
+ - dbname was not defaulting correctly.
74
+ - Overhauled the DB2 support.
75
+ - bin_path did not work correctly on windows platforms.
76
+ - Updated the connection text in the Result buffer.
77
+
49
78
Version 2.00
50
79
51
- In version 2.00 the following new features have been added to dbext.
52
- Connection Profiles | dbext-connect-profiles |
53
- Modeline Support | dbext-connect-modelines |
54
- Object Completion | dbext-completion |
55
- Viewing Lists of Objects | dbext-list-objects |
80
+ - In version 2.00 the following new features have been added to dbext.
81
+ - Connection Profiles | dbext-connect-profiles |
82
+ - Modeline Support | dbext-connect-modelines |
83
+ - Object Completion | dbext-completion |
84
+ - Viewing Lists of Objects | dbext-list-objects |
56
85
Tables
57
86
Procedures
58
87
Views
59
88
Columns
60
- FileType Support Added | dbext-filetypes |
89
+ - FileType Support Added | dbext-filetypes |
61
90
Supported PHP, Java, JSP, JavaScript, jProperties, Perl, SQL, Vim
62
- Intellisense Addin Support | dbext-intellisense |
91
+ - Intellisense Addin Support | dbext-intellisense |
92
+ =======
63
93
64
94
------------------------------------------------------------------------------
65
95
1. Overview *dbext-overview*
66
96
67
97
This plugin contains functions/mappings/commands to enable Vim to access
68
98
several databases. Currently Mysql, PostgreSQL, Ingres, Oracle,
69
99
Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise,
70
- Microsoft SQL Server, DB2 and Interbase are supported.
100
+ SQLite, Microsoft SQL Server, DB2 and Interbase are supported.
71
101
72
102
It does this by shelling out to the operating system and calling the
73
103
command line tools that come with the client software for the database.
@@ -89,7 +119,7 @@ Version 2.00
89
119
statement that has a syntax error in it) the output error messages from the
90
120
database will be displayed in the Result buffer.
91
121
92
- In addition to the 9 currently supported relation databases (RDBMS), you can
122
+ In addition to the 10 currently supported relation databases (RDBMS), you can
93
123
easily add support for new database's. See | dbext-newdb | for details.
94
124
95
125
On the supported databases you can execute any SQL statements (insert,
@@ -169,7 +199,7 @@ Version 2.00
169
199
dbext_default_port
170
200
< - Default port to connect to >
171
201
dbext_default_use_result_buffer
172
- < - Whether to use the result buffer, or echo the results of the cmd >
202
+ < - Whether to use the result buffer, or echo the results of the command >
173
203
dbext_default_use_sep_result_buffer
174
204
< - Whether to use separate result buffers for each file >
175
205
dbext_default_buffer_lines
@@ -194,8 +224,41 @@ Version 2.00
194
224
< - Changes the title of the buffer to show connection information.
195
225
This is useful if you are using a scratch buffer to test statements,
196
226
it will show you which database you are connected to visually by
197
- glancing at the buffer title.
198
-
227
+ glancing at the buffer title. >
228
+ dbext_default_custom_title
229
+ < - If the default format of the replace title feature does not meet
230
+ your needs, you can set a custom title. To retrieve settings
231
+ from the dbext plugin you can use: >
232
+ :let new_title = 'Srvr: ' . DB_listOption('srvname')
233
+ :exec 'DBSetOption type=ASA:replace_title=1:custom_title='.new_title
234
+ dbext_default_use_tbl_alias
235
+ < - DBListColumn (by default) will create a column list with an
236
+ alias attached to each column. This option has three
237
+ settings: >
238
+ n - do not use an alias
239
+ d - use the default (calculated) alias
240
+ a - ask to confirm the alias name
241
+ < - An alias is determined following a few rules:
242
+ 1. If the table name has an '_', then use it as a separator: >
243
+ MY_TABLE_NAME --> MTN
244
+ my_table_name --> mtn
245
+ My_table_NAME --> MtN
246
+ < 2. If the table name does NOT an '_', but DOES use mixed case
247
+ then the case is used as a separator: >
248
+ MyTableName --> MTN
249
+ < 3. If the table name does NOT an '_', and does NOT use mixed case
250
+ then the first letter of the table is used: >
251
+ mytablename --> m
252
+ MYTABLENAME --> M
253
+ < - The option can be turned on and off via the DBSetOption command. >
254
+ :DBSetOption use_tbl_alias=n
255
+ dbext_default_delete_temp_file
256
+ < - If debugging, it can be useful to view the SQL file that
257
+ dbext generated to be executed by the database. Setting this
258
+ option to 0 (off) will leave the temporary file in the
259
+ $TEMP directory for viewing. >
260
+ :DBSetOption delete_temp_file=0
261
+ <
199
262
Buffer variables
200
263
You can check all options for the buffer without specifying an option name
201
264
this will open the Result buffer and list all settings: >
@@ -311,6 +374,9 @@ Version 2.00
311
374
dbext_default_INTERBASE_cmd_header = ''
312
375
dbext_default_INTERBASE_cmd_terminator = ''
313
376
dbext_default_INTERBASE_cmd_options = ''
377
+ dbext_default_SQLITE_bin = 'sqlite'
378
+ dbext_default_SQLITE_cmd_header = ".mode column\n.headers ON\n"
379
+ dbext_default_SQLITE_cmd_terminator = ';'
314
380
dbext_default_SQLSRV_bin = "osql"
315
381
dbext_default_SQLSRV_cmd_header = ""
316
382
dbext_default_SQLSRV_cmd_terminator = ""
@@ -499,6 +565,10 @@ Version 2.00
499
565
DBCompleteTable - Sets up table name completion for the buffer
500
566
DBCompleteProcedure - Sets up table name completion for the buffer
501
567
DBCompleteView - Sets up table name completion for the buffer
568
+ DBListTable - Lists all tables (optional wildcard)
569
+ DBListProcedure - Lists all procedures (optional wildcard)
570
+ DBListView - Lists all views (optional wildcard)
571
+ DBListColumn - Comma separated list of columns for the given table
502
572
503
573
------------------------------------------------------------------------------
504
574
5. Adding new database types *dbext-newdb*
@@ -712,6 +782,22 @@ To specify the type of database you connect to most often, you can place the
712
782
// dbext:profile=ASA_generic:host=my_desktop
713
783
<
714
784
This has the same effect as issuing the following commands: >
785
+ DBSetOption type=ASA
786
+ DBSetOption user=dba
787
+ DBSetOption dsnname=My DSN with spaces
788
+ DBSetOption passwd=sql
789
+ DBSetOption host=my_desktop
790
+ <
791
+ To deal with running different versions of database software on your
792
+ machine you can also set the binary path, or the binary itself from within
793
+ modelines. >
794
+ -- dbext:type=SQLITE:SQLITE_bin=D:\Programs\POPFile\sqlite3.exe:dbname=D:\Programs\POPFile\popfile.db'
795
+ <
796
+ Or in the case where the binary has the same name, but the directories are
797
+ different: >
798
+ -- dbext:type=SQLITE:bin_path=D:\Programs\POPFile:dbname=D:\Programs\POPFile\popfile.db'
799
+ <
800
+
715
801
716
802
7.5 Ask for connection parameters *dbext-connect-ask*
717
803
0 commit comments