=head1 SYNOPSIS
-This subclass supports L<DBD::Sybase> for real Sybase databases. If
-you are using an MSSQL database via L<DBD::Sybase>, see
-L<DBIx::Class::Storage::DBI::Sybase::MSSQL>.
+This subclass supports L<DBD::Sybase> for real Sybase databases. If you are
+using an MSSQL database via L<DBD::Sybase>, your storage will be reblessed to
+L<DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server>.
-=head1 CAVEATS
+=head1 DESCRIPTION
-If your version of Sybase does not support placeholders, then this storage
-driver uses L<DBIx::Class::Storage::DBI::NoBindVars> as a base,
+If your version of Sybase does not support placeholders, then your storage
+will be reblessed to L<DBIx::Class::Storage::DBI::Sybase::NoBindVars>. 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<DOES> support placeholders (check
-C<<$dbh->{syb_dynamic_supported}>> then unfortunately there's no way to get the
-C<last_insert_id> without doing a C<select max(col)>.
+With this driver there is unfortunately no way to get the C<last_insert_id>
+without doing a C<select max(col)>.
But your queries will be cached.
On connection C<syb_date_fmt> is set to C<ISO_strict>, e.g.:
C<2004-08-21T14:36:48.080Z> and C<dateformat> is set to C<mdy>, e.g.:
-C<08/13/1979>.
+C<08/13/1979 18:08:55.080>.
You will need the L<DateTime::Format::Strptime> module if you are going to use
L<DBIx::Class::InflateColumn::DateTime>.
=head1 AUTHORS
-Brandon L Black <blblack@gmail.com>
-
-Justin Hunter <justin.d.hunter@gmail.com>
-
-Rafael Kitover <rkitover@cpan.org>
+See L<DBIx::Class/CONTRIBUTORS>.
=head1 LICENSE
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(@_) }
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<DBIx::Class>.
+
+=head1 DESCRIPTION
+
+This needs to become L<DateTime::Format::Sybase>.
+
+=head1 AUTHORS
+
+See L<DBIx::Class/CONTRIBUTORS>.
+
+=head1 LICENSE
+
+You may distribute this code under the same terms as Perl itself.
+
+=cut
+# vim:sts=2 sw=2:
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<DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server>.
+
=head1 AUTHORS
Brandon L Black <blblack@gmail.com>
}
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<select @@identity> will work
+for obtainging the last insert id of an C<IDENTITY> column, instead of having to
+do C<select max(col)> 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<DBIx::Class/CONTRIBUTORS>.
+
+=head1 LICENSE
+
+You may distribute this code under the same terms as Perl itself.
+
+=cut
+# vim:sts=2 sw=2: