bif-sql - run an SQL command against the database
0.1.0_28 (2014-09-23)
bif sql [STATEMENT...] [OPTIONS...]
The bif sql command runs an SQL statement directly against the database of the current bif repository.
bif sql
#!sh bif sql "select id,message from changes"
If STATEMENT is not given on the command line it will be read from stdin. If the statement begins with "select", "pragma" or "explain" the results of the statement will be fetched and displayed. Otherwise the return value of the statement (DBI "do" method) will be printed.
STATEMENT
By default a read-only handle for the database is used. Note that "pragma" statements would therefore require the --write flag to succeed, even if they are only returning data.
--write
The SQL statement text to execute. You will possibly want to use single quotes around this argument (or escape shell characters like "*") to prevent unwanted shell expansion messing with your query.
Do not print results but return them to the calling subroutine as a Perl data structure. This option is only useful for internal test scripts.
Run the statement against the user identity database instead of against the current repository database.
Run statement with a writeable database handle (default is read-only).
bif(1)
Mark Lawrence <nomad@null.net>
Copyright 2013-2014 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
To install App::bif, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::bif
CPAN shell
perl -MCPAN -e shell install App::bif
For more information on module installation, please visit the detailed CPAN module installation guide.