From 8488de0d5bdf95334cd2e61927515ca98f80344f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 5 Apr 2017 15:00:54 +0200 Subject: Add ability to mark unloaded section as loaded Can be useful to skip loading state that is going to be overwritten. --- odb/section.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/odb/section.hxx b/odb/section.hxx index 93c5d66..c6f0da7 100644 --- a/odb/section.hxx +++ b/odb/section.hxx @@ -32,6 +32,15 @@ namespace odb state_.restore = 0; } + // Mark an unloaded section as loaded. This, for example, can be useful if + // you don't want to load the old data before overwriting it with update(). + // + void + load () + { + state_.loaded = 1; + } + // Change state. // bool -- cgit v1.1