summaryrefslogtreecommitdiff
path: root/odb/relational/mysql/schema.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/relational/mysql/schema.cxx')
-rw-r--r--odb/relational/mysql/schema.cxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/odb/relational/mysql/schema.cxx b/odb/relational/mysql/schema.cxx
new file mode 100644
index 0000000..19569e4
--- /dev/null
+++ b/odb/relational/mysql/schema.cxx
@@ -0,0 +1,53 @@
+// file : odb/relational/mysql/schema.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+// license : GNU GPL v3; see accompanying LICENSE file
+
+#include <odb/relational/schema.hxx>
+
+#include <odb/relational/mysql/common.hxx>
+#include <odb/relational/mysql/context.hxx>
+
+namespace relational
+{
+ namespace mysql
+ {
+ namespace schema
+ {
+ namespace relational = relational::schema;
+
+ //
+ // Create.
+ //
+
+ struct create_common: virtual relational::create_common
+ {
+ virtual void
+ create_post ()
+ {
+ os << ")";
+
+ string const& engine (options.mysql_engine ());
+
+ if (engine != "default")
+ os << endl
+ << " ENGINE=" << engine;
+
+ os << endl;
+ }
+ };
+
+ struct member_create: relational::member_create, create_common
+ {
+ member_create (base const& x): base (x) {}
+ };
+ entry<member_create> member_create_;
+
+ struct class_create: relational::class_create, create_common
+ {
+ class_create (base const& x): base (x) {}
+ };
+ entry<class_create> class_create_;
+ }
+ }
+}