line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::Zotero::DB::Library; |
2
|
|
|
|
|
|
|
$Biblio::Zotero::DB::Library::VERSION = '0.003'; |
3
|
12
|
|
|
12
|
|
69
|
use strict; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
416
|
|
4
|
12
|
|
|
12
|
|
67
|
use warnings; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
291
|
|
5
|
12
|
|
|
12
|
|
65
|
use Moo; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
79
|
|
6
|
12
|
|
|
12
|
|
12569
|
use Biblio::Zotero::DB::Library::Trash; |
|
12
|
|
|
|
|
43
|
|
|
12
|
|
|
|
|
392
|
|
7
|
12
|
|
|
12
|
|
8185
|
use Biblio::Zotero::DB::Library::Unfiled; |
|
12
|
|
|
|
|
40
|
|
|
12
|
|
|
|
|
2877
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has _db => ( is => 'ro', weak_ref => 1 ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub collections { |
12
|
2
|
|
|
2
|
1
|
13134
|
my $self = shift; |
13
|
2
|
|
|
|
|
72
|
$self->_db->schema->resultset('Collection'); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has name => ( is => 'ro', default => sub { 'My Library' } ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub items { |
19
|
1
|
|
|
1
|
1
|
982
|
my $self = shift; |
20
|
1
|
|
|
|
|
10
|
my $schema = $self->_db->schema; |
21
|
1
|
|
|
|
|
61055
|
$schema->resultset('StoredItem') |
22
|
|
|
|
|
|
|
->with_item_attachment_resultset('StoredItemAttachment') |
23
|
|
|
|
|
|
|
->_toplevel_items; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub trash { |
27
|
2
|
|
|
2
|
1
|
10871
|
my $self = shift; |
28
|
2
|
|
|
|
|
45
|
Biblio::Zotero::DB::Library::Trash->new( _db => $self->_db ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub unfiled { |
32
|
2
|
|
|
2
|
1
|
4965
|
my $self = shift; |
33
|
2
|
|
|
|
|
41
|
Biblio::Zotero::DB::Library::Unfiled->new( _db => $self->_db ); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |