NAME

Data::Beacon::Collection::DBI - Collection of BEACONs in a database

DESCRIPTION

This class is a subclass of Data::Beacon::Collection.

METHODS

new ( ... )

Create a new Beacon collection in a database.

connected

Return whether a database connection has been established.

get ( $name )

Get a named Beacon as Data::Beacon::DBI object or undef.

insert ( $name, $beacon )

Insert a named Beacon (Data::Beacon). This method works as 'upsert', that means you can replace or add a Beacon. Returns the inserted Beacon as Data::Beacon::DBI or undef on error.

remove ( $name )

Remove a named Beacon. Returns true if an existing Beacon has been removed.

list ( [ %meta ] )

List the names of all namad Beacons. Optionally you can ask for specific meta fields that must match (not implemented yet).

INTERNAL METHODS

lasterror

Returns the last parsing error message (if any).

errorcount

Returns the number of errors or zero.

_handle_error ( $msg )

Internal error handler that calls a custom error handler, increases the error counter and stores the last error.

AUTHOR

Jakob Voss <jakob.voss@gbv.de>

LICENSE

Copyright (C) 2010 by Verbundzentrale Goettingen (VZG) and Jakob Voss

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

In addition you may fork this library under the terms of the GNU Affero General Public License.