Bot-IRC
view release on metacpan or search on metacpan
lib/Bot/IRC/Store/SQLite.pm view on Meta::CPAN
# 6 = DBD_SQLITE_STRING_MODE_UNICODE_STRICT
%{ $self->{attr} // {} },
},
) or die "$@\n";
my $pragma = {
encoding => '"UTF-8"',
foreign_keys => 'ON',
journal_mode => 'DELETE',
recursive_triggers => 'ON',
synchronous => 'FULL',
temp_store => 'MEMORY',
%{ $self->{pragma} // {} },
};
$dbh->do( 'PRAGMA ' . $_ . ' = ' . $pragma->{$_} ) for ( keys %$pragma );
$dbh->do(q{
CREATE TABLE IF NOT EXISTS bot_store (
bot_store_id INTEGER PRIMARY KEY,
namespace TEXT,
key TEXT,
lib/Bot/IRC/Store/SQLite.pm view on Meta::CPAN
sqlite_see_if_its_a_number => 1,
sqlite_defensive => 1,
sqlite_extended_result_codes => 1,
sqlite_string_mode => 6,
},
pragma => {
encoding => '"UTF-8"',
foreign_keys => 'ON',
journal_mode => 'DELETE',
recursive_triggers => 'ON',
synchronous => 'FULL',
temp_store => 'MEMORY',
},
},
},
)->run;
=head1 DESCRIPTION
This L<Bot::IRC> plugin provides a persistent storage mechanism with a SQLite
database file. By default, it's the "store.sqlite" file, but this can be changed
( run in 0.774 second using v1.01-cache-2.11-cpan-9581c071862 )