From afd2bed0af3d0c524758a3fa098b1b2062d89279 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Nov 2011 17:09:39 +0200 Subject: Add newlines to the multi-line embedded schema creation statements --- odb/relational/oracle/schema.cxx | 2 +- odb/relational/source.hxx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'odb') 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_; -- cgit v1.1