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.
$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.
Michael Zedeler <firstname.lastname@example.org>
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.