Net::Server::Framework::DB - DBI wrapper for Net::Server::Framework based daemons
This documentation refers to Net::Server::Framework::Auth version 1.25.
Net::Server::Framework::Auth
A typical invocation looks like this:
my $dbh = Net::Server::Framework::DB::dbconnect($DB); my $res = Net::Server::Framework::DB::get( { dbh => $dbh, key => 'host', term => $service } );
This is a lib that is used to collect all SQL statements from one application. Typically you end up with one DB.pm for many daemons that are used in one project. The DB.pm provided with the package covers only the internal functions needed by the platform itself like registry and queue. The syntax is really minimal and that was the purpose. Small easy queries are fast for high load environments.
The commands accepted by the lib are:
Connect to a database. Supported databases in the moment are SQLite (default) MySQL and PostgreSQL. Adding more databases is straight forward.
Define your queries here. This is the central place for SQL in a application written in Net::Server::Framework. All queries have an identifier and are limited to a maximum of three dimensions in the output hash.
Net::Server::Framework
This inserts data into the database
All stuff that is not an insert or an update goes here. Predefined queries as in get.
The library needs a working etc/db.conf file.
There are no known bugs in this module. Please report problems to Lenz Gschwendtner ( <lenz@springtimesoft.com> ) Patches are welcome.
Lenz Gschwendtner ( <lenz@springtimesoft.com> )
Copyright (c) 2007 Lenz Gschwerndtner ( <lenz@springtimesoft.comn> ) All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Net::Server::Framework, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Server::Framework
CPAN shell
perl -MCPAN -e shell install Net::Server::Framework
For more information on module installation, please visit the detailed CPAN module installation guide.