- NAME
- SYNOPSIS
- DESCRIPTION
- USAGE

- Note for HTML::Mason Users

- AUTHOR
- SEE ALSO

# NAME

DBD::SQLRelay - perl DBI driver for SQL Relay

# SYNOPSIS

use DBD::SQLRelay;

my $dbh = DBI -> connect ('dbi:SQLRelay:$dsn', $login, $password);

# DESCRIPTION

This module is a pure-Perl DBI binding to SQL Relay's native API. Connection string consists of following parts:

host=... default: localhost --- hostname of SQL Relay server;
port=... default: 9000 --- port number that SQL Relay server listens on;
tries=... default: 1 --- how much times do we try to connect;
retrytime=... default: 0 --- time (in seconds) between connect attempts;
debug=... default: 0 --- set it to 1 if you want to get some debug messages in stdout;

# USAGE

Once connected, DB handler works as usual (see DBI).

Don't ever try to share one SQLRelay connect by multiple scripts, for example, if you use Apache mod_perl. Every $dbh holds one of server connections, so call `disconnect()` directly at the end of every script and don't use Apache::DBI or SQLRelay will be deadlocked.

## Note for HTML::Mason Users

If you use the HTML::Mason manpage, your handler.pl sould look like this:

      ...

         {
           package HTML::Mason::Commands;
           use DBI;
           use vars qw($db);
         }

      ...

         sub handler {

           $HTML::Mason::Commands::dbh = DBI -> connect (...);

           my $status = $ah -> handle_request (...);

           $HTML::Mason::Commands::dbh -> disconnect;

           return $status;

         }

# AUTHOR

D. E. Ovsyanko, do@mobile.ru

Contributions by:

Erik Hollensbe <erik@hollensbe.org>

Tony Fleisher <tfleisher@musiciansfriend.com>

# SEE ALSO

http://www.firstworks.com