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

set_config_datasource($self, $val)

Set the DBI datasource that will be used to connect. 'dbi:' is automatically added, see the documentation of DBI for more information.

set_config_username($self, $val)

Set the username used to connect to the database.

set_config_password($self, $val)

Set the password used to connect to the database.

finalize($self)

Check that plugin was correctly initialized. Try to connect to the database and create the table.

check_install_schema($self)

Create the needed table, if it doesn't exist. This requires the proper privileges to the database.

load_privatestorage($self, $user, $element)

Load the element $element for $user from memory.

store_privatestorage($self, $user, $element, $content)

Store $content for $element and $user in memory.

NAME

DJabberd::Plugin::PrivateStorage::DBI - implement private storage, stored in DBI backend

SYNOPSIS

<Plugin DJabberd::Plugin::PrivateStorage::DBI>
    Datasource DBI:mysql:database=djabberd;host=localhost
    Username test
    Password test
</Plugin>

DESCRIPTION

This plugin is derived from DJabberd::Plugin::PrivateStorage. It implement a backend for private storage in a DBI compliant database. A table name called private_storage will be created if it doesn't exist, with a simple schema. It was tested with sqlite, but it should be ok on most DBMS ( if the DBMS support TEXT ).

COPYRIGHT

This module is Copyright (c) 2006 Michael Scherer All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

WARRANTY

This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.

AUTHORS

Michael Scherer <misc@zarb.org>