diff options
Diffstat (limited to 'odb/std-unordered-map-traits.hxx')
-rw-r--r-- | odb/std-unordered-map-traits.hxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/odb/std-unordered-map-traits.hxx b/odb/std-unordered-map-traits.hxx index 072d345..6045d4c 100644 --- a/odb/std-unordered-map-traits.hxx +++ b/odb/std-unordered-map-traits.hxx @@ -18,7 +18,8 @@ namespace odb class access::container_traits<std::unordered_map<K, V, H, P, A>> { public: - static container_kind const kind = ck_map; + static const container_kind kind = ck_map; + static const bool smart = false; typedef std::unordered_map<K, V, H, P, A> container_type; @@ -34,7 +35,7 @@ namespace odb { for (typename container_type::const_iterator i (c.begin ()), e (c.end ()); i != e; ++i) - f.insert_one (i->first, i->second); + f.insert (i->first, i->second); } static void @@ -46,7 +47,7 @@ namespace odb { key_type k; value_type v; - more = f.load_all (k, v); + more = f.select (k, v); c.insert (pair_type (std::move (k), std::move (v))); } } @@ -54,17 +55,17 @@ namespace odb static void update (const container_type& c, const functions& f) { - f.delete_all (); + f.delete_ (); for (typename container_type::const_iterator i (c.begin ()), e (c.end ()); i != e; ++i) - f.insert_one (i->first, i->second); + f.insert (i->first, i->second); } static void erase (const functions& f) { - f.delete_all (); + f.delete_ (); } }; @@ -76,7 +77,8 @@ namespace odb class access::container_traits<std::unordered_multimap<K, V, H, P, A>> { public: - static container_kind const kind = ck_multimap; + static const container_kind kind = ck_multimap; + static const bool smart = false; typedef std::unordered_multimap<K, V, H, P, A> container_type; @@ -92,7 +94,7 @@ namespace odb { for (typename container_type::const_iterator i (c.begin ()), e (c.end ()); i != e; ++i) - f.insert_one (i->first, i->second); + f.insert (i->first, i->second); } static void @@ -104,7 +106,7 @@ namespace odb { key_type k; value_type v; - more = f.load_all (k, v); + more = f.select (k, v); c.insert (pair_type (std::move (k), std::move (v))); } } @@ -112,17 +114,17 @@ namespace odb static void update (const container_type& c, const functions& f) { - f.delete_all (); + f.delete_ (); for (typename container_type::const_iterator i (c.begin ()), e (c.end ()); i != e; ++i) - f.insert_one (i->first, i->second); + f.insert (i->first, i->second); } static void erase (const functions& f) { - f.delete_all (); + f.delete_ (); } }; } |