[Bast-commits] r5592 - DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Fri Feb 20 08:01:25 GMT 2009
Author: castaway
Date: 2009-02-20 08:01:25 +0000 (Fri, 20 Feb 2009)
New Revision: 5592
Added:
DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Year1999CDs.pm
Log:
Add missing views test file, oops
Added: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Year1999CDs.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Year1999CDs.pm (rev 0)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/Year1999CDs.pm 2009-02-20 08:01:25 UTC (rev 5592)
@@ -0,0 +1,32 @@
+package # hide from PAUSE
+ DBICTest::Schema::Year1999CDs;
+## Used in 104view.t
+
+use base 'DBIx::Class::Core';
+use DBIx::Class::ResultSource::View;
+
+__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
+
+__PACKAGE__->table('year1999cds');
+__PACKAGE__->result_source_instance->is_virtual(1);
+__PACKAGE__->result_source_instance->view_definition(
+ "SELECT cdid, artist, title FROM cd WHERE year ='1999'"
+);
+__PACKAGE__->add_columns(
+ 'cdid' => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ 'artist' => {
+ data_type => 'integer',
+ },
+ 'title' => {
+ data_type => 'varchar',
+ size => 100,
+ },
+
+);
+__PACKAGE__->set_primary_key('cdid');
+__PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
+
+1;
More information about the Bast-commits
mailing list