- Choose your database:
- MySQL, read INSTALL.mysql (supported)
- SQLite, read INSTALL.sqlite (supported)
+ - SQLite2, read INSTALL.sqlite (supported)
- PgSQL, read INSTALL.pgsql (unsupported, may work)
- There are "bugs" in the perl modules. Read INSTALL.patches on how to fix.
other distros might need to build from sources.
+You may use either DBD::SQLite or DBD::SQLite2
+
SQLite sources:
http://www.hwaci.com/sw/sqlite/
# [str] Ability to remember/tell factoids
# none -- disable.
# mysql -- ...
-# SQLite -- SQLite (libdbd-sqlite-perl)
+# SQLite -- SQLite (libdbd-sqlite-perl) (might be version 2 or 3)
+# SQLite2 -- SQLite (libdbd-sqlite-perl) (force version 2)
# pgsql -- postgresql (NOT SUPPORTED)
### REQUIRED by factoids,freshmeat,karma,seen,...
set DBType mysql
sub sqlOpenDB {
my ($db, $type, $user, $pass, $no_fail) = @_;
# this is a mess. someone fix it, please.
- if ($type =~ /^SQLite$/i) {
+ if ($type =~ /^SQLite(2)?$/i) {
$db = "dbname=$db.sqlite";
} elsif ($type =~ /^pg/i) {
$db = "dbname=$db";
&status("Tables: ".join(',',@tables));
@db{@tables} = (1) x @tables;
- } elsif ($param{DBType} =~ /^SQLite$/i) {
+ } elsif ($param{DBType} =~ /^SQLite(2)?$/i) {
# retrieve a list of db's from the server.
foreach ( &sqlRawReturn("SELECT name FROM sqlite_master WHERE type='table'") ) {
my $f;
# TODO: use function to load module.
- if ($param{'DBType'} =~ /^(mysql|SQLite|pgsql)$/i) {
+ if ($param{'DBType'} =~ /^(mysql|SQLite(2)?|pgsql)$/i) {
eval "use DBI";
if ($@) {
&ERROR("No support for DBI::" . $param{'DBType'} . ", exiting!");