diff options
Diffstat (limited to 'odb/semantics')
-rw-r--r-- | odb/semantics/relational/changelog.cxx | 3 | ||||
-rw-r--r-- | odb/semantics/relational/changelog.hxx | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/odb/semantics/relational/changelog.cxx b/odb/semantics/relational/changelog.cxx index fb304ca..73dac77 100644 --- a/odb/semantics/relational/changelog.cxx +++ b/odb/semantics/relational/changelog.cxx @@ -29,6 +29,8 @@ namespace semantics if (p.attribute<unsigned int> ("version") != 1) throw parsing (p, "unsupported changelog format version"); + database_ = p.attribute ("database"); + // Because things are stored in the reverse order, first save the // changesets as XML chunks and then re-parse them in the reverse // order. We have to do it this way so that we can do lookups along @@ -125,6 +127,7 @@ namespace semantics { s.start_element (xmlns, "changelog"); s.namespace_decl (xmlns, ""); + s.attribute ("database", database_); s.attribute ("version", 1); // Format version. // For better readability serialize things in reverse order so that diff --git a/odb/semantics/relational/changelog.hxx b/odb/semantics/relational/changelog.hxx index d9e220c..a27c946 100644 --- a/odb/semantics/relational/changelog.hxx +++ b/odb/semantics/relational/changelog.hxx @@ -119,7 +119,11 @@ namespace semantics } public: - changelog (): contains_model_ (0) {} + string const& + database () const {return database_;} + + public: + changelog (string const& db): database_ (db), contains_model_ (0) {} changelog (xml::parser&); void @@ -146,6 +150,7 @@ namespace semantics changelog& operator= (changelog const&); protected: + string database_; contains_model_type* contains_model_; contains_changeset_list contains_changeset_; }; |