summaryrefslogtreecommitdiff
path: root/odb/semantics/relational/column.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-18 13:10:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-10 18:46:43 +0200
commit3b457daf6b252ef31ec0611e7375aa4badd8e63d (patch)
tree8874473de1c2cf6c1fd5a63a93c609d6f3fd0127 /odb/semantics/relational/column.cxx
parent1112388f458cbbac8a73ca840f7f62f6f517e9fa (diff)
Add support for copying database models
Diffstat (limited to 'odb/semantics/relational/column.cxx')
-rw-r--r--odb/semantics/relational/column.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/odb/semantics/relational/column.cxx b/odb/semantics/relational/column.cxx
index a4c39c3..05b8eff 100644
--- a/odb/semantics/relational/column.cxx
+++ b/odb/semantics/relational/column.cxx
@@ -3,13 +3,24 @@
// license : GNU GPL v3; see accompanying LICENSE file
#include <cutl/compiler/type-info.hxx>
-#include <odb/semantics/relational.hxx>
+
+#include <odb/semantics/relational/column.hxx>
namespace semantics
{
namespace relational
{
column::
+ column (column const& c, uscope&, graph& g)
+ : unameable (c, g),
+ type_ (c.type_),
+ null_ (c.null_),
+ default__ (c.default__),
+ options_ (c.options_)
+ {
+ }
+
+ column::
column (xml::parser& p, uscope&, graph& g)
: unameable (p, g),
type_ (p.attribute ("type", string ())),
@@ -20,6 +31,12 @@ namespace semantics
p.content (xml::parser::empty);
}
+ column& column::
+ clone (uscope& s, graph& g) const
+ {
+ return g.new_node<column> (*this, s, g);
+ }
+
void column::
serialize (xml::serializer& s) const
{