summaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-10-24 16:32:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-10-24 16:32:51 +0200
commit08a47c70ad517b80b72914d47d547463f576bcd3 (patch)
tree8a6ab07cf05e8668ea3c91735dfe97e2a98f3f05 /odb/context.hxx
parenta976183dc95a8b7a9bd7a308c3ea94f08982c426 (diff)
Generate database schema from database model instead of C++ model
We now first create the so-called database model from C++ model and then use that to generate the database schema. The new approach also adds more general support for primary/foreign keys, including multi- column keys. Finally, for MySQL we now generate out-of-line foreign key definitions. Because MySQL does not support deferred constraints checking, deferred foreign keys are written commented out, for documentation.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index b52ead3..d1a9073 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -24,6 +24,7 @@
#include <odb/options.hxx>
#include <odb/cxx-token.hxx>
#include <odb/semantics.hxx>
+#include <odb/semantics/relational/model.hxx>
#include <odb/traversal.hxx>
using std::endl;
@@ -787,7 +788,10 @@ private:
// Create concrete database context.
//
std::auto_ptr<context>
-create_context (std::ostream&, semantics::unit&, options const&);
+create_context (std::ostream&,
+ semantics::unit&,
+ options const&,
+ semantics::relational::model*);
// Checks if scope Y names any of X.
//