Lenz Gschwendtner > Net-Server-Framework > Net::Server::Framework::DB

Download:
Net-Server-Framework-1.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 1.25   Source  

NAME ^

Net::Server::Framework::DB - DBI wrapper for Net::Server::Framework based daemons

VERSION ^

This documentation refers to Net::Server::Framework::Auth version 1.25.

SYNOPSIS ^

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 
    } );

DESCRIPTION ^

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.

BASIC METHODS ^

The commands accepted by the lib are:

dbconnect

Connect to a database. Supported databases in the moment are SQLite (default) MySQL and PostgreSQL. Adding more databases is straight forward.

get

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.

put

This inserts data into the database

do

All stuff that is not an insert or an update goes here. Predefined queries as in get.

CONFIGURATION AND ENVIRONMENT ^

The library needs a working etc/db.conf file.

BUGS AND LIMITATIONS ^

There are no known bugs in this module. Please report problems to Lenz Gschwendtner ( <lenz@springtimesoft.com> ) Patches are welcome.

AUTHOR ^

Lenz Gschwendtner ( <lenz@springtimesoft.com> )

LICENCE AND COPYRIGHT ^

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.

syntax highlighting: