Michael Anton Dines Zedeler > KiokuDB-Backend-CouchDB-0.16 > KiokuX::CouchDB::Role::View

Download:
KiokuDB-Backend-CouchDB-0.16.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source  

NAME ^

KiokuX::CouchDB::Role::View - query CouchDB views and get back live KiokuDB objects

SYNOPSIS ^

    use KiokuX::CouchDB::Role::View;
    my $kioku = KiokuDB->connect( "couchdb:uri=http://127.0.0.1:5984/database" );
    apply_all_roles($kioku, 'KiokuX::CouchDB::Role::View');
    my $scope = $kioku->new_scope;
    my $result = $kioku->view('some/objects');

DESCRIPTION ^

This Moose role provides an extra method for a KiokuDB instance that enables it to query CouchDB views and instantiate replace any KiokuDB specific data with live objects wherever they are found.

Be warned: using this role will tie you to a non-standard interface that is only supported by the CouchDB backend for KiokuDB.

METHODS ^

view($view, $options)

The parameters $view and $options are passed straight to the view method of the underlying AnyEvent::CouchDB object. If the results contains KiokuDB entries or references, they are replaced with live objects that has been registered in the current KiokuDB scope.

SEE ALSO ^

KiokuDB::Backend::CouchDB, AnyEvent::CouchDB.

VERSION CONTROL ^

http://github.com/mzedeler/kiokudb-backend-couchdb

AUTHOR ^

Michael Zedeler <michael@zedeler.dk>

COPYRIGHT ^

    Copyright (c) 2010 Leasingbørsen. All rights reserved. This program
    is free software; you can redistribute it and/or modify it under 
    the same terms as Perl itself.
syntax highlighting: