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

Lim::Plugin::Zonalizer::DB - The database interface for Zonalizer

SYNOPSIS

package Lim::Plugin::Zonalizer::DB::MyDatabase;

use base qw(Lim::Plugin::Zonalizer::DB);

METHODS

$db = Lim::Plugin::Zonalizer::DB->new (...)

Create a new database object, arguments are passed to the backend specific database module via Init.

$db->Init (...)

Called upon creation of the object, arguments should be handled in the backend specific database module.

$db->Destroy

Called upon destruction of the object.

$name = $db->Name

Return the name of the module, must be overloaded.

$db->ReadAnalysis (parameter => value, ...)

Read analyze objects from the database and return them via the callback provided.

Most arguments are passed through from API calls, see API documentation for details.

space => string

The space to read from, see Spaces in API documentation.

search => string
limit => number
sort => string
direction => string
after => id
before => id
cb => sub { my ($paging, @analysis) = @_; ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$paging

A hash reference with details about the pagination or undef if no pagination is available (i.e. not enough data).

previous

The identifier for the previous object.

next

The identifier for the next object.

@analysis

An array with all the analyze objects found.

$db->DeleteAnalysis

Delete all analysis from the database.

space => string

The space to delete in, see Spaces in API documentation.

cb => sub { my ($deleted_analysis) = @_; ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$deleted_analysis

The number of delete analyze objects.

$db->CreateAnalyze (parameter => value, ...)

Create a new analyze object in the database.

space => string

The space to create in, see Spaces in API documentation.

analyze => hash

The analyze object to create, see API documentation for details.

cb => sub { my ($analyze) = @_; ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$analyze

The analyze object created.

$db->ReadAnalyze (parameter => value, ...)

Read a analyze object from the database and return it via the callback provided.

space => string

The space to read from, see Spaces in API documentation.

id => id

The analyze identifier to read.

cb => sub { my ($analyze) = @_; ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$analyze

The analyze object read.

$db->UpdateAnalyze (parameter => value, ...)

Update a analyze object in the database.

space => string

The space to update in, see Spaces in API documentation.

analyze => hash

The updated analyze object, this object must have been read from the database.

cb => sub { my ($analyze) = @_; ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$analyze

The updated analyze object.

$db->DeleteAnalyze (parameter => value, ...)

Delete a analyze object from the database.

space => string

The space to delete in, see Spaces in API documentation.

id => id

The analyze identifier to delete.

cb => sub { ... }

The callback subrutin that will be called upon success or failure, if there was an error then $@ will be set with the error.

$db->ValidateAnalyze ($analyze)

Validate a analyze object and confess if there are any problems.

$analyze

The analyze object to validate.

$db->ValidateResults ($results)

Validate a set of result objects and confess if there are any problems.

$results

An array ref with the result objects to validate.

$db->ValidateResult ($result)

Validate a result object and confess if there are any problems.

$result

The result object to validate.

AUTHOR

Jerry Lundström, <lundstrom.jerry@gmail.com>

BUGS

Please report any bugs or feature requests to https://github.com/jelu/lim-plugin-zonalizer/issues.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Lim::Plugin::Zonalizer::DB

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2015-2016 Jerry Lundström Copyright 2015-2016 IIS (The Internet Foundation in Sweden)

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.