From: David Kamholz Date: Thu, 27 Jul 2006 06:22:57 +0000 (+0000) Subject: add result_class to ResultSourceProxy; move _ident_cond into CDBI code, not needed... X-Git-Tag: v0.07002~68 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=831ad24ff5383c48d9fd4ca9d321bd768d0a20b9;p=dbsrgits%2FDBIx-Class.git add result_class to ResultSourceProxy; move _ident_cond into CDBI code, not needed elsewhere --- diff --git a/lib/DBIx/Class/CDBICompat/LazyLoading.pm b/lib/DBIx/Class/CDBICompat/LazyLoading.pm index 48a3110..b7d3633 100644 --- a/lib/DBIx/Class/CDBICompat/LazyLoading.pm +++ b/lib/DBIx/Class/CDBICompat/LazyLoading.pm @@ -22,6 +22,11 @@ sub get_column { $self->next::method(@_[1..$#_]); } +sub _ident_cond { + my ($class) = @_; + return join(" AND ", map { "$_ = ?" } $class->primary_columns); +} + sub _flesh { my ($self, @groups) = @_; @groups = ('All') unless @groups; diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index 9895edb..ea22a21 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -20,11 +20,6 @@ depending on them. =cut -sub _ident_cond { - my ($class) = @_; - return join(" AND ", map { "$_ = ?" } $class->primary_columns); -} - sub _ident_values { my ($self) = @_; return (map { $self->{_column_data}{$_} } $self->primary_columns); diff --git a/lib/DBIx/Class/ResultSourceProxy.pm b/lib/DBIx/Class/ResultSourceProxy.pm index f174d75..4301c00 100644 --- a/lib/DBIx/Class/ResultSourceProxy.pm +++ b/lib/DBIx/Class/ResultSourceProxy.pm @@ -8,6 +8,7 @@ use base qw/DBIx::Class/; sub iterator_class { shift->result_source_instance->resultset_class(@_) } sub resultset_class { shift->result_source_instance->resultset_class(@_) } +sub result_class { shift->result_source_instance->result_class(@_) } sub source_name { shift->result_source_instance->source_name(@_) } sub resultset_attributes {