1 package # hide from PAUSE
2 DBIx::Class::Storage::DBI::Sybase::Base;
7 use base qw/DBIx::Class::Storage::DBI/;
12 DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using
20 my $dbh = $self->_dbh or return 0;
22 local $dbh->{RaiseError} = 1;
30 sub _placeholders_supported {
32 my $dbh = $self->_dbh;
35 # There's also $dbh->{syb_dynamic_supported} but it can be inaccurate for this
37 local $dbh->{PrintError} = 0;
38 $dbh->selectrow_array('select ?', {}, 1);
42 sub _placeholders_with_type_conversion_supported {
44 my $dbh = $self->_dbh;
47 local $dbh->{PrintError} = 0;
48 # this specifically tests a bind that is NOT a string
49 $dbh->selectrow_array('select 1 where 1 = ?', {}, 1);
53 sub _set_max_connect {
55 my $val = shift || 256;
57 my $dsn = $self->_dbi_connect_info->[0];
59 return if ref($dsn) eq 'CODE';
61 if ($dsn !~ /maxConnect=/) {
62 $self->_dbi_connect_info->[0] = "$dsn;maxConnect=$val";
63 my $connected = defined $self->_dbh;
65 $self->ensure_connected if $connected;
72 return $self->_dbh->{syb_oc_version} =~ /freetds/i;
79 See L<DBIx::Class/CONTRIBUTORS>.
83 You may distribute this code under the same terms as Perl itself.