summaryrefslogtreecommitdiff
path: root/odb/relational/source.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/relational/source.hxx')
-rw-r--r--odb/relational/source.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx
index 37dfa27..106bf27 100644
--- a/odb/relational/source.hxx
+++ b/odb/relational/source.hxx
@@ -27,14 +27,16 @@ namespace relational
pre ()
{
first_ = true;
- os << "db.execute (";
}
virtual void
line (const std::string& l)
{
if (first_)
+ {
first_ = false;
+ os << "db.execute (";
+ }
else
os << endl;
@@ -44,7 +46,8 @@ namespace relational
virtual void
post ()
{
- os << ");" << endl;
+ if (!first_) // Ignore empty statements.
+ os << ");" << endl;
}
private: