From 654826cdafaac4199c8a8c90ef3396e312f0944f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Sep 2013 13:02:10 +0200 Subject: Versioned section support --- odb/context.hxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index 9bd0057..9e7ac0a 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -347,8 +347,9 @@ struct user_section: object_section special_type s = special_ordinary) : member (&m), object (&o), base (0), index (i), load (l), update (u), special (s), - total (0), inverse (0), readonly (0), - containers (false), readwrite_containers (false) {} + total (0), inverse (0), readonly (0), versioned (false), + containers (false), readwrite_containers (false), + versioned_containers (false), readwrite_versioned_containers (false) {} virtual bool compare (object_section const& s) const; @@ -399,9 +400,14 @@ struct user_section: object_section std::size_t inverse; std::size_t readonly; + bool versioned; + bool containers; bool readwrite_containers; + bool versioned_containers; + bool readwrite_versioned_containers; + // Total counts across overrides. // std::size_t @@ -475,10 +481,18 @@ struct user_sections: std::list // static unsigned short const count_optimistic = 0x10; + // Modifiers: + // + // Don't exclude fake optimistic version update section from the count. // static unsigned short const count_special_version = 0x20; + // Only count versioned sections. + // + static unsigned short const count_versioned_only = 0x40; + + // Count all sections, including special. // static unsigned short const count_all = count_update | -- cgit v1.1