Ambrosia

 view release on metacpan or  search on metacpan

lib/Ambrosia/DataProvider/ResourceDriver.pm  view on Meta::CPAN


    return scalar @{$_[0]->handler->{$table}};
}

sub limit
{
}

sub skip
{
}

sub insert
{
    die 'Cannot insert. Resource read only';
}

sub update
{
    die 'Cannot update. Resource read only';
}

sub delete
{
    die 'Cannot delete. Resource read only';
}

1;

__END__

=head1 NAME

Ambrosia::DataProvider::ResourceDriver - a class realize Ambrosia::DataProvider::BaseDriver and provide connection to resources storage.

=head1 VERSION

version 0.010

=head1 SYNOPSIS

    use Ambrosia::DataProvider;
    my $confDS = {
        Resource => [
            {
                engine_name => 'Resource::Hash',
                source_name  => 'application_name',
                engine_params => {
                    path => $PATH_ROOT . '/Application/Resource/Resources.pm'
                }
            },
        ]
    };

    instance Ambrosia::Storage(application_name => $confDS);
    Ambrosia::DataProvider::assign 'application_name';


=head1 DESCRIPTION

C<Ambrosia::DataProvider::DBIDriver> is a class realize Ambrosia::DataProvider::BaseDriver and provide connection to data bases throw DBI.

For more information see:

=over

=item L<Ambrosia::DataProvider::Engine::Resource::Hash>

=back

=head1 SUBROUTINES/METHODS

=head2 cache

Returns cache.

=head2 open_connection (Wraper. Translate request to engine.)

Opens a connection. Returns a handler.

=head2 close_connection (Wraper. Translate request to engine.)

Closes a connection and clears a cache.

=head2 begin_transaction (Wraper. Translate request to engine.)

Begins a transaction and initializes a cache

=head2 save_transaction (Wraper. Translate request to engine.)

Saves a transaction.

=head2 cancel_transaction (Wraper. Translate request to engine.)

Canceled a transaction (rollback) and clears a cache.

=head2 CQL

Returns an adapter for L<Ambrosia::QL> that can translate CQL to Resource request.

=cut

=head1 DEPENDENCIES

L<Ambrosia::CQL::toResource>;
L<Ambrosia::Util::Container>;

=head1 THREADS

Not tested.

=head1 BUGS

Please report bugs relevant to C<Ambrosia> to <knm[at]cpan.org>.

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2010-2012 Nickolay Kuritsyn. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.



( run in 0.553 second using v1.01-cache-2.11-cpan-ceb78f64989 )