NAME
DBI::Gofer::Execute - Executes Gofer requests and returns Gofer responses
SYNOPSIS
$executor = DBI::Gofer::Execute->new( { ...config... });
$response = $executor->execute_request( $request );
DESCRIPTION
Accepts a DBI::Gofer::Request object, executes the requested DBI method calls, and returns a DBI::Gofer::Response object.
Any error, including any internal 'fatal' errors are caught and converted into a DBI::Gofer::Response object.
This module is usually invoked by a 'server-side' Gofer transport module. They usually have names in the "DBI::Gofer::Transport::*
" namespace. Examples include: DBI::Gofer::Transport::stream and DBI::Gofer::Transport::mod_perl.
CONFIGURATION
check_request_sub
If defined, it must be a reference to a subroutine that will 'check' the request.
The subroutine can either return the original request object or die with a suitable error message (which will be turned into a Gofer response).
It can also construct and return a new request that should be executed instead of the original request.
forced_connect_dsn
If set, this DSN is always used instead of the one in the request.
default_connect_dsn
If set, this DSN is used if forced_connect_dsn
is not set and the request does not contain a DSN itself.
forced_connect_attributes
A reference to a hash of connect() attributes. Individual attributes in forced_connect_attributes
will take precedence over corresponding attributes in the request.
default_connect_attributes
A reference to a hash of connect() attributes. Individual attributes in the request take precedence over corresponding attributes in default_connect_attributes
.
max_cached_dbh_per_drh
If set, the loaded drivers will be checked to ensure they don't have more than this number of cached connections. There is no default value. This limit is not enforced for every request.
max_cached_sth_per_dbh
If set, all the cached statement handles will be cleared once the number of cached statement handles rises above this limit. The default is 1000.
forced_single_resultset
If true, then only the first result set will be fetched and returned in the response.
track_recent
If set, specifies the number of recent requests and responses that should be kept by the update_stats() method for diagnostics. See DBI::Gofer::Transport::mod_perl.
Note that this setting can significantly increase memory use. Use with caution.
DRIVER-SPECIFIC ISSUES
Gofer needs to know about any driver-private attributes that should have their values sent back to the client.
If the driver doesn't support private_attribute_info() method, and very few do, then the module fallsback to using some hard-coded details, if available, for the driver being used. Currently hard-coded details are available for the mysql, Pg, Sybase, and SQLite drivers.
AUTHOR
Tim Bunce, http://www.linkedin.com/in/timbunce
LICENCE AND COPYRIGHT
Copyright (c) 2007, Tim Bunce, Ireland. 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.