KiokuX::CouchDB::Role::View - query CouchDB views and get back live KiokuDB objects
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');
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.
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.
$view
$options
view
KiokuDB::Backend::CouchDB, AnyEvent::CouchDB.
http://github.com/mzedeler/kiokudb-backend-couchdb
Michael Zedeler <michael@zedeler.dk>
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.
2 POD Errors
The following errors were encountered while parsing the POD:
Unterminated L<...> sequence
Non-ASCII character seen before =encoding in 'Leasingbørsen.'. Assuming UTF-8
To install KiokuDB::Backend::CouchDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KiokuDB::Backend::CouchDB
CPAN shell
perl -MCPAN -e shell install KiokuDB::Backend::CouchDB
For more information on module installation, please visit the detailed CPAN module installation guide.