summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/relational/oracle/schema.cxx2
-rw-r--r--odb/relational/source.hxx7
2 files changed, 5 insertions, 4 deletions
diff --git a/odb/relational/oracle/schema.cxx b/odb/relational/oracle/schema.cxx
index 4ec2e13..a371235 100644
--- a/odb/relational/oracle/schema.cxx
+++ b/odb/relational/oracle/schema.cxx
@@ -277,7 +277,7 @@ namespace relational
os_ << "CREATE TRIGGER " << quote_id (trg_name) << endl
<< " BEFORE INSERT ON " << quote_id (tname) << endl
- << " FOR EACH ROW " << endl
+ << " FOR EACH ROW" << endl
<< "BEGIN" << endl
<< " SELECT " << quote_id (seq_name) << ".nextval " <<
"INTO :new." << quote_id (cname) << " FROM DUAL;" << endl
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx
index 0003021..56a356b 100644
--- a/odb/relational/source.hxx
+++ b/odb/relational/source.hxx
@@ -3389,19 +3389,20 @@ namespace relational
os << "db.execute (";
}
else
- os << endl;
+ os << strlit (line_ + '\n') << endl;
- os << strlit (l);
+ line_ = l;
}
virtual void
post ()
{
if (!first_) // Ignore empty statements.
- os << ");" << endl;
+ os << strlit (line_) << ");" << endl;
}
private:
+ std::string line_;
bool first_;
bool empty_;
bool new_pass_;