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


Net-Server-Framework documentation  | view source Contained in the Net-Server-Framework distribution.

Index


NAME

Top

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

VERSION

Top

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

SYNOPSIS

Top

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

Top

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

Top

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

Top

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

BUGS AND LIMITATIONS

Top

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

AUTHOR

Top

Lenz Gschwendtner ( <lenz@springtimesoft.com> )

LICENCE AND COPYRIGHT

Top


Net-Server-Framework documentation  | view source Contained in the Net-Server-Framework distribution.