From 2043035eee4f8c0f3f896082651d3a5799e90ab8 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Fri, 21 Oct 2011 11:22:40 +0200 Subject: Add schema_file implementation to support schema file header and footer hooks --- odb/relational/oracle/schema.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'odb/relational/oracle/schema.cxx') diff --git a/odb/relational/oracle/schema.cxx b/odb/relational/oracle/schema.cxx index 8a10d2e..2eb44d6 100644 --- a/odb/relational/oracle/schema.cxx +++ b/odb/relational/oracle/schema.cxx @@ -53,6 +53,31 @@ namespace relational entry schema_emitter_; // + // File. + // + + struct schema_file: relational::schema_file, context + { + schema_file (const base& x): base (x) {} + + virtual void + pre () + { + os << "SET FEEDBACK OFF;" << endl + << "WHENEVER SQLERROR EXIT FAILURE;" << endl + << "WHENEVER OSERROR EXIT FAILURE;" << endl + << endl; + } + + virtual void + post () + { + os << "EXIT;" << endl; + } + }; + entry schema_file_; + + // // Drop. // -- cgit v1.1