[Bast-commits] r6489 -
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Jun 3 16:25:36 GMT 2009
Author: caelum
Date: 2009-06-03 16:25:36 +0000 (Wed, 03 Jun 2009)
New Revision: 6489
Added:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
Log:
add missing files to sybase branch
Added: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm (rev 0)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm 2009-06-03 16:25:36 UTC (rev 6489)
@@ -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;
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2009-06-03 16:19:29 UTC (rev 6488)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2009-06-03 16:25:36 UTC (rev 6489)
@@ -4,8 +4,9 @@
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,11 +18,8 @@
=head1 SYNOPSIS
-This subclass supports MSSQL connected via L<DBD::Sybase>.
+This subclass supports MSSQL server connections via L<DBD::Sybase>.
- $schema->storage_type('::DBI::Sybase::Microsoft_SQL_Server');
- $schema->connect_info('dbi:Sybase:....', ...);
-
=head1 CAVEATS
This storage driver uses L<DBIx::Class::Storage::DBI::NoBindVars> as a base.
Added: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm (rev 0)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm 2009-06-03 16:25:36 UTC (rev 6489)
@@ -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;
More information about the Bast-commits
mailing list