[Bast-commits] r7221 - in
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage:
. DBI DBI/Sybase
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Aug 5 09:48:04 GMT 2009
Author: caelum
Date: 2009-08-05 09:48:04 +0000 (Wed, 05 Aug 2009)
New Revision: 7221
Modified:
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/MSSQL.pm
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm
DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
Log:
update branch after pull
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/MSSQL.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-08-05 09:19:57 UTC (rev 7220)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-08-05 09:48:04 UTC (rev 7221)
@@ -30,14 +30,14 @@
if ($identity_insert) {
my $table = $source->from;
- $self->dbh->do("SET IDENTITY_INSERT $table ON");
+ $self->_get_dbh->do("SET IDENTITY_INSERT $table ON");
}
$self->next::method(@_);
if ($identity_insert) {
my $table = $source->from;
- $self->dbh->do("SET IDENTITY_INSERT $table OFF");
+ $self->_get_dbh->do("SET IDENTITY_INSERT $table OFF");
}
}
@@ -68,7 +68,7 @@
grep { not exists $to_insert->{$_} } (@pk_guids, @auto_guids);
for my $guid_col (@get_guids_for) {
- my ($new_guid) = $self->dbh->selectrow_array('SELECT NEWID()');
+ my ($new_guid) = $self->_get_dbh->selectrow_array('SELECT NEWID()');
$updated_cols->{$guid_col} = $to_insert->{$guid_col} = $new_guid;
}
@@ -145,7 +145,7 @@
sub _svp_begin {
my ($self, $name) = @_;
- $self->dbh->do("SAVE TRANSACTION $name");
+ $self->_get_dbh->do("SAVE TRANSACTION $name");
}
# A new SAVE TRANSACTION with the same name releases the previous one.
@@ -154,7 +154,7 @@
sub _svp_rollback {
my ($self, $name) = @_;
- $self->dbh->do("ROLLBACK TRANSACTION $name");
+ $self->_get_dbh->do("ROLLBACK TRANSACTION $name");
}
sub build_datetime_parser {
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm 2009-08-05 09:19:57 UTC (rev 7220)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm 2009-08-05 09:48:04 UTC (rev 7221)
@@ -29,7 +29,7 @@
sub _placeholders_supported {
my $self = shift;
- my $dbh = $self->_dbh;
+ my $dbh = $self->_get_dbh;
return eval {
# There's also $dbh->{syb_dynamic_supported} but it can be inaccurate for this
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2009-08-05 09:19:57 UTC (rev 7220)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI/Sybase/Microsoft_SQL_Server.pm 2009-08-05 09:48:04 UTC (rev 7221)
@@ -11,7 +11,7 @@
sub _rebless {
my $self = shift;
- my $dbh = $self->_dbh;
+ my $dbh = $self->_get_dbh;
if (not $self->_placeholders_supported) {
bless $self,
Modified: DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm 2009-08-05 09:19:57 UTC (rev 7220)
+++ DBIx-Class/0.08/branches/reduce_pings/lib/DBIx/Class/Storage/DBI.pm 2009-08-05 09:48:04 UTC (rev 7221)
@@ -797,17 +797,18 @@
my ($self) = @_;
if (not $self->_driver_determined) {
- if (ref($self) eq __PACKAGE__) {
- my $driver;
my $started_unconnected = 0;
local $self->{_in_determine_driver} = 1;
+ if (ref($self) eq __PACKAGE__) {
+ my $driver;
if ($self->_dbh) { # we are connected
$driver = $self->_dbh->{Driver}{Name};
} else {
# try to use dsn to not require being connected, the driver may still
# force a connection in _rebless to determine version
($driver) = $self->_dbi_connect_info->[0] =~ /dbi:([^:]+):/i;
+ $started_unconnected = 1;
}
my $storage_class = "DBIx::Class::Storage::DBI::${driver}";
@@ -816,7 +817,6 @@
bless $self, $storage_class;
$self->_rebless();
}
- $started_unconnected = 1;
}
$self->_driver_determined(1);
More information about the Bast-commits
mailing list