/[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 191 - (hide annotations)
Sun Sep 14 00:49:57 2008 UTC (15 years, 8 months ago) by dpavlin
File size: 825 byte(s)
access Reblog MySQL schema
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     with 'Frey::Collection';
17    
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