summaryrefslogtreecommitdiff
path: root/odb/relational/oracle/schema.cxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-21 11:22:40 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-21 11:47:15 +0200
commit2043035eee4f8c0f3f896082651d3a5799e90ab8 (patch)
tree35a409efec4131b1d96abdf7be6a5328e989d54c /odb/relational/oracle/schema.cxx
parent050822b74f51a339501970f21f00916f4deb8836 (diff)
Add schema_file implementation to support schema file header and footer hooks
Diffstat (limited to 'odb/relational/oracle/schema.cxx')
-rw-r--r--odb/relational/oracle/schema.cxx25
1 files changed, 25 insertions, 0 deletions
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> 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> schema_file_;
+
+ //
// Drop.
//