diff options
Diffstat (limited to 'common/session/custom/driver.cxx')
-rw-r--r-- | common/session/custom/driver.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/common/session/custom/driver.cxx b/common/session/custom/driver.cxx index 1ec7cbb..0a58ea5 100644 --- a/common/session/custom/driver.cxx +++ b/common/session/custom/driver.cxx @@ -145,10 +145,10 @@ main (int argc, char* argv[]) transaction t (db->begin ()); tracer.count = 0; t.tracer (tracer); - s.flush (*db); // Flush all the changes. + s.flush (*db); assert (tracer.count == 2); t.commit (); - s.mark (); // Mark all the changed objects as unchanged. + s.mark (); } { @@ -159,6 +159,22 @@ main (int argc, char* argv[]) assert (tracer.count == 0); t.commit (); } + + // Explicit update. + // + cs->symbol ("CS"); + st->symbol ("ST"); + + { + transaction t (db->begin ()); + db->update (cs); + tracer.count = 0; + t.tracer (tracer); + s.flush (*db); + assert (tracer.count == 1); + t.commit (); + s.mark (); + } } catch (const odb::exception& e) { |