aboutsummaryrefslogtreecommitdiff
path: root/common/session/custom/session.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-20 08:20:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-20 08:20:56 +0200
commit539c92147e8d58c49f350c4070051a6ddf6b2354 (patch)
tree42620646906353b49970e4f45eddb89f0fc613ca /common/session/custom/session.txx
parentf73c92b7b61368fb60a112b1a44212ae95aad84d (diff)
Add cache_ suffix to session cache functions
This way they won't conflict with other functions (e.g., delayed database operations) that may have the same names.
Diffstat (limited to 'common/session/custom/session.txx')
-rw-r--r--common/session/custom/session.txx21
1 files changed, 11 insertions, 10 deletions
diff --git a/common/session/custom/session.txx b/common/session/custom/session.txx
index 31c08c7..de1f3f0 100644
--- a/common/session/custom/session.txx
+++ b/common/session/custom/session.txx
@@ -5,15 +5,15 @@
#include <cassert>
template <typename T>
-typename session::position<T> session::
-insert (odb::database&,
- const typename odb::object_traits<T>::id_type& id,
- const typename odb::object_traits<T>::pointer_type& obj)
+typename session::cache_position<T> session::
+_cache_insert (odb::database&,
+ const typename odb::object_traits<T>::id_type& id,
+ const typename odb::object_traits<T>::pointer_type& obj)
{
typedef odb::object_traits<T> object_traits;
if (current == 0)
- return position<T> (); // No session, return empty position.
+ return cache_position<T> (); // No session, return empty position.
std::shared_ptr<object_map_base>& pm (current->map_[&typeid (T)]);
@@ -29,12 +29,12 @@ insert (odb::database&,
//
assert (r.second);
- return position<T> (m, r.first);
+ return cache_position<T> (m, r.first);
}
template <typename T>
typename odb::object_traits<T>::pointer_type session::
-find (odb::database&, const typename odb::object_traits<T>::id_type& id)
+_cache_find (odb::database&, const typename odb::object_traits<T>::id_type& id)
{
typedef typename odb::object_traits<T>::pointer_type pointer_type;
@@ -57,7 +57,7 @@ find (odb::database&, const typename odb::object_traits<T>::id_type& id)
template <typename T>
void session::
-load (const position<T>& p)
+_cache_load (const cache_position<T>& p)
{
typedef typename odb::object_traits<T>::pointer_type pointer_type;
@@ -75,7 +75,7 @@ load (const position<T>& p)
template <typename T>
void session::
-update (odb::database&, const T& obj)
+_cache_update (odb::database&, const T& obj)
{
typedef odb::object_traits<T> object_traits;
typedef typename object_traits::pointer_type pointer_type;
@@ -105,7 +105,8 @@ update (odb::database&, const T& obj)
template <typename T>
void session::
-erase (odb::database&, const typename odb::object_traits<T>::id_type& id)
+_cache_erase (odb::database&,
+ const typename odb::object_traits<T>::id_type& id)
{
if (current == 0)
return; // No session.