[Bast-commits] r6715 - DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Thu Jun 18 23:46:56 GMT 2009


Author: caelum
Date: 2009-06-18 23:46:56 +0000 (Thu, 18 Jun 2009)
New Revision: 6715

Modified:
   DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
added connect_call_blob_setup for Sybase

Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-18 23:28:17 UTC (rev 6714)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm	2009-06-18 23:46:56 UTC (rev 6715)
@@ -30,6 +30,7 @@
         $self->_rebless;
       }
       $self->connect_call_datetime_setup;
+      $self->connect_call_blob_setup;
     }
   }
 }
@@ -38,9 +39,27 @@
   my $self = shift;
   $self->next::method(@_);
   $self->connect_call_datetime_setup;
+  $self->connect_call_blob_setup;
   1;
 }
 
+=head2 connect_call_blob_setup
+
+Used as:
+
+  on_connect_call => 'blob_setup'
+
+Does C<< $dbh->{syb_binary_images} = 1; >> to return C<IMAGE> data as raw binary
+instead of as a hex string.
+
+=cut
+
+sub connect_call_blob_setup {
+  my $self = shift;
+  my $dbh = $self->_dbh;
+  $dbh->{syb_binary_images} = 1;
+}
+
 {
   my $old_dbd_warned = 0;
 
@@ -148,6 +167,11 @@
 See L</connect_call_datetime_setup> to setup date formats
 for L<DBIx::Class::InflateColumn::DateTime>.
 
+=head1 IMAGE COLUMNS
+
+See L</connect_call_blob_setup> for a L<DBIx::Class::Storage::DBI/connect_info>
+setting you need to work with C<IMAGE> columns.
+
 =head1 AUTHORS
 
 See L<DBIx::Class/CONTRIBUTORS>.




More information about the Bast-commits mailing list