added datetime parser for MSSQL (ta LTJake)
Matt S Trout [Sat, 20 May 2006 00:34:39 +0000 (00:34 +0000)]
lib/DBIx/Class/Storage/DBI/MSSQL.pm

index 171c17a..a303d25 100644 (file)
@@ -11,6 +11,14 @@ sub last_insert_id {
   my( $id ) = $_[0]->_dbh->selectrow_array('SELECT @@IDENTITY' );
   return $id;
 }
+
+sub build_datetime_parser {
+  my $self = shift;
+  my $type = "DateTime::Format::Strptime";
+  eval "use ${type}";
+  $self->throw_exception("Couldn't load ${type}: $@") if $@;
+  return $type->new( pattern => '%m/%d/%Y %H:%M:%S' );
+}
 \r
 1;
 \r