/[Frey]/trunk/lib/Strix/User.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

Contents of /trunk/lib/Strix/User.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61 - (show annotations)
Tue Jul 8 12:20:25 2008 UTC (15 years, 9 months ago) by dpavlin
File size: 618 byte(s)
how to dump column names
1 package Strix::User;
2
3 use Strix::Schema;
4 use Fey::ORM::Table;
5
6 use Data::Dump qw/dump/;
7
8 my $users_table = Strix::Schema->Schema()->table('users');
9
10 has_table( $users_table );
11
12 my $select =
13 Strix::Schema->SQLFactoryClass()->new_select()
14 ->select( $users_table )
15 ->from( $users_table )
16 # ->where( $users_table->column('parent_message_id'), '=', Fey::Placeholder->new() )
17 ->order_by( $users_table->column('id'), 'DESC' )
18 ->limit(3)
19 ;
20
21
22 has_many 'rows' => (
23 table => $users_table,
24 select => $select,
25 # bind_params => sub { $_[0]->message_id() },
26 );
27
28 #warn dump( map { $_->name } $users_table->columns );
29
30 1;

  ViewVC Help
Powered by ViewVC 1.1.26