The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Class::QueryLog::Transaction - A Transaction

SYNOPSIS

Represents a transaction. All queries executed with the context of this transaction are stored herein, as well as a start time, end time and flag for committed or rolledback.

METHODS

new

Create a new DBIx::Class::QueryLog::Transcation

bucket

The bucket this tranaction is in.

queries

Arrayref containing all queries executed, in order of execution.

committed

Flag indicating if this transaction was committed.

rolledback

Flag indicating if this transaction was rolled back.

start_time

Time this transaction started.

end_time

Time this transaction ended.

time_elapsed

Time this transaction took to execute. start - end.

add_to_queries

Add the provided query to this transactions list.

count

Returns the number of queries in this Transaction

get_sorted_queries([ $sql ])

Returns all the queries in this Transaction, sorted by elapsed time. (descending).

If given an argument of an SQL statement, only queries matching that statement will be considered.

AUTHOR

Cory G Watson, <gphat at cpan.org>

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Cory G Watson, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.