From c4aa0184abbf59d27b6d26022a4cbf38183e227b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 24 Apr 2011 09:48:41 +0200 Subject: Add missing default_type_traits specializations --- odb/boost/date-time/mysql/gregorian-traits.hxx | 6 ++++++ odb/boost/date-time/mysql/posix-time-traits.hxx | 12 ++++++++++++ odb/boost/date-time/sqlite/gregorian-traits.hxx | 6 ++++++ odb/boost/date-time/sqlite/posix-time-traits.hxx | 12 ++++++++++++ 4 files changed, 36 insertions(+) diff --git a/odb/boost/date-time/mysql/gregorian-traits.hxx b/odb/boost/date-time/mysql/gregorian-traits.hxx index 4beb877..2df2483 100644 --- a/odb/boost/date-time/mysql/gregorian-traits.hxx +++ b/odb/boost/date-time/mysql/gregorian-traits.hxx @@ -56,6 +56,12 @@ namespace odb } } }; + + template <> + class default_type_traits< ::boost::gregorian::date> + { + static const database_type_id db_type_id = id_date; + }; } } diff --git a/odb/boost/date-time/mysql/posix-time-traits.hxx b/odb/boost/date-time/mysql/posix-time-traits.hxx index 5346b36..916be76 100644 --- a/odb/boost/date-time/mysql/posix-time-traits.hxx +++ b/odb/boost/date-time/mysql/posix-time-traits.hxx @@ -169,6 +169,18 @@ namespace odb } } }; + + template <> + class default_type_traits< ::boost::posix_time::ptime> + { + static const database_type_id db_type_id = id_datetime; + }; + + template <> + class default_type_traits< ::boost::posix_time::time_duration> + { + static const database_type_id db_type_id = id_time; + }; } } diff --git a/odb/boost/date-time/sqlite/gregorian-traits.hxx b/odb/boost/date-time/sqlite/gregorian-traits.hxx index f11af0a..b7e5f39 100644 --- a/odb/boost/date-time/sqlite/gregorian-traits.hxx +++ b/odb/boost/date-time/sqlite/gregorian-traits.hxx @@ -123,6 +123,12 @@ namespace odb } } }; + + template <> + class default_type_traits< ::boost::gregorian::date> + { + static const database_type_id db_type_id = id_text; + }; } } diff --git a/odb/boost/date-time/sqlite/posix-time-traits.hxx b/odb/boost/date-time/sqlite/posix-time-traits.hxx index 926b682..41ce7e5 100644 --- a/odb/boost/date-time/sqlite/posix-time-traits.hxx +++ b/odb/boost/date-time/sqlite/posix-time-traits.hxx @@ -224,6 +224,18 @@ namespace odb } } }; + + template <> + class default_type_traits< ::boost::posix_time::ptime> + { + static const database_type_id db_type_id = id_text; + }; + + template <> + class default_type_traits< ::boost::posix_time::time_duration> + { + static const database_type_id db_type_id = id_text; + }; } } -- cgit v1.1