diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-18 13:10:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-10 18:46:43 +0200 |
commit | 3b457daf6b252ef31ec0611e7375aa4badd8e63d (patch) | |
tree | 8874473de1c2cf6c1fd5a63a93c609d6f3fd0127 /odb/semantics/relational/key.cxx | |
parent | 1112388f458cbbac8a73ca840f7f62f6f517e9fa (diff) |
Add support for copying database models
Diffstat (limited to 'odb/semantics/relational/key.cxx')
-rw-r--r-- | odb/semantics/relational/key.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/odb/semantics/relational/key.cxx b/odb/semantics/relational/key.cxx index 2358562..e27253c 100644 --- a/odb/semantics/relational/key.cxx +++ b/odb/semantics/relational/key.cxx @@ -3,13 +3,28 @@ // license : GNU GPL v3; see accompanying LICENSE file #include <cutl/compiler/type-info.hxx> -#include <odb/semantics/relational.hxx> + +#include <odb/semantics/relational/key.hxx> +#include <odb/semantics/relational/column.hxx> namespace semantics { namespace relational { key:: + key (key const& k, uscope& s, graph& g) + : unameable (k, g) + { + for (contains_iterator i (k.contains_begin ()); + i != k.contains_end (); ++i) + { + column* c (s.find<column> (i->column ().name ())); + assert (c != 0); + g.new_edge<contains> (*this, *c, i->options ()); + } + } + + key:: key (xml::parser& p, uscope& s, graph& g) : unameable (p, g) { |