AtteanX/Store/Simple.pm

filter: Statementstmt 97.6% 41 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 92.3% 12 / 13 Podpod 100% 1 / 1 totaltotal 96.4% 54 / 56 CC 1 SCAR 0.1
CC
1
Cov
98%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AtteanX/SPARQL/Token.pm ↑ Summary Test/Attean/StoreCleanup.pm »
1 =head1 NAME
2  
3 AtteanX::Store::Simple - Simple, unindexed, in-memory RDF store
4  
5 =head1 VERSION
6  
7 This document describes AtteanX::Store::Simple version 0.040
8  
9 =head1 SYNOPSIS
10  
11 use AtteanX::Store::Simple;
12  
13 =head1 DESCRIPTION
14  
15 AtteanX::Store::Simple provides an in-memory quad-store.
16  
17 =cut
18  
19 1 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 1 package AtteanX::Store::Simple 0.040 {
23 1 ▶ use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶ use Type::Tiny::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶ use Types::Standard qw(Int ArrayRef HashRef ConsumerOf InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶ use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶ use Set::Scalar;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶ use Digest::SHA;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶ use List::Util qw(first);
Subroutine BEGIN: called CC=1 SCAR=0.0
30 1 ▶ use Scalar::Util qw(refaddr reftype blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
31 1 ▶ use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 1 with 'Attean::API::QuadStore', 'Attean::API::RDFStarStore';
34  
35 =head1 METHODS
36  
37 Beyond the methods documented below, this class inherits methods from the
38 L<Attean::API::QuadStore> class.
39  
40 =over 4
41  
42 =item C<< new ( quads => \@quads ) >>
43  
44 Returns a new memory-backed storage object.
45  
46 =cut
47  
48 0 ▶ has quads => (is => 'rw', isa => ArrayRef[ConsumerOf['Attean::API::Quad']], default => sub { [] });
Subroutine __ANON__: not called CC=1 SCAR=1.2
49  
50 =item C<< get_quads ( $subject, $predicate, $object, $graph ) >>
51  
52 Returns a stream object of all statements matching the specified subject,
53 predicate and objects. Any of the arguments may be undef to match any value.
54  
55 =cut
56  
57 22 ▶ sub get_quads {
Subroutine get_quads: called CC=1 SCAR=0.0
Pod documented
58 22 my $self = shift;
59 22 my @nodes = @_;
60 22 my $quads = $self->quads;
61 22 my $iter = Attean::ListIterator->new( values => $quads, item_type => 'Attean::API::Quad' );
62 22 return $iter->matching_pattern(@nodes);
63 }
64  
65 }
66  
67 1 1;
68  
69 __END__
« AtteanX/SPARQL/Token.pm ↑ Summary Test/Attean/StoreCleanup.pm »