Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
c6d74d3e |
2 | Actor; |
ea2e61bf |
3 | |
ea2e61bf |
4 | use strict; |
5 | use warnings; |
6 | |
97d61088 |
7 | use base 'DBIC::Test::SQLite'; |
ea2e61bf |
8 | |
9 | __PACKAGE__->set_table('Actor'); |
10 | |
11 | __PACKAGE__->columns(Primary => 'id'); |
12 | __PACKAGE__->columns(All => qw/ Name Film Salary /); |
13 | __PACKAGE__->columns(TEMP => qw/ nonpersistent /); |
14 | __PACKAGE__->add_constructor(salary_between => 'salary >= ? AND salary <= ?'); |
15 | |
7305f6f9 |
16 | # Disables the implicit autoinc-on-non-supplied-pk behavior |
17 | # (and the warning that goes with it) |
18 | # This is the same behavior as it was pre 0.082900 |
19 | __PACKAGE__->column_info('id')->{is_auto_increment} = 0; |
20 | |
05ccf064 |
21 | sub mutator_name_for { "set_$_[1]" } |
ea2e61bf |
22 | |
23 | sub create_sql { |
6a3bf251 |
24 | return qq{ |
25 | id INTEGER PRIMARY KEY, |
26 | name CHAR(40), |
8273e845 |
27 | film VARCHAR(255), |
6a3bf251 |
28 | salary INT |
29 | } |
ea2e61bf |
30 | } |
31 | |
32 | 1; |
33 | |