DBIx::Class::StorageReadOnly - Can't insert and update and delete for DBIC


DBIx-Class-StorageReadOnly documentation  | view source Contained in the DBIx-Class-StorageReadOnly distribution.

Index


NAME

Top

DBIx::Class::StorageReadOnly - Can't insert and update and delete for DBIC

SYNOPSIS

Top

    __PACKAGE__->load_components(qw/
        StorageReadOnly
        PK::Auto
        Core
    /);

    # create connection and set readonly info
    @connection_info = (
        'dbi:mysql:test',
        'foo',
        'bar',
        {read_only => 1},
    );
    my $schema = $schema_class->connect(@connection_info);

    my $user = $schema->resultset('User')->search({name => 'nomaneko'});
    $user->update({name => 'gikoneko'}); # die. Can't update.

DESCRIPTION

Top

If you try to write it in read only DB, the exception is generated.

METHOD

Top

insert

update

delete

_search_readonly_info

BUGS AND LIMITATIONS

Top

No bugs have been reported.

AUTHOR

Top

Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>

LICENCE AND COPYRIGHT

Top


DBIx-Class-StorageReadOnly documentation  | view source Contained in the DBIx-Class-StorageReadOnly distribution.