If we have a DBD::Gofer middleware feature then it would be helpful to add a new passthrough (or "passthru") transport. This would be based on the null transport, but without the serialization/deserialization, i.e. something as simple as:

   package DBD::Gofer::Transport::passthrough;

   #   $Id: null.pm 10087 2007-10-16 12:42:37Z timbo
$ #
   #   Copyright (c) 2007, Tim Bunce,
Ireland #
   #   You may distribute under the terms of either the GNU General
Public
   #   License or the Artistic License, as specified in the Perl README
file.

   use strict;
   use warnings;

   use base qw(DBD::Gofer::Transport::Base);

   use DBI::Gofer::Execute;

   our $VERSION = sprintf("0.%06d", q$Revision: 10087 $ =~ /(\d+)/o);

   my $executor = DBI::Gofer::Execute->new();

   sub transmit_request_by_transport {
       my ($self, $request) = @_;
       return $executor->execute_request( $request );
   }

   1;

This would be suitable for middleware modules to wrap.

Andrew

Reply via email to