X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FStatistics.pm;h=b60c44ea42507ac23b0a088b73f09297520de585;hb=79a77af646d55bab4840d883527d4f73c9426427;hp=e94203ebb46ad705c89bd64e5cea969a7af66788;hpb=70f3927877ba6b7aac2565bc1933daaf82361308;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/Statistics.pm b/lib/DBIx/Class/Storage/Statistics.pm index e94203e..b60c44e 100644 --- a/lib/DBIx/Class/Storage/Statistics.pm +++ b/lib/DBIx/Class/Storage/Statistics.pm @@ -3,6 +3,7 @@ use strict; use warnings; use base qw/Class::Accessor::Grouped/; +use IO::File; __PACKAGE__->mk_group_accessors(simple => qw/callback debugfh/); @@ -107,6 +108,39 @@ sub txn_commit { $self->print("COMMIT\n"); } +=head2 svp_begin + +Called when a savepoint is created. + +=cut +sub svp_begin { + my ($self, $name) = @_; + + $self->print("SAVEPOINT $name\n"); +} + +=head2 svp_release + +Called when a savepoint is released. + +=cut +sub svp_release { + my ($self, $name) = @_; + + $self->print("RELEASE SAVEPOINT $name\n"); +} + +=head2 svp_rollback + +Called when rolling back to a savepoint. + +=cut +sub svp_rollback { + my ($self, $name) = @_; + + $self->print("ROLLBACK TO SAVEPOINT $name\n"); +} + =head2 query_start Called before a query is executed. The first argument is the SQL string being