diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-07 15:00:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-07 15:00:06 +0200 |
commit | 57d5d8fe9dc4c0d6b4ef21754c5a3539e4c01cf9 (patch) | |
tree | 4daef878ce8276b663a2bc5470e3d9dc37ee2086 /odb/mysql/tracer.cxx | |
parent | 2077828442e58677a2af1d15c6d5266455e50cad (diff) |
Add support for SQL statement tracing
Diffstat (limited to 'odb/mysql/tracer.cxx')
-rw-r--r-- | odb/mysql/tracer.cxx | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/odb/mysql/tracer.cxx b/odb/mysql/tracer.cxx new file mode 100644 index 0000000..7b5a03d --- /dev/null +++ b/odb/mysql/tracer.cxx @@ -0,0 +1,62 @@ +// file : odb/mysql/tracer.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/mysql/tracer.hxx> +#include <odb/mysql/connection.hxx> +#include <odb/mysql/statement.hxx> + +namespace odb +{ + namespace mysql + { + 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&) + { + } + + void tracer:: + prepare (odb::connection& c, const odb::statement& s) + { + prepare (static_cast<connection&> (c), + static_cast<const statement&> (s)); + } + + void tracer:: + execute (odb::connection& c, const odb::statement& s) + { + execute (static_cast<connection&> (c), + static_cast<const statement&> (s)); + } + + void tracer:: + execute (odb::connection& c, const char* s) + { + execute (static_cast<connection&> (c), s); + } + + void tracer:: + deallocate (odb::connection& c, const odb::statement& s) + { + deallocate (static_cast<connection&> (c), + static_cast<const statement&> (s)); + } + } +} |