/[Frey]/trunk/lib/Reblog/Feeds.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/lib/Reblog/Feeds.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 991 - (hide annotations)
Sat Jan 10 23:29:38 2009 UTC (15 years, 4 months ago) by dpavlin
File size: 830 byte(s)
Frey::Class::Refactor::Modify Frey::Collection -> Frey::ORM::Collection
1 dpavlin 191 package Reblog::Feeds;
2    
3     use strict;
4     use warnings;
5    
6     use Reblog::Schema;
7     use Fey::ORM::Table;
8    
9     use Data::Dump qw/dump/;
10    
11     my $schema = Reblog::Schema->Schema;
12    
13     sub collection_table { 'feeds' };
14     my $feeds_table = $schema->table( collection_table );
15     has_table( $feeds_table );
16 dpavlin 991 with 'Frey::ORM::Collection';
17 dpavlin 191
18     my $items_t = $schema->table( 'items' );
19    
20     =for buggy
21     my $select_items = Reblog::Schema->Schema->SQLFactoryCrass()->new_select
22     ->select( $items_t )
23     ->from( $items_t )
24     ->where( $items_t->column('feed_id'), '=', Fey::Placeholder->new() )
25     # ->order_by( $items_t->column('id'), 'ASC' )
26     ->limit(5)
27     ;
28    
29     has_many 'items' => (
30     isa => 'Reblog::Items',
31     select => $select_items,
32     bind_params => sub { $_[0]->id() },
33     );
34    
35     =cut
36    
37     has_many 'items' => ( table => $items_t );
38    
39     #warn dump( map { $_->name } $users_table->columns );
40    
41     1;

  ViewVC Help
Powered by ViewVC 1.1.26