Man pages sections > man3 > Data::ObjectDriver::Driver::Multiplexer

Data::ObjectDriver::Driver::Multiplexer - Multiplex multiple partitioned drivers

Data::ObjectDriver::Driver::Multiplexer(3pm) User Contributed Perl Documentation Data::ObjectDriver::Driver::Multiplexer(3pm)

NAME

Data::ObjectDriver::Driver::Multiplexer - Multiplex multiple partitioned drivers

SYNOPSIS

    package MappingTable;
    use Foo;
    use Bar;
    my $foo_driver = Foo->driver;
    my $bar_driver = Bar->driver;
    __PACKAGE__->install_properties({
        columns => [ qw( foo_id bar_id value ) ],
        primary_key => 'foo_id',
        driver => Data::ObjectDriver::Driver::Multiplexer->new(
            on_search => {
                foo_id => $foo_driver,
                bar_id => $bar_driver,
            },
            on_lookup => $foo_driver,
            drivers => [ $foo_driver, $bar_driver ],
        ),
    });

DESCRIPTION

Data::ObjectDriver::Driver::Multiplexer associates a set of drivers to a particular class. In practice, this means that all INSERTs and DELETEs are propagated to all associated drivers (for example, all associated databases or tables in a database), and that SELECTs are sent to the appropriate multiplexed driver, based on partitioning criteria.
Note that this driver has the following limitations currently:
1. It's very experimental.
2. It's very experimental.
3. IT'S VERY EXPERIMENTAL.
4. This documentation you're reading is incomplete. the api is likely to evolve
2017-09-30 perl v5.26.0