aboutsummaryrefslogtreecommitdiff
path: root/bulk/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-10-09 11:22:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-11 10:29:50 +0200
commitc7711aee32b17df232a967e9b368ec44ab237530 (patch)
treec594828e8e43d17b9155b78dc1ea8f631172bb26 /bulk/driver.cxx
parent0d0e4b23176f0b55d7948ffef9b9ffdad6a95973 (diff)
Initial bulk erase implementation
Diffstat (limited to 'bulk/driver.cxx')
-rw-r--r--bulk/driver.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/bulk/driver.cxx b/bulk/driver.cxx
index 8632905..b0b259a 100644
--- a/bulk/driver.cxx
+++ b/bulk/driver.cxx
@@ -98,6 +98,23 @@ main (int argc, char* argv[])
t.commit ();
}
+
+ {
+ transaction t (db->begin ());
+
+ unsigned long ids[] = {
+ pp[0]->id,
+ pp[1]->id,
+ pp[2]->id,
+ pp[3]->id,
+ pp[4]->id,
+ 123
+ };
+
+ db->erase<person> (ids, ids + sizeof (ids)/sizeof (ids[0]));
+
+ t.commit ();
+ }
}
catch (const odb::exception& e)
{