NAME

Net::Z3950::DBIServer - Generic Z39.50-to-Relational Database gateway module

SYNOPSIS

use Net::Z3950::DBIServer;
$handle = new Net::Z3950::DBIServer($configFile);
$handle->launch_server("myAppName", @yazOptions);

DESCRIPTION

This module provides a generic, configurable gateway between the Z39.50 information retrieval protocol and pretty much any SQL database you can think of. When the DBIServer server module is running, you can connect your favourite Z39.50 client to it, and issue searches. The gateway receives Z39.50 searches, translates them into SQL queries, executes them against a relational database, translates the resulting rows of SQL tables into Z39.50 records, and sends them back out to the client.

The mappings from Z39.50 concepts to SQL and back again are controlled by tables described in Net::Z3950::DBIServer::Spec

METHODS

new()

$handle = new Net::Z3950::DBIServer($configFile);

Creates and returns a new Z39.50-SQL gateway server, configured to translate back and forth between Z39.50 and SQL concepts by the named configuration file. If the file is invalid, error messages are printed to the standard error stream, and an undefined value is returned.

A second, argument may optionally be provided. If it is true, then zSQLgate no-ops, producing logs but not searching in, or even connecting to, the backend database.

launch_server()

$handle->launch_server("myAppName", @yazOptions);

Launches the Z39.50-SQL gateway server $handle, using the specified string as an identifier in any log messages, and with its Z39.50 server behaviour controlled by @yazOptions as described in the YAZ manual at http://www.indexdata.com/yaz/doc/server.invocation.php and also in Net::Z3950::DBIServer::Run

This method never returns unless an error occurs.

AUTHOR

Mike Taylor <mike@miketaylor.org.uk>

First version Saturday 2nd February 2002.

SEE ALSO

Net::Z3950::DBIServer::Spec describes the format of the configuration files which specify this module's behaviour.

Net::Z3950::DBIServer::Config describes the API to the configuration file parser.

Net::Z3950::DBIServer::ResultSet describes the API to the internal representation of result sets.

Net::Z3950::DBIServer::GRS1 describes the API to the GRS1 record formatter.

Net::Z3950::DBIServer::XML describes the API to the XML record formatter.

Net::Z3950::DBIServer::Exception describes the simple exception objects used to represent Bib-1 diagnostics.