[Dbix-class] DBIx::Class 0.08009 for testing

Marc Mims marc at questright.com
Mon Jan 21 18:49:43 GMT 2008


* Michael Higgins <linux at evolone.org> [080121 10:40]:
> On Sun, 20 Jan 2008 13:44:50 +0000 (GMT)
> Jess Robinson <castaway at desert-island.me.uk> wrote:
> 
> > 
> > http://desert-island.me.uk:8888/perldists/DBIx-Class-0.08009.tar.gz
> > 
> > Changes:
> >          - Added Storage::DBI subclass for MSSQL over ODBC.
> > 
> > Please poke this tarball some, so we can put it on CPAN!
> 
> Doing my best to be helpful here.
> 
> There was another addition to this (mentioned above) that I assumed
> would be added in this next release, so I guess I should jump in.
> 
> This:
> 
> 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 => '%Y-%m-%d %T' );
> }
> 
> ... is missing. (Perhaps Marc Mims is the one to contact, as he added
> the module, but hasn't, it would seem, committed this other key piece.)

Hi, Michael.

I'm trying to find time to finish work on the DateTime issue.  I know
the build_datetime_parser you quoted above is working for you, but I'm
not sure it's sufficient for all cases.  I believe it needs to handled
dates as well, not just timestamps.

I've done a bit of research and it seems the timestamp format you get
from MSSQL through ODBC may be a standard ODBC format, not an MSSQL
format.  I see a similar format, differing only in number of digits in
the fractional seconds, for DB2 over ODBC.  That leads me to believe
that build_datetime_parser might be best in ::DBI::ODBC with both
::DBI::ODBC::DB2_400_SQL and ::DBI::ODBC::MSSQL derived from it.

	-Marc



More information about the DBIx-Class mailing list