Line | |
---|
1 | package Sophie::Base::Result::RpmsChangelog; |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | use base qw(DBIx::Class::Core); |
---|
6 | |
---|
7 | __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); |
---|
8 | |
---|
9 | __PACKAGE__->table('rpms'); |
---|
10 | __PACKAGE__->add_columns(qw/name text time/); |
---|
11 | #__PACKAGE__->set_primary_key(qw/pkgid/); |
---|
12 | #__PACKAGE__->has_many(Rpmfile => 'Sophie::Base::Result::RpmFile', 'pkgid'); |
---|
13 | #__PACKAGE__->has_many(Deps => 'Sophie::Base::Result::Deps', 'pkgid'); |
---|
14 | #__PACKAGE__->has_many(Files => 'Sophie::Base::Result::Files', 'pkgid'); |
---|
15 | #__PACKAGE__->has_many(Tags => 'Sophie::Base::Result::Tags', 'pkgid'); |
---|
16 | |
---|
17 | __PACKAGE__->result_source_instance->is_virtual(1); |
---|
18 | |
---|
19 | __PACKAGE__->result_source_instance->view_definition(q[ |
---|
20 | select |
---|
21 | rpmquery(header, 'changelogname') as name, |
---|
22 | rpmquery(header, 'changelogtext') as text, |
---|
23 | rpmquery(header, 'changelogtime') as time |
---|
24 | from rpms |
---|
25 | where pkgid = ? |
---|
26 | ]); |
---|
27 | |
---|
28 | |
---|
29 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.