NAME
Babble::DataSource::DBI - Babble data collector using DBI
SYNOPSIS
use Babble;
use Babble::DataSource::DBI;
my $babble = Babble->new ();
$babble->add_sources (
Babble::DataSource::DBI->new (
-location => "dbi:SQLite:dbname=babble.db",
)
);
...
DESCRIPTION
Babble::DataSource::DBI implements a Babble data source class that fetches documents directly from whatever database DBI can fetch from.
METHODS
- new(%params)
-
This method creates a new object. The recognised parameters are:
- -location
-
The database to connect to, specified in a way DBI can understand. This parameter is mandatory!
- -db_user
-
Username to use to connect to the database.
- -db_pw
-
Password to use to connect to the database.
- -db_table
-
The table inthe database where posts are stored. When omitted, defaults to posts.
- collect
-
Collect data from our database. The table where we fetch fields from must contain the following columns: title, author, subject, date, id, content.
AUTHOR
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
SEE ALSO
Babble::Document, Babble::Document::Collection, Babble::DataSource, DBI