[Bast-commits] r7286 - in DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage: . DBI/Sybase

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Mon Aug 10 06:44:52 GMT 2009


Author: caelum
Date: 2009-08-10 06:44:51 +0000 (Mon, 10 Aug 2009)
New Revision: 7286

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm
Log:
document placeholders_with_type_conversion_supported and add a redispatch to reblessed storage in DBI::update

Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm	2009-08-10 06:38:26 UTC (rev 7285)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm	2009-08-10 06:44:51 UTC (rev 7286)
@@ -57,6 +57,11 @@
 
 =head2 placeholders_with_type_conversion_supported 
 
+Checks if placeholders bound to non-string types throw implicit type conversion
+errors or not.
+
+See L<DBIx::Class::Storage::DBI::Sybase/connect_call_set_auto_cast>.
+
 =cut
 
 sub placeholders_with_type_conversion_supported {

Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI.pm	2009-08-10 06:38:26 UTC (rev 7285)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI.pm	2009-08-10 06:44:51 UTC (rev 7286)
@@ -1332,8 +1332,14 @@
 
 sub update {
   my $self = shift @_;
+
+# redispatch to update method of storage we reblessed into, if necessary
+  if (not $self->_driver_determined) {
+    $self->_determine_driver;
+    goto $self->can('update');
+  }
+
   my $source = shift @_;
-  $self->_determine_driver;
   my $bind_attributes = $self->source_bind_attributes($source);
 
   return $self->_execute('update' => [], $source, $bind_attributes, @_);




More information about the Bast-commits mailing list