blob: 6a617f486a2c027a38e56d15e61d83edc9373306 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// file : odb/tracer.cxx
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <iostream>
#include <odb/tracer.hxx>
#include <odb/statement.hxx>
using namespace std;
namespace odb
{
//
// tracer
//
tracer::
~tracer ()
{
}
void tracer::
prepare (connection&, const statement&)
{
}
void tracer::
execute (connection& c, const statement& s)
{
execute (c, s.text ());
}
void tracer::
deallocate (connection&, const statement&)
{
}
//
// stderr_tracer
//
class stderr_tracer_type: public tracer
{
virtual void
execute (connection&, const char* statement);
// Override the other version to get rid of a Sun CC warning.
//
virtual void
execute (connection&, const statement&);
};
void stderr_tracer_type::
execute (connection&, const char* s)
{
cerr << s << endl;
}
void stderr_tracer_type::
execute (connection& c, const statement& s)
{
execute (c, s.text ());
}
static stderr_tracer_type stderr_tracer_;
tracer& stderr_tracer = stderr_tracer_;
}
|