X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase.pm;h=9851303d6a384d024080e48651600a51e7700fad;hb=689819e14e9e6245000c64ece46ddd1bc8293bf5;hp=28b4059836bbf9bea57c7fc7d9569a34c1b1e0a5;hpb=0814e8043fb4dbad52bab9d77f5c9891feaa77d9;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index 28b4059..9851303 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -3,14 +3,62 @@ 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::Common + DBIx::Class::Storage::DBI::AutoCast +/; +use mro 'c3'; +use Carp::Clan qw/^DBIx::Class/; +use List::Util (); +use Sub::Name (); + +__PACKAGE__->mk_group_accessors('simple' => + qw/_identity _blob_log_on_update _writer_storage _is_writer_storage + _identity_method/ +); + +my @also_proxy_to_writer_storage = qw/ + connect_call_set_auto_cast auto_cast connect_call_blob_setup + connect_call_datetime_setup + + disconnect _connect_info _sql_maker _sql_maker_opts disable_sth_caching + auto_savepoint unsafe cursor_class debug debugobj schema +/; + +=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, which is the only way to get the C value in this +mode. + +In addition, they are done on a separate connection so that it's possible to +have active cursors when doing an insert. + +When using C transactions are +disabled, as there are no concurrency issues with C. +Transactions done for inserts in C mode when placeholders are in use +are not affected, as they are done on an extra database handle. -But your queries will be cached. +Some workarounds: + +=over 4 + +=item * use L + +=item * L another L + +=item * load the data from your cursor with L + +=back + +=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>. +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); -You will need the L module if you are going to use -L. +instead. -=head1 AUTHORS +However, the C you pass in +L is used to execute the equivalent +C command on connection. -Brandon L Black +See L for a L +setting you need to work with C columns. -Justin Hunter +=head1 AUTHOR -Rafael Kitover +See L. =head1 LICENSE