aboutsummaryrefslogtreecommitdiff
path: root/bulk
diff options
context:
space:
mode:
Diffstat (limited to 'bulk')
-rw-r--r--bulk/driver.cxx3
-rw-r--r--bulk/makefile2
-rw-r--r--bulk/person.hxx3
3 files changed, 5 insertions, 3 deletions
diff --git a/bulk/driver.cxx b/bulk/driver.cxx
index b88f614..b8dee4f 100644
--- a/bulk/driver.cxx
+++ b/bulk/driver.cxx
@@ -96,7 +96,7 @@ main (int argc, char* argv[])
try
{
p[0].num += 200;
- p[1].num += 200;
+ //p[1].num += 200;
db->persist (p.begin (), p.begin () + 2);
}
catch (const odb::multiple_exceptions& e)
@@ -173,6 +173,7 @@ main (int argc, char* argv[])
#if 1
{
transaction t (db->begin ());
+ t.tracer (stderr_tracer);
unsigned long ids[] = {
pp[0]->id,
diff --git a/bulk/makefile b/bulk/makefile
index 66c704e..5bbc677 100644
--- a/bulk/makefile
+++ b/bulk/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --generate-schema --disabled
+$(gen) $(dist): export odb_options += --generate-schema
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)
diff --git a/bulk/person.hxx b/bulk/person.hxx
index ac7a66b..177d4ce 100644
--- a/bulk/person.hxx
+++ b/bulk/person.hxx
@@ -8,13 +8,14 @@
#include <odb/core.hxx>
-#pragma db object
+#pragma db object bulk(3)
class person
{
public:
#pragma db id auto
unsigned long id;
+ #pragma db unique
unsigned int num;
#ifdef ODB_DATABASE_MSSQL