Test count_rs
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / Film.pm
1 package # hide from PAUSE 
2     Film;
3
4 use base 'DBIC::Test::SQLite';
5 use strict;
6
7 __PACKAGE__->set_table('Movies');
8 __PACKAGE__->columns('Primary',   'Title');
9 __PACKAGE__->columns('Essential', qw( Title ));
10 __PACKAGE__->columns('Directors', qw( Director CoDirector ));
11 __PACKAGE__->columns('Other',     qw( Rating NumExplodingSheep HasVomit ));
12
13 sub create_sql {
14         return qq{
15                 title                   VARCHAR(255),
16                 director                VARCHAR(80),
17                 codirector              VARCHAR(80),
18                 rating                  CHAR(5),
19                 numexplodingsheep       INTEGER,
20                 hasvomit                CHAR(1)
21   }
22 }
23
24 sub create_test_film { 
25         return shift->create({
26                 Title             => 'Bad Taste',
27                 Director          => 'Peter Jackson',
28                 Rating            => 'R',
29                 NumExplodingSheep => 1,
30         });
31 }
32
33 package DeletingFilm;
34
35 use base 'Film';
36 sub DESTROY { shift->delete }
37
38 1;
39