---
name: "Data::ObjectDriver::Driver::Multiplexer"
section: "3pm"
platform: "linux"
package: "libdata-objectdriver-perl"
version: "0.25-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Data::ObjectDriver::Driver::Multiplexer"
---

# Data::ObjectDriver::Driver::Multiplexer(3pm)

Multiplex multiple partitioned drivers

## 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
