Added support for handling Class::DBI::Column in CDBICompat
[dbsrgits/DBIx-Class.git] / t / cdbi / testlib / ColumnObject.pm
1 package # Hide from PAUSE
2     ColumnObject;
3
4 use strict;
5 use warnings;
6
7 use base 'DBIC::Test::SQLite';
8 use Class::DBI::Column;
9
10 __PACKAGE__->set_table('column_object');
11
12 __PACKAGE__->columns( Primary => 'id' );
13 __PACKAGE__->columns( All => (
14   'id',
15   'columna',
16   'columnb',
17   Class::DBI::Column->new('columna' => {accessor => 'columna_as_read'}),
18   Class::DBI::Column->new('columnb' => {mutator  => 'columnb_as_write'}),
19 ));
20
21 sub create_sql {
22   return qq{
23     id       INTEGER PRIMARY KEY,
24     columna  VARCHAR(20),
25     columnb  VARCHAR(20)
26   }
27 }
28
29 1;