aboutsummaryrefslogtreecommitdiff
path: root/odb/statement-processing.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/statement-processing.cxx')
-rw-r--r--odb/statement-processing.cxx44
1 files changed, 42 insertions, 2 deletions
diff --git a/odb/statement-processing.cxx b/odb/statement-processing.cxx
index f647966..ed5bad5 100644
--- a/odb/statement-processing.cxx
+++ b/odb/statement-processing.cxx
@@ -6,14 +6,19 @@
// to minimize statically-linked object code size when processing
// is not used.
+//#define LIBODB_DEBUG_STATEMENT_PROCESSING 1
+//#define LIBODB_TRACE_STATEMENT_PROCESSING 1
+
#include <cassert>
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+# include <iostream>
+#endif
+
#include <odb/statement.hxx>
using namespace std;
-// #define LIBODB_DEBUG_STATEMENT_PROCESSING 1
-
namespace odb
{
typedef char_traits<char> traits;
@@ -310,6 +315,13 @@ namespace odb
r.append (trailer_begin, trailer_size);
}
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+ if (r.size () != n)
+ cerr << endl
+ << "old: '" << s << "'" << endl << endl
+ << "new: '" << r << "'" << endl << endl;
+#endif
+
return;
}
@@ -395,6 +407,13 @@ namespace odb
r += ' ';
r.append (trailer_begin, trailer_size);
}
+
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+ if (r.size () != n)
+ cerr << endl
+ << "old: '" << s << "'" << endl << endl
+ << "new: '" << r << "'" << endl << endl;
+#endif
}
void statement::
@@ -484,6 +503,13 @@ namespace odb
r.append (trailer_begin, trailer_size);
}
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+ if (r.size () != n)
+ cerr << endl
+ << "old: '" << s << "'" << endl << endl
+ << "new: '" << r << "'" << endl << endl;
+#endif
+
return;
}
@@ -526,6 +552,13 @@ namespace odb
r += ' ';
r.append (trailer_begin, trailer_size);
}
+
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+ if (r.size () != n)
+ cerr << endl
+ << "old: '" << s << "'" << endl << endl
+ << "new: '" << r << "'" << endl << endl;
+#endif
}
void statement::
@@ -766,5 +799,12 @@ namespace odb
r.erase (join_pos - 1, n + 1); // Extra one for space.
}
}
+
+#ifdef LIBODB_TRACE_STATEMENT_PROCESSING
+ if (r.size () != n)
+ cerr << endl
+ << "old: '" << s << "'" << endl << endl
+ << "new: '" << r << "'" << endl << endl;
+#endif
}
}