From: Daniel Westermann-Clark Date: Tue, 18 Apr 2006 08:02:40 +0000 (-0400) Subject: Add proxy methods and fill out Changes X-Git-Tag: v0.07002~75^2~237^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1bc0b92529b4b66812aa16b49ed0f5344bc984c0;p=dbsrgits%2FDBIx-Class.git Add proxy methods and fill out Changes --- diff --git a/Changes b/Changes index e96305e..5255e26 100644 --- a/Changes +++ b/Changes @@ -3,9 +3,13 @@ Revision history for DBIx::Class - added remove_column(s) to ResultSource/ResultSourceProxy - added add_column alias to ResultSourceProxy - added source_name to ResultSource - - load_classes now uses source_name and sets it if necessary - - add update_or_create_related - - add find_or_new and find_or_new_related + - load_classes now uses source_name and sets it if necessary + - add update_or_create_related to Relationship::Base + - add find_or_new to ResultSet/ResultSetProxy and find_or_new_related + to Relationship::Base + - add accessors for unique constraint names and coulums to + ResultSource/ResultSourceProxy + - rework ResultSet::find() to search unique constraints 0.06002 - fix for -and conditions when updating or deleting on a ResultSet diff --git a/lib/DBIx/Class/ResultSetProxy.pm b/lib/DBIx/Class/ResultSetProxy.pm index 547561f..56bb08d 100644 --- a/lib/DBIx/Class/ResultSetProxy.pm +++ b/lib/DBIx/Class/ResultSetProxy.pm @@ -14,6 +14,7 @@ sub count_literal { shift->resultset_instance->count_literal(@_); } sub find { shift->resultset_instance->find(@_); } sub create { shift->resultset_instance->create(@_); } sub find_or_create { shift->resultset_instance->find_or_create(@_); } +sub find_or_new { shift->resultset_instance->find_or_new(@_); } sub update_or_create { shift->resultset_instance->update_or_create(@_); } 1; diff --git a/lib/DBIx/Class/ResultSourceProxy.pm b/lib/DBIx/Class/ResultSourceProxy.pm index 2743bf7..f174d75 100644 --- a/lib/DBIx/Class/ResultSourceProxy.pm +++ b/lib/DBIx/Class/ResultSourceProxy.pm @@ -62,6 +62,14 @@ sub unique_constraints { shift->result_source_instance->unique_constraints(@_); } +sub unique_constraint_names { + shift->result_source_instance->unique_constraint_names(@_); +} + +sub unique_constraint_columns { + shift->result_source_instance->unique_constraint_columns(@_); +} + sub add_relationship { my ($class, $rel, @rest) = @_; my $source = $class->result_source_instance;