1 package DBIx::Class::CDBICompat::Iterator;
9 DBIx::Class::CDBICompat::Iterator - Emulates the extra behaviors of the Class::DBI search iterator.
13 See DBIx::Class::CDBICompat for directions for use.
17 Emulates the extra behaviors of the Class::DBI search iterator.
19 =head2 Differences from DBIx::Class result set
21 The CDBI iterator returns true if there were any results, false otherwise. The DBIC result set always returns true.
26 sub _init_result_source_instance {
29 my $table = $class->next::method(@_);
30 $table->resultset_class("DBIx::Class::CDBICompat::Iterator::ResultSet");
37 package DBIx::Class::CDBICompat::Iterator::ResultSet;
42 use base qw(DBIx::Class::ResultSet);
45 # Performance hack so internal checks whether the result set
46 # exists won't do a SQL COUNT.
47 return 1 if caller =~ /^DBIx::Class::/;