From a28444da4ca6adb016f719e032174ccb54e1692e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Sep 2011 13:00:33 +0200 Subject: Rework const object handling Now objects are always loaded as non-const and the object cache in session treats all objects as non-const. --- odb/database.ixx | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) (limited to 'odb/database.ixx') diff --git a/odb/database.ixx b/odb/database.ixx index c4b3c77..7bc6520 100644 --- a/odb/database.ixx +++ b/odb/database.ixx @@ -167,66 +167,48 @@ namespace odb inline unsigned long long database:: erase_query () { - // T can be const T while object_type will always be T. + // T is always object_type. // - typedef typename odb::object_traits::object_type object_type; - - return erase_query (odb::query ()); + return erase_query (odb::query ()); } template inline unsigned long long database:: erase_query (const char* q) { - // T can be const T while object_type will always be T. + // T is always object_type. // - typedef typename odb::object_traits::object_type object_type; - - return erase_query (odb::query (q)); + return erase_query (odb::query (q)); } template inline unsigned long long database:: erase_query (const std::string& q) { - // T can be const T while object_type will always be T. + // T is always object_type. // - typedef typename odb::object_traits::object_type object_type; - - return erase_query (odb::query (q)); + return erase_query (odb::query (q)); } template inline result database:: query (bool cache) { - // T can be const T. - // - typedef typename details::meta::remove_const::result type; - - return query (odb::query (), cache); + return query (odb::query (), cache); } template inline result database:: query (const char* q, bool cache) { - // T can be const T. - // - typedef typename details::meta::remove_const::result type; - - return query (odb::query (q), cache); + return query (odb::query (q), cache); } template inline result database:: query (const std::string& q, bool cache) { - // T can be const T. - // - typedef typename details::meta::remove_const::result type; - - return query (odb::query (q), cache); + return query (odb::query (q), cache); } inline unsigned long long database:: -- cgit v1.1