The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Hailo::Storage::DBD::SQLite - A storage backend for Hailo using DBD::SQLite

SYNOPSIS

As a module:

 my $hailo = Hailo->new(
     train_file    => 'hailo.trn',
     storage_class => 'SQLite',
     storage_args  => {
         cache_size > 102400, # 100MB page cache
     },
 );

From the command line:

 hailo --train hailo.trn --storage SQLite --storage-args cache_size=102400

See Hailo's documentation for other non-MySQL specific options.

DESCRIPTION

This backend maintains information in an SQLite database. It is the default storage backend.

ATTRIBUTES

storage_args

This is a hash reference which can have the following keys:

'cache_size', the size of the page cache used by SQLite. See SQLite's documentation for more information. Setting this value higher than the default can be beneficial, especially when disk IO is slow on your machine.

'in_memory', when set to a true value, Hailo behaves much like MegaHAL. The entire database will be kept in memory, and only written out to disk when the save|Hailo/save method is called and/or when the Hailo object gets destroyed (unless you disabled save_on_exit). This is turned on by default.

AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>

Hinrik Örn Sigurðsson, hinrik.sig@gmail.com

LICENSE AND COPYRIGHT

Copyright 2010 Ævar Arnfjörð Bjarmason and Hinrik Örn Sigurðsson

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.