From: Rafael Kitover Date: Wed, 3 Jun 2009 16:25:36 +0000 (+0000) Subject: add missing files to sybase branch X-Git-Tag: v0.08112~14^2~163 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5608593ecfa387242316e6412fce7cad28be053f;p=dbsrgits%2FDBIx-Class.git add missing files to sybase branch --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm b/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm new file mode 100644 index 0000000..37609ee --- /dev/null +++ b/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm @@ -0,0 +1,20 @@ +package # hide from PAUSE + DBIx::Class::Storage::DBI::Sybase::DateTime; + +use strict; +use warnings; +use DateTime::Format::Strptime; + +my $inflate_format = DateTime::Format::Strptime->new( + pattern => '%Y-%m-%dT%H:%M:%S.%3NZ' +); + +my $deflate_format = DateTime::Format::Strptime->new( + pattern => '%m/%d/%Y %H:%M:%S.%3N' +); + +sub parse_datetime { shift; $inflate_format->parse_datetime(@_) } + +sub format_datetime { shift; $deflate_format->format_datetime(@_) } + +1; diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm index 922ef47..35171e2 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm @@ -4,8 +4,9 @@ use strict; use warnings; use base qw/ - DBIx::Class::Storage::DBI::NoBindVars DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server + DBIx::Class::Storage::DBI::Sybase + DBIx::Class::Storage::DBI::NoBindVars /; 1; @@ -17,10 +18,7 @@ DBD::Sybase =head1 SYNOPSIS -This subclass supports MSSQL connected via L. - - $schema->storage_type('::DBI::Sybase::Microsoft_SQL_Server'); - $schema->connect_info('dbi:Sybase:....', ...); +This subclass supports MSSQL server connections via L. =head1 CAVEATS diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm new file mode 100644 index 0000000..72a7372 --- /dev/null +++ b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm @@ -0,0 +1,9 @@ +package # hide from PAUSE + DBIx::Class::Storage::DBI::Sybase::NoBindVars; + +use base qw/ + DBIx::Class::Storage::DBI::NoBindVars + DBIx::Class::Storage::DBI::Sybase +/; + +1;