BusyBird::StatusStorage::SQLite - status storage in SQLite database
use BusyBird; use BusyBird::StatusStorage::SQLite; my $storage = BusyBird::StatusStorage::SQLite->new( path => 'path/to/storage.sqlite3', max_status_num => 5000 ); busybird->set_config( default_status_storage => $storage );
This is an implementation of BusyBird::StatusStorage interface. It stores statuses in an SQLite database.
This storage is synchronous, i.e., all operations block the thread and the callback is called before the method returns.
The constructor.
Fields in %args are:
%args
path
Path string to the SQLite database file. If ':memory:' is specified, it creates a temporary in-memory storage.
':memory:'
max_status_num
The maximum number of statuses the storage guarantees to store per timeline. You cannot expect a timeline to keep more statuses than this number.
hard_max_status_num
The hard limit max number of statuses the storage is able to store per timeline. When the number of statuses in a timeline exceeds this number, it deletes old statuses from the timeline so that the timeline has max_status_num statuses.
vacuum_on_delete
The status storage automatically executes VACUUM every time this number of statuses are deleted from the storage. The number is for the whole storage, not per timeline.
VACUUM
If you set this option less than or equal to 0, it never VACUUM itself.
BusyBird::StatusStorage::SQLite implements all object methods in BusyBird::StatusStorage. In addition to it, it has the following methods.
Executes SQL VACUUM on the database.
Returns all timeline names in the $storage.
$storage
Toshio Ito <toshioito [at] cpan.org>
<toshioito [at] cpan.org>
To install BusyBird, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BusyBird
CPAN shell
perl -MCPAN -e shell install BusyBird
For more information on module installation, please visit the detailed CPAN module installation guide.