/[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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1013 by dpavlin, Sat Jan 10 23:29:38 2009 UTC revision 1014 by dpavlin, Sun Jan 25 12:57:28 2009 UTC
# Line 3  package Reblog::Feeds; Line 3  package Reblog::Feeds;
3  use strict;  use strict;
4  use warnings;  use warnings;
5    
6  use Reblog::Schema;  use base 'DBIx::Class';
 use Fey::ORM::Table;  
7    
8  use Data::Dump qw/dump/;  __PACKAGE__->load_components("Core");
9    __PACKAGE__->table("feeds");
10  my $schema = Reblog::Schema->Schema;  __PACKAGE__->add_columns(
11      "id",
12  sub collection_table { 'feeds' };    { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
13  my $feeds_table = $schema->table( collection_table );    "url",
14  has_table( $feeds_table );    {
15  with 'Frey::ORM::Collection';      data_type => "TEXT",
16        default_value => undef,
17  my $items_t = $schema->table( 'items' );      is_nullable => 0,
18        size => 65535,
19  =for buggy    },
20  my $select_items = Reblog::Schema->Schema->SQLFactoryCrass()->new_select    "title",
21                  ->select( $items_t )    { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 255 },
22                  ->from( $items_t )    "link",
23                  ->where( $items_t->column('feed_id'), '=', Fey::Placeholder->new() )    {
24  #               ->order_by( $items_t->column('id'), 'ASC' )      data_type => "VARCHAR",
25                  ->limit(5)      default_value => undef,
26          ;      is_nullable => 1,
27        size => 255,
28  has_many 'items' => (    },
29          isa => 'Reblog::Items',    "description",
30          select => $select_items,    {
31          bind_params => sub { $_[0]->id() },      data_type => "VARCHAR",
32        default_value => undef,
33        is_nullable => 1,
34        size => 255,
35      },
36      "xml",
37      {
38        data_type => "TEXT",
39        default_value => undef,
40        is_nullable => 1,
41        size => 65535,
42      },
43      "timestamp",
44      {
45        data_type => "TIMESTAMP",
46        default_value => "CURRENT_TIMESTAMP",
47        is_nullable => 0,
48        size => 14,
49      },
50      "insert_timestamp",
51      {
52        data_type => "TIMESTAMP",
53        default_value => "0000-00-00 00:00:00",
54        is_nullable => 0,
55        size => 14,
56      },
57  );  );
58    __PACKAGE__->set_primary_key("id");
59    
 =cut  
60    
61  has_many 'items' => ( table => $items_t );  # Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-01-24 17:48:45
62    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Tv+IMxgng1+BpjFN0Zc8bw
63    
 #warn dump( map { $_->name } $users_table->columns );  
64    
65    # You can replace this text with custom content, and it will be preserved on regeneration
66  1;  1;

Legend:
Removed from v.1013  
changed lines
  Added in v.1014

  ViewVC Help
Powered by ViewVC 1.1.26