document placeholders_with_type_conversion_supported and add a redispatch to reblesse...
Rafael Kitover [Mon, 10 Aug 2009 06:44:51 +0000 (06:44 +0000)]
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/Sybase/Base.pm

index 355edf9..9785585 100644 (file)
@@ -1332,8 +1332,14 @@ sub insert_bulk {
 
 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, @_);
index 2284289..4681d64 100644 (file)
@@ -57,6 +57,11 @@ sub placeholders_supported {
 
 =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 {