document placeholders_with_type_conversion_supported and add a redispatch to reblesse...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index d321545..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, @_);
@@ -1868,6 +1874,21 @@ sub _subq_count_select {
   return @pcols ? \@pcols : [ 1 ];
 }
 
+#
+# Returns an ordered list of column names before they are used
+# in a SELECT statement. By default simply returns the list
+# passed in.
+#
+# This may be overridden in a specific storage when there are
+# requirements such as moving BLOB columns to the end of the 
+# SELECT list.
+sub _order_select_columns {
+  #my ($self, $source, $columns) = @_;
+  return @{$_[2]};
+}
+
+
+
 
 sub source_bind_attributes {
   my ($self, $source) = @_;
@@ -2433,23 +2454,6 @@ sub lag_behind_master {
     return;
 }
 
-=head2 order_columns_for_select
-
-Returns an ordered list of column names for use with a C<SELECT> when the column
-list is not explicitly specified.
-By default returns the result of L<DBIx::Class::ResultSource/columns>.
-
-This may be overridden in a specific storage when there are requirements such
-as moving C<BLOB> columns to the end of the list.
-
-=cut
-
-sub order_columns_for_select {
-  my ($self, $source, $columns) = @_;
-
-  return @$columns;
-}
-
 sub DESTROY {
   my $self = shift;
   return if !$self->_dbh;