Make the insert_returning capability private (and saner naming)
Peter Rabbitson [Thu, 8 Apr 2010 10:10:12 +0000 (10:10 +0000)]
lib/DBIx/Class/Row.pm
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/InterBase.pm
lib/DBIx/Class/Storage/DBI/Pg.pm
lib/DBIx/Class/Storage/DBI/Replicated.pm

index 787df86..f9784d0 100644 (file)
@@ -363,7 +363,7 @@ sub insert {
   my $updated_cols = $source->storage->insert(
     $source,
     { $self->get_columns },
-    (keys %auto_pri) && $source->storage->can_insert_returning
+    (keys %auto_pri) && $source->storage->_supports_insert_returning
       ? { returning => [ sort { $auto_pri{$a} <=> $auto_pri{$b} } keys %auto_pri ] }
       : ()
     ,
index 1030c4c..a823f22 100644 (file)
@@ -36,7 +36,7 @@ __PACKAGE__->cursor_class('DBIx::Class::Storage::DBI::Cursor');
 
 __PACKAGE__->mk_group_accessors('inherited' => qw/
   sql_maker_class
-  can_insert_returning
+  _supports_insert_returning
 /);
 __PACKAGE__->sql_maker_class('DBIx::Class::SQLAHacks');
 
index 352dcc5..e6a9143 100644 (file)
@@ -29,7 +29,7 @@ L</connect_call_datetime_setup>.
 
 =cut
 
-sub can_insert_returning { 1 }
+sub _supports_insert_returning { 1 }
 
 sub _sequence_fetch {
   my ($self, $nextval, $sequence) = @_;
index 250707b..8f5ac8d 100644 (file)
@@ -16,7 +16,7 @@ use Context::Preserve ();
 warn __PACKAGE__.": DBD::Pg 2.9.2 or greater is strongly recommended\n"
   if ($DBD::Pg::VERSION < 2.009002);  # pg uses (used?) version::qv()
 
-sub can_insert_returning {
+sub _supports_insert_returning {
   my $self = shift;
 
   return 1
index c21fe8a..6d226d2 100644 (file)
@@ -306,7 +306,7 @@ has 'write_handler' => (
 
     backup
     is_datatype_numeric
-    can_insert_returning
+    _supports_insert_returning
     _count_select
     _subq_count_select
     _subq_update_delete