aboutsummaryrefslogtreecommitdiff
path: root/sqlite/attach/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-06-14 10:01:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-06-14 10:01:20 +0200
commitd776aad4d4abb8eabd240621eb3d13b59a5b17d8 (patch)
treedc0ad5955eab72ba96452423aebfc6b7ad110540 /sqlite/attach/test.hxx
parent1357765fd5d2bca38193f9be6f38618aef0b3ab0 (diff)
Add test for SQLite ATTACH DATABASE support
Diffstat (limited to 'sqlite/attach/test.hxx')
-rw-r--r--sqlite/attach/test.hxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/sqlite/attach/test.hxx b/sqlite/attach/test.hxx
new file mode 100644
index 0000000..b3b8f63
--- /dev/null
+++ b/sqlite/attach/test.hxx
@@ -0,0 +1,32 @@
+// file : sqlite/attach/test.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef TEST_HXX
+#define TEST_HXX
+
+#include <odb/core.hxx>
+#include <odb/nullable.hxx>
+
+#include <string>
+
+#include <odb/core.hxx>
+
+#pragma db object
+struct object
+{
+ explicit
+ object (const std::string& s): str (s) {}
+
+ #pragma db id auto
+ unsigned long id;
+
+ #pragma db unique
+ std::string str;
+
+private:
+ object () {}
+
+ friend class odb::access;
+};
+
+#endif // TEST_HXX