Skip to content

Commit cefa81e

Browse files
bagyi0vim-scripts
authored andcommitted
Version 2.10
New Features - Support for the SQLite database has been added (thanks to Ron Aaron).
1 parent c123d7b commit cefa81e

File tree

2 files changed

+576
-117
lines changed

2 files changed

+576
-117
lines changed

doc/dbext.txt

Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33

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

99
Database extension plugin (dbext.vim) manual
10-
dbext.vim version 2.01
10+
dbext.vim version 2.10
1111

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

16+
Homepage: http://vim.sourceforge.net/script.php?script_id=356
17+
SourceForge: $Revision: 1.17 $
18+
1619
*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*
1821

1922
1. Overview |dbext-overview|
2023
2. Installation |dbext-install|
@@ -46,28 +49,55 @@ For instructions on installing this file, type
4649
------------------------------------------------------------------------------
4750
What's New *dbext-new*
4851

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+
4978
Version 2.00
5079

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|
5685
Tables
5786
Procedures
5887
Views
5988
Columns
60-
FileType Support Added |dbext-filetypes|
89+
- FileType Support Added |dbext-filetypes|
6190
Supported PHP, Java, JSP, JavaScript, jProperties, Perl, SQL, Vim
62-
Intellisense Addin Support |dbext-intellisense|
91+
- Intellisense Addin Support |dbext-intellisense|
92+
=======
6393

6494
------------------------------------------------------------------------------
6595
1. Overview *dbext-overview*
6696

6797
This plugin contains functions/mappings/commands to enable Vim to access
6898
several databases. Currently Mysql, PostgreSQL, Ingres, Oracle,
6999
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.
71101

72102
It does this by shelling out to the operating system and calling the
73103
command line tools that come with the client software for the database.
@@ -89,7 +119,7 @@ Version 2.00
89119
statement that has a syntax error in it) the output error messages from the
90120
database will be displayed in the Result buffer.
91121

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
93123
easily add support for new database's. See |dbext-newdb| for details.
94124

95125
On the supported databases you can execute any SQL statements (insert,
@@ -169,7 +199,7 @@ Version 2.00
169199
dbext_default_port
170200
< - Default port to connect to >
171201
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 >
173203
dbext_default_use_sep_result_buffer
174204
< - Whether to use separate result buffers for each file >
175205
dbext_default_buffer_lines
@@ -194,8 +224,41 @@ Version 2.00
194224
< - Changes the title of the buffer to show connection information.
195225
This is useful if you are using a scratch buffer to test statements,
196226
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+
<
199262
Buffer variables
200263
You can check all options for the buffer without specifying an option name
201264
this will open the Result buffer and list all settings: >
@@ -311,6 +374,9 @@ Version 2.00
311374
dbext_default_INTERBASE_cmd_header = ''
312375
dbext_default_INTERBASE_cmd_terminator = ''
313376
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 = ';'
314380
dbext_default_SQLSRV_bin = "osql"
315381
dbext_default_SQLSRV_cmd_header = ""
316382
dbext_default_SQLSRV_cmd_terminator = ""
@@ -499,6 +565,10 @@ Version 2.00
499565
DBCompleteTable - Sets up table name completion for the buffer
500566
DBCompleteProcedure - Sets up table name completion for the buffer
501567
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
502572

503573
------------------------------------------------------------------------------
504574
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
712782
// dbext:profile=ASA_generic:host=my_desktop
713783
<
714784
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+
715801

716802
7.5 Ask for connection parameters *dbext-connect-ask*
717803

0 commit comments

Comments
 (0)