Commit | Line | Data |
ea2e61bf |
1 | package Actor; |
2 | |
3 | BEGIN { unshift @INC, './t/testlib'; } |
4 | |
5 | use strict; |
6 | use warnings; |
7 | |
8 | use base 'DBIx::Class::Test::SQLite'; |
9 | |
10 | __PACKAGE__->set_table('Actor'); |
11 | |
12 | __PACKAGE__->columns(Primary => 'id'); |
13 | __PACKAGE__->columns(All => qw/ Name Film Salary /); |
14 | __PACKAGE__->columns(TEMP => qw/ nonpersistent /); |
15 | __PACKAGE__->add_constructor(salary_between => 'salary >= ? AND salary <= ?'); |
16 | |
17 | sub mutator_name { "set_$_[1]" } |
18 | |
19 | sub create_sql { |
20 | return qq{ |
21 | id INTEGER PRIMARY KEY, |
22 | name CHAR(40), |
23 | film VARCHAR(255), |
24 | salary INT |
25 | } |
26 | } |
27 | |
28 | 1; |
29 | |