From 565ad74e164abdaaa31de146a1ef76f3d3f6734d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 16 Sep 2013 10:17:08 +0200 Subject: Implement summary soft-deletion for composite value types --- odb/context.hxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index f188a41..e0238dd 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -797,6 +797,12 @@ public: // Return the addition version or 0 if not soft-added. // static unsigned long long + added (semantics::class_& c) // Used for composite only. + { + return c.get ("added", 0); + } + + static unsigned long long added (semantics::data_member& m) { return m.get ("added", 0); @@ -1235,6 +1241,8 @@ public: readonly (0), optimistic_managed (0), discriminator (0), + added (0), + deleted (0), soft (0), separate_load (0), separate_update (0) @@ -1248,7 +1256,9 @@ public: size_t optimistic_managed; size_t discriminator; - size_t soft; // Soft-added/deleted. + size_t added; // Soft-added. + size_t deleted; // Soft-deleted. + size_t soft; // Soft-added/deleted (a column can be both). size_t separate_load; size_t separate_update; // Only readwrite. -- cgit v1.1