Take me over?
NAME
KiokuDB::Cmd::Command::Load - Load database dumps
SYNOPSIS
# command line API
# dump whole database to foo.yml sequentially
% kioku load --verbose --file foo.yml --format yaml --clear --dsn bdb-gin:dir=data/
# programmatic API
use KiokuDB::Cmd::Command::Load;
my $loader = KiokuDB::Cmd::Command::Load->new(
    backend => $backend,
    formatter => sub { ... },
    input_handle => $fh,
);
$dumper->run;
DESCRIPTION
This class loads dumps created by KiokuDB::Cmd::Command::Dump.
Entries will be read sequentially from input_handle, deserialized, and inserted into the database.
If the backend supports KiokuDB::Backend::Role::TXN then the load is performed in a single transaction.
COMMAND LINE API
This class uses MooseX::Getopt to provide a command line api.
The command line options map to the class attributes.
METHODS
- new_with_options
 - 
Provided by MooseX::Getopt. Parses attributes init args from
@ARGV. - run
 - 
Performs the actual load.
 
ATTRIBUTES
- dsn
 - backend
 - 
The backend to be dumped.
dsnis a string and thus can be used on the command line.backendis defined in terms ofdsnif it isn't provided. - format
 - formatter
 - 
formatis one ofyaml,storableorjson, defaulting toyaml.formatteris a code reference that is provided with a file handle and should return at least one entry object.It is applied to the handle repeatedly until no more entries are returned.
 - clear
 - 
If set, KiokuDB::Backend::Role::Clear's interface will be used to wipe the database before loading.
 - file
 - input_handle
 - 
input_handleis where entries will be read from.If it isn't provided and then
filewill be opened for reading.If
fileisn't providedSTDINwill be used. - verbose
 - 
If enabled causes progress information to be printed to
STDERR.