1package DBIC::DebugObj;
2
3use strict;
4use warnings;
5
6use Class::C3;
7
8use base qw/DBIx::Class::Storage::Statistics Exporter Class::Accessor::Fast/;
9
10__PACKAGE__->mk_accessors( qw/dbictest_sql_ref dbictest_bind_ref/ );
11
12
13=head2 new(PKG, SQL_REF, BIND_REF, ...)
14
15Creates a new instance that on subsequent queries will store
16the generated SQL to the scalar pointed to by SQL_REF and bind
17values to the array pointed to by BIND_REF.
18
19=cut
20
21sub new {
22  my $pkg = shift;
23  my $sql_ref = shift;
24  my $bind_ref = shift;
25
26  my $self = $pkg->SUPER::new(@_);
27
28  $self->debugfh(undef);
29
30  $self->dbictest_sql_ref($sql_ref);
31  $self->dbictest_bind_ref($bind_ref || []);
32
33  return $self;
34}
35
36sub query_start {
37  my $self = shift;
38
39  (${$self->dbictest_sql_ref}, @{$self->dbictest_bind_ref}) = @_;
40}
41
42sub query_end { }
43
44sub txn_start { }
45
46sub txn_commit { }
47
48sub txn_rollback { }
49
501;
51