X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase.pm;h=7995334798ed7032ba006e16f3d0d22d445d1ad5;hb=44e538d00c41e69899b48178c9dede95e2ef7e77;hp=5220dace8e444b47681cffda635e864893c07921;hpb=7e8cecc15add55966fd4df8810141d417d333ddd;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index 5220dac..7995334 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -3,16 +3,52 @@ package DBIx::Class::Storage::DBI::Sybase; use strict; use warnings; -use base qw/DBIx::Class::Storage::DBI/; - +use base qw/ + DBIx::Class::Storage::DBI::Sybase::Base +/; +use mro 'c3'; use Carp::Clan qw/^DBIx::Class/; +use List::Util (); + +__PACKAGE__->mk_group_accessors('simple' => + qw/_identity _blob_log_on_update auto_cast _insert_txn/ +); + +=head1 NAME + +DBIx::Class::Storage::DBI::Sybase - Sybase support for DBIx::Class + +=head1 SYNOPSIS + +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 DESCRIPTION + +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. + +With this driver there is unfortunately no way to get the C +without doing a C. +The Open Client FAQ is here: +L. -But your queries will be cached. +Sybase ASE for Linux (which comes with the Open Client libraries) may be +downloaded here: L. + +To see if you're using FreeTDS check C<< $schema->storage->using_freetds >>, or run: + + perl -MDBI -le 'my $dbh = DBI->connect($dsn, $user, $pass); print $dbh->{syb_oc_version}' + +Some versions of the libraries involved will not support placeholders, in which +case the storage will be reblessed to +L. + +In some configurations, placeholders will work but will throw implicit +conversion errors for anything that's not expecting a string. In such a case, +the C option is automatically set, which you may enable yourself with +L (see the description of that method for more +details.) + +In other configurations, placeholers will work just as they do with the Sybase +Open Client libraries. + +Inserts or updates of TEXT/IMAGE columns will B work with FreeTDS. + +=head1 MAXIMUM CONNECTIONS + +The TDS protocol makes separate connections to the server for active statements +in the background. By default the number of such connections is limited to 25, +on both the client side and the server side. + +This is a bit too low for a complex L application, so on connection +the client side setting is set to C<256> (see L.) You +can override it to whatever setting you like in the DSN. + +See +L +for information on changing the setting on the server side. =head1 DATES -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 18:08:55.080>. +See L to setup date formats +for L. + +=head1 TEXT/IMAGE COLUMNS + +L compiled with FreeTDS will B allow you to insert or update +C columns. + +Setting C<< $dbh->{LongReadLen} >> will also not work with FreeTDS use either: + + $schema->storage->dbh->do("SET TEXTSIZE $bytes"); + +or + + $schema->storage->set_textsize($bytes); + +instead. + +However, the C you pass in +L is used to execute the equivalent +C command on connection. -You will need the L module if you are going to use -L. +See L for a L +setting you need to work with C columns. =head1 AUTHORS