summaryrefslogtreecommitdiff
path: root/odb-tests/mysql/truncation/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb-tests/mysql/truncation/test.hxx')
-rw-r--r--odb-tests/mysql/truncation/test.hxx48
1 files changed, 48 insertions, 0 deletions
diff --git a/odb-tests/mysql/truncation/test.hxx b/odb-tests/mysql/truncation/test.hxx
new file mode 100644
index 0000000..1883b0e
--- /dev/null
+++ b/odb-tests/mysql/truncation/test.hxx
@@ -0,0 +1,48 @@
+// file : mysql/truncation/test.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef TEST_HXX
+#define TEST_HXX
+
+#include <string>
+#include <vector>
+
+#include <odb/core.hxx>
+
+#pragma db object table ("test")
+struct object1
+{
+ object1 () {}
+ object1 (unsigned long id): id_ (id) {}
+
+ #pragma db id
+ unsigned long id_;
+
+ std::string str_;
+};
+
+#pragma db object table ("test")
+struct object2
+{
+ object2 () {}
+ object2 (unsigned long id): id_ (id) {}
+
+ #pragma db id
+ unsigned long id_;
+
+ std::string str_;
+};
+
+#pragma db object
+struct container
+{
+ container () {}
+ container (unsigned long id) : id_ (id) {}
+
+ #pragma db id
+ unsigned long id_;
+
+ std::vector<std::string> vec_;
+};
+
+#endif // TEST_HXX