aboutsummaryrefslogtreecommitdiff
path: root/common/erase-query/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-22 11:47:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-22 11:47:55 +0200
commit70a28c298dfe7f047c1390d097c18d5bb0618d07 (patch)
tree5983b81ce4724096565e11f8250e4c30dd548665 /common/erase-query/test.hxx
parentab0fb8ac7e097dcdd3111dc2865f0de14ab27118 (diff)
Add database::erase_query() function
New test: common/erase-query. Documentation is in Section 3.9, "Deleting Persistent Objects". The current implementation does not work well with the session (no removal of the erased objects from the cache).
Diffstat (limited to 'common/erase-query/test.hxx')
-rw-r--r--common/erase-query/test.hxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/erase-query/test.hxx b/common/erase-query/test.hxx
new file mode 100644
index 0000000..be5539f
--- /dev/null
+++ b/common/erase-query/test.hxx
@@ -0,0 +1,31 @@
+// file : common/erase-query/test.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef TEST_HXX
+#define TEST_HXX
+
+#include <vector>
+
+#include <odb/core.hxx>
+
+#pragma db object
+struct object
+{
+ object (unsigned long id)
+ : id_ (id)
+ {
+ }
+
+ object ()
+ {
+ }
+
+ #pragma db id
+ unsigned long id_;
+
+ std::vector<int> v;
+};
+
+#endif // TEST_HXX