[Jifty-commit] r3284 - in Jifty-DBI/trunk: lib/Jifty/DBI

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue May 22 15:14:47 EDT 2007


Author: falcone
Date: Tue May 22 15:14:22 2007
New Revision: 3284

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm

Log:
 r18919 at ketch:  falcone | 2007-05-22 15:12:44 -0400
 * rework Synopsis to have code that works


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	Tue May 22 15:14:22 2007
@@ -12,21 +12,27 @@
 
   use Jifty::DBI::Collection;
   
-  package My::Things;
+  package My::ThingCollection;
   use base qw/Jifty::DBI::Collection/;
+
+  package My::Thing;
+  use Jifty::DBI::Schema;
+  use Jifty::DBI::Record schema {
+    column column_1 => type is 'text';
+  };
   
   package main;
 
   use Jifty::DBI::Handle;
   my $handle = Jifty::DBI::Handle->new();
-  $handle->connect( Driver => 'SQLite', Database => "my_test_db" );
+  $handle->connect( driver => 'SQLite', database => "my_test_db" );
 
-  my $sb = My::Things->new( handle => $handle );
+  my $sb = My::ThingCollection->new( handle => $handle );
 
   $sb->limit( column => "column_1", value => "matchstring" );
 
   while ( my $record = $sb->next ) {
-      print $record->my_column_name();
+      print $record->id;
   }
 
 =head1 DESCRIPTION


More information about the Jifty-commit mailing list