aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/traits.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-16 16:03:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-16 16:03:25 +0200
commit02aed5f059797cd5e53a9fe6dde13714f86332d4 (patch)
treeb2bfce8921184f8767dddba221032792b1cb3214 /odb/sqlite/traits.hxx
parenta8b1a89c291ab5bd170568eab3d7666631adf035 (diff)
Support for views; integrated part
Diffstat (limited to 'odb/sqlite/traits.hxx')
-rw-r--r--odb/sqlite/traits.hxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/odb/sqlite/traits.hxx b/odb/sqlite/traits.hxx
index e2a4a4d..e712aa7 100644
--- a/odb/sqlite/traits.hxx
+++ b/odb/sqlite/traits.hxx
@@ -236,8 +236,7 @@ namespace odb
// of an image from the value but not the other way around. This way
// we can pass such values to the queries.
//
- template <>
- struct LIBODB_SQLITE_EXPORT default_value_traits<const char*, id_text>
+ struct LIBODB_SQLITE_EXPORT c_string_value_traits
{
typedef const char* value_type;
typedef const char* query_type;
@@ -250,6 +249,17 @@ namespace odb
const char*);
};
+ template <>
+ struct LIBODB_SQLITE_EXPORT default_value_traits<const char*, id_text>:
+ c_string_value_traits
+ {
+ };
+
+ template <std::size_t n>
+ struct default_value_traits<char[n], id_text>: c_string_value_traits
+ {
+ };
+
// std::vector<char> (buffer) specialization.
//
template <>
@@ -386,6 +396,12 @@ namespace odb
{
static const database_type_id db_type_id = id_text;
};
+
+ template <std::size_t n>
+ struct default_type_traits<char[n]>
+ {
+ static const database_type_id db_type_id = id_text;
+ };
}
}