KiokuDB/Backend/Role/Query.pm untested

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
search_filter
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2  
3 package KiokuDB::Backend::Role::Query;
4 use Moose::Role;
5  
6 use namespace::clean -except => 'meta';
7  
8 requires "search";
9  
10 sub search_filter {
11 my ( $self, $stream, @args ) = @_;
12 return $stream;
13 }
14  
15 __PACKAGE__
16  
17 __END__
18  
19 =pod
20  
21 =head1 NAME
22  
23 KiokuDB::Backend::Role::Query - Backend specific query API
24  
25 =head1 SYNOPSIS
26  
27 with qw(KiokuDB::Backend::Role::Query);
28  
29 sub search {
30 my ( $self, @args ) = @_;
31  
32 # return all entries in the root set matching @args (backend specific)
33 return Data::Stream::Bulk::Foo->new(...);
34 }
35  
36 =head1 DESCRIPTION
37  
38 This role is for backend specific searching. Anything that is not
39 L<KiokuDB::Backend::Role::Query::Simple> is a backend specific search, be it a
40 L<Search::GIN::Query>, or something else.
41  
42 The backend is expected to interpret the search arguments which are passed
43 through from L<KiokuDB/search> as is, and return a L<Data::Stream::Bulk> of
44 matching entries.
45  
46 =cut
47  
48