From c7711aee32b17df232a967e9b368ec44ab237530 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Oct 2014 11:22:06 +0200 Subject: Initial bulk erase implementation --- bulk/driver.cxx | 17 +++++++++++++++++ bulk/mssql/auto/person-odb.hxx | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) 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 (ids, ids + sizeof (ids)/sizeof (ids[0])); + + t.commit (); + } } catch (const odb::exception& e) { diff --git a/bulk/mssql/auto/person-odb.hxx b/bulk/mssql/auto/person-odb.hxx index f73d829..7c1651f 100644 --- a/bulk/mssql/auto/person-odb.hxx +++ b/bulk/mssql/auto/person-odb.hxx @@ -7,7 +7,7 @@ #include -#if (ODB_VERSION != 20302UL) +#if (ODB_VERSION != 20303UL) #error ODB runtime version mismatch #endif -- cgit v1.1