aboutsummaryrefslogtreecommitdiff
path: root/libbrep/package-traits.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-29 23:55:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:57:17 +0300
commit8f3d3956b1e837c726859eb8bbe19dad79c54a42 (patch)
tree81ded52db212b12c7f685165702cce90aa0233cf /libbrep/package-traits.hxx
parentea60a6df471706a0eeb5ff1f774d69abe89e4bc9 (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'libbrep/package-traits.hxx')
-rw-r--r--libbrep/package-traits.hxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/libbrep/package-traits.hxx b/libbrep/package-traits.hxx
new file mode 100644
index 0000000..b626ea8
--- /dev/null
+++ b/libbrep/package-traits.hxx
@@ -0,0 +1,38 @@
+// file : brep/package-traits -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BREP_PACKAGE_TRAITS
+#define BREP_PACKAGE_TRAITS
+
+#include <cstddef> // size_t
+
+#include <odb/pgsql/traits.hxx>
+
+#include <libbrep/package.hxx> // weighted_text
+
+namespace odb
+{
+ namespace pgsql
+ {
+ template <>
+ class value_traits<brep::weighted_text, id_string>
+ {
+ public:
+ typedef brep::weighted_text value_type;
+ typedef value_type query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (value_type&, const details::buffer&, std::size_t, bool) {}
+
+ static void
+ set_image (details::buffer&,
+ std::size_t& n,
+ bool& is_null,
+ const value_type&);
+ };
+ }
+}
+
+#endif // BREP_PACKAGE_TRAITS