Re: dbish (DBI::Shell 11.93 using DBI 1.51)
- From: tlowery@xxxxxxxxx (Thomas A. Lowery)
- Date: Thu, 31 Aug 2006 21:24:05 -0400
Coombe, Skip wrote:
dbish would be a very handy tool if I could figure out howYou need to include a number to indicate the debugging level. 1 - 9. I
to use it.
I've read 'perldoc DBI::Shell"
but things start badly when I type 'dbish --debug DBI:SQLite:my.db
Unrecognised options: --debug
need to change (improve) the documentation.
I worked my way down the list of advertised cmds, with theThe shell requires the command prefix before the shell command:
uniform response
@DBI:SQLite:sqliteTest.dbsqliteTest.db> help /
DBD::SQLite::db prepare failed: near "count": syntax error(1) at
dbdimp.c line 269.
@DBI:SQLite:sqliteTest.dbsqliteTest.db> count pet /do
DBI::Shell: do failed: DBD::SQLite::db do failed: near "count": syntax
error(1) at dbdimp.c line 269 at
/usr/local/perl586/lib/site_perl/5.8.6/DBI/Shell.pm line 1033.
some std SQL cmds work fine, like 'select * from table1/'
but others fail, like:
@DBI:SQLite:sqliteTest.dbsqliteTest.db> show tables /
DBD::SQLite::db prepare failed: near "show": syntax error(1) at dbdimp.c
line 269.
Can anyone see what I am doing wrong, or suggest an alternate
cmd line browser that works with dbi?
/show tables
/help
/opt
....
I haven't tested the shell against SQLite. Let know how well it works.
Example: (note for mysql I change my command prefix to semicolon)
tlowery@pengye:~/projects/dbish/trunk> perl -w -Iblib/lib -Iblib/arch ./dbish --debug 9 dbi:mysql:test.
Using formatter class 'DBI::Format::Neat'
DBI::Shell 11.93 using DBI 1.50
DBI::Shell loaded from blib/lib/DBI/Shell.pm
reference type: ARRAY
reference type: ARRAY
/option editor=vim (was vi)
reference type: ARRAY
/option sqlpath=.:/home/tlowery/sql (was .)
reference type: ARRAY
/option tmp_dir=/tmp (was undef)
reference type: ARRAY
/option tmp_file=dbish11284.sql (was dbish11284.sql)
reference type: ARRAY
/option command_prefix=; (was [/;])
Loaded plugins DBI::Shell::Timing
Loaded plugins DBI::Shell::Completion
Loaded plugins DBI::Shell::Spool
reference type: ARRAY
reference type: ARRAY
reference type: ARRAY
reference type: ARRAY
reference type: ARRAY
commandline history written to /home/tlowery/.dbish_history
Using Term::ReadLine::Gnu
reference type: ARRAY
reference type: ARRAY
WARNING: The DBI::Shell interface and functionality are
======= very likely to change in subsequent versions!
Connecting to 'dbi:mysql:test' as ''...
reference type: ARRAY
/option prompt=mysql-- (was dbi:mysql:test)
reference type: ARRAY
/option format=sqlm (was neat)
Loaded plugins DBI::Shell::SQLMinus
@mysql--> ;sho tables
command='sho' args=' tables' output='' at blib/lib/DBI/Shell.pm line 602.
TABLE_CAT,TABLE_SCHEM,TABLE_NAME,TABLE_TYPE,REMARKS
undef,undef,'testme','TABLE',undef
[1 rows of 5 fields returned]
@mysql-->
- Prev by Date: RE: $dbh->{RowCacheSize} = 1000
- Next by Date: RE: $dbh->{RowCacheSize} = 1000
- Previous by thread: $dbh->{RowCacheSize} = 1000
- Next by thread: Problem with DBI make
- Index(es):
Relevant Pages
|