From: Rafael Kitover Date: Thu, 4 Jun 2009 02:52:31 +0000 (+0000) Subject: update Sybase docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e8cecc15add55966fd4df8810141d417d333ddd;p=dbsrgits%2FDBIx-Class-Historic.git update Sybase docs --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index fe38359..5220dac 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -69,24 +69,18 @@ DBIx::Class::Storage::DBI::Sybase - Storage::DBI subclass for Sybase =head1 SYNOPSIS -This subclass supports L for real Sybase databases. If -you are using an MSSQL database via L, see -L. +This subclass supports L for real Sybase databases. If you are +using an MSSQL database via L, your storage will be reblessed to +L. -=head1 CAVEATS +=head1 DESCRIPTION -If your version of Sybase does not support placeholders, then this storage -driver uses L as a base, +If your version of Sybase does not support placeholders, then your storage +will be reblessed to L. You can +also enable that driver explicitly, see the documentation for more details. -In which case, bind variables will be interpolated (properly quoted of course) -into the SQL query itself, without using bind placeholders. - -More importantly this means that caching of prepared statements is explicitly -disabled, as the interpolation renders it useless. - -If your version of Sybase B support placeholders (check -C<<$dbh->{syb_dynamic_supported}>> then unfortunately there's no way to get the -C without doing a C. But your queries will be cached. @@ -94,18 +88,14 @@ But your queries will be cached. On connection C is set to C, e.g.: C<2004-08-21T14:36:48.080Z> and C is set to C, e.g.: -C<08/13/1979>. +C<08/13/1979 18:08:55.080>. You will need the L module if you are going to use L. =head1 AUTHORS -Brandon L Black - -Justin Hunter - -Rafael Kitover +See L. =head1 LICENSE diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm b/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm index 37609ee..9495665 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/DateTime.pm @@ -6,11 +6,11 @@ use warnings; use DateTime::Format::Strptime; my $inflate_format = DateTime::Format::Strptime->new( - pattern => '%Y-%m-%dT%H:%M:%S.%3NZ' + pattern => '%Y-%m-%dT%H:%M:%S.%3NZ' ); my $deflate_format = DateTime::Format::Strptime->new( - pattern => '%m/%d/%Y %H:%M:%S.%3N' + pattern => '%m/%d/%Y %H:%M:%S.%3N' ); sub parse_datetime { shift; $inflate_format->parse_datetime(@_) } @@ -18,3 +18,23 @@ sub parse_datetime { shift; $inflate_format->parse_datetime(@_) } sub format_datetime { shift; $deflate_format->format_datetime(@_) } 1; + +=head1 NAME + +DBIx::Class::Storage::DBI::Sybase::DateTime - DateTime inflation/deflation +support for Sybase in L. + +=head1 DESCRIPTION + +This needs to become L. + +=head1 AUTHORS + +See L. + +=head1 LICENSE + +You may distribute this code under the same terms as Perl itself. + +=cut +# vim:sts=2 sw=2: 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 2c49ea1..f458b91 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm @@ -28,6 +28,9 @@ into the SQL query itself, without using bind placeholders. More importantly this means that caching of prepared statements is explicitly disabled, as the interpolation renders it useless. +The actual driver code for MSSQL is in +L. + =head1 AUTHORS Brandon L Black diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm index 373d934..b5d61a2 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/NoBindVars.pm @@ -14,3 +14,45 @@ sub _dbh_last_insert_id { } 1; + +=head1 NAME + +DBIx::Class::Storage::DBI::Sybase::NoBindVars - Storage::DBI subclass for Sybase +without placeholder support + +=head1 DESCRIPTION + +If you're using this driver than your version of Sybase does not support +placeholders. You can check with: + + $dbh->{syb_dynamic_supported} + +You can also enable this driver explicitly using: + + my $schema = SchemaClass->clone; + $schema->storage_type('::DBI::Sybase::NoBindVars'); + $schema->connect($dsn, $user, $pass, \%opts); + +See the discussion in L<< DBD::Sybase/Using ? Placeholders & bind parameters to +$sth->execute >> for details on the pros and cons of using placeholders. + +One advantage of not using placeholders is that C as the base Sybase driver does. + +When using this driver, bind variables will be interpolated (properly quoted of +course) into the SQL query itself, without using placeholders. + +The caching of prepared statements is also explicitly disabled, as the +interpolation renders it useless. + +=head1 AUTHORS + +See L. + +=head1 LICENSE + +You may distribute this code under the same terms as Perl itself. + +=cut +# vim:sts=2 sw=2: