- Fix distinct => 1 with non-selecting order_by (the columns
in order_by also need to be aded to the resulting group_by)
- Do not attempt to deploy FK constraints pointing to a View
+ - Refactored Sybase storage driver into a central ::DBI::Sybase
+ dispatcher, and a sybase-specific ::DBI::Sybase::ASE
0.08114 2009-11-14 17:45:00 (UTC)
- Preliminary support for MSSQL via DBD::ADO
resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
-no_index 'DBIx::Class::Storage::DBI::Sybase::Common';
no_index 'DBIx::Class::SQLAHacks';
no_index 'DBIx::Class::SQLAHacks::MSSQL';
no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob';
-no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server';
-no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars';
no_index 'DBIx::Class::Storage::DBIHacks';
# re-build README and require extra modules for testing if we're in a checkout
Set the storage class that will be instantiated when L</connect> is called.
If the classname starts with C<::>, the prefix C<DBIx::Class::Storage> is
-assumed by L</connect>.
+assumed by L</connect>.
You want to use this to set subclasses of L<DBIx::Class::Storage::DBI>
-in cases where the appropriate subclass is not autodetected, such as
-when dealing with MSSQL via L<DBD::Sybase>, in which case you'd set it
-to C<::DBI::Sybase::MSSQL>.
+in cases where the appropriate subclass is not autodetected.
If your storage type requires instantiation arguments, those are
defined as a second argument in the form of a hashref and the entire
This API is B<EXPERIMENTAL>, will almost definitely change in the future, and
currently only used by L<::AutoCast|DBIx::Class::Storage::DBI::AutoCast> and
-L<::Sybase|DBIx::Class::Storage::DBI::Sybase>.
+L<::Sybase::ASE|DBIx::Class::Storage::DBI::Sybase::ASE>.
The default implementation returns C<undef>, implement in your Storage driver if
you need this functionality.
=head1 NAME
-DBIx::Class::Storage::DBI::Sybase::Common - Base class for drivers using
-DBD::Sybase
+DBIx::Class::Storage::DBI::Sybase - Base class for drivers using
+L<DBD::Sybase>
=head1 DESCRIPTION
use warnings;
use base qw/
- DBIx::Class::Storage::DBI::Sybase::Common
+ DBIx::Class::Storage::DBI::Sybase
DBIx::Class::Storage::DBI::MSSQL
/;
use mro 'c3';
# LongReadLen doesn't work with MSSQL through DBD::Sybase, and the default is
# huge on some versions of SQL server and can cause memory problems, so we
- # fix it up here (see Sybase/Common.pm)
+ # fix it up here (see ::DBI::Sybase.pm)
$self->set_textsize;
$self->next::method(@_);
use lib qw(t/lib);
use DBICTest;
-require DBIx::Class::Storage::DBI::Sybase;
-require DBIx::Class::Storage::DBI::Sybase::NoBindVars;
-
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
my $TESTS = 63 + 2;
}
my @storage_types = (
- 'DBI::Sybase',
- 'DBI::Sybase::NoBindVars',
+ 'DBI::Sybase::ASE',
+ 'DBI::Sybase::ASE::NoBindVars',
);
+eval "require $_" for @storage_types;
+
my $schema;
my $storage_idx = -1;
my $ping_count = 0;
{
- my $ping = DBIx::Class::Storage::DBI::Sybase->can('_ping');
- *DBIx::Class::Storage::DBI::Sybase::_ping = sub {
+ my $ping = DBIx::Class::Storage::DBI::Sybase::ASE->can('_ping');
+ *DBIx::Class::Storage::DBI::Sybase::ASE::_ping = sub {
$ping_count++;
goto $ping;
};
for my $storage_type (@storage_types) {
$storage_idx++;
- unless ($storage_type eq 'DBI::Sybase') { # autodetect
+ unless ($storage_type eq 'DBI::Sybase::ASE') { # autodetect
DBICTest::Schema->storage_type("::$storage_type");
}
$schema->storage->ensure_connected;
if ($storage_idx == 0 &&
- $schema->storage->isa('DBIx::Class::Storage::DBI::Sybase::NoBindVars')) {
+ $schema->storage->isa('DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars')) {
# no placeholders in this version of Sybase or DBD::Sybase (or using FreeTDS)
my $tb = Test::More->builder;
$tb->skip('no placeholders') for 1..$TESTS;
$seen_id{$new->artistid}++;
# check redispatch to storage-specific insert when auto-detected storage
- if ($storage_type eq 'DBI::Sybase') {
+ if ($storage_type eq 'DBI::Sybase::ASE') {
DBICTest::Schema->storage_type('::DBI');
$schema = get_schema();
}
my $new_str = $binstr{large} . 'mtfnpy';
# check redispatch to storage-specific update when auto-detected storage
- if ($storage_type eq 'DBI::Sybase') {
+ if ($storage_type eq 'DBI::Sybase::ASE') {
DBICTest::Schema->storage_type('::DBI');
$schema = get_schema();
}
}
my @storage_types = (
- 'DBI::Sybase',
- 'DBI::Sybase::NoBindVars',
+ 'DBI::Sybase::ASE',
+ 'DBI::Sybase::ASE::NoBindVars',
);
my $schema;
for my $storage_type (@storage_types) {
$schema = DBICTest::Schema->clone;
- unless ($storage_type eq 'DBI::Sybase') { # autodetect
+ unless ($storage_type eq 'DBI::Sybase::ASE') { # autodetect
$schema->storage_type("::$storage_type");
}
$schema->connection($dsn, $user, $pass, {