5 #ifndef ODB_CACHE_TRAITS_HXX
6 #define ODB_CACHE_TRAITS_HXX
23 template <
typename P,
typename S, po
inter_kind pk>
31 typedef typename session_type::template cache_position<object_type>
66 return session_type::template _cache_insert<object_type> (db, id, p);
74 pointer_traits::get_ref (p)));
76 return session_type::template _cache_insert<object_type> (db, id, p);
82 return session_type::template _cache_find<object_type> (db, id);
88 session_type::template _cache_erase<object_type> (p);
96 session_type::template _cache_persist<object_type> (p);
102 session_type::template _cache_load<object_type> (p);
108 session_type::template _cache_update<object_type> (db, obj);
114 session_type::template _cache_erase<object_type> (db, id);
120 template <
typename P,
typename S>
124 template <
typename P,
typename S>
134 template <
typename T,
typename S, po
inter_kind pk>
137 template <
typename T,
typename S>
152 return pointer_traits::insert (db,
id, p);
159 return pointer_traits::insert (db, p);
165 pointer_traits::persist (p);
171 pointer_traits::load (p);
175 template <
typename T,
typename S>
178 T, S, pointer_traits<typename object_traits<T>::pointer_type>::kind> {};
183 #endif // ODB_CACHE_TRAITS_HXX
T object_type
Definition: cache-traits.hxx:140
pointer_traits::position_type position_type
Definition: cache-traits.hxx:145
static void erase(odb::database &db, const id_type &id)
Definition: cache-traits.hxx:112
void reset(const position_type &pos)
Definition: cache-traits.hxx:49
static void update(odb::database &db, const object_type &obj)
Definition: cache-traits.hxx:106
pointer_traits::insert_guard insert_guard
Definition: cache-traits.hxx:146
object_traits< object_type >::id_type id_type
Definition: cache-traits.hxx:30
Definition: cache-traits.hxx:125
Definition: forward.hxx:140
Definition: cache-traits.hxx:135
~insert_guard()
Definition: cache-traits.hxx:38
static void load(const position_type &p)
Definition: cache-traits.hxx:100
S session_type
Definition: cache-traits.hxx:27
static void persist(const position_type &p)
Definition: cache-traits.hxx:163
object_traits< object_type >::id_type id_type
Definition: cache-traits.hxx:142
insert_guard(const position_type &pos)
Definition: cache-traits.hxx:37
Definition: pointer-traits.hxx:28
static void load(const position_type &p)
Definition: cache-traits.hxx:169
Definition: forward.hxx:123
pointer_cache_traits< pointer_type, S > pointer_traits
Definition: cache-traits.hxx:144
static void persist(const position_type &p)
Definition: cache-traits.hxx:94
odb::pointer_traits< pointer_type > pointer_traits
Definition: cache-traits.hxx:28
object_traits< object_type >::pointer_type pointer_type
Definition: cache-traits.hxx:141
static position_type insert(odb::database &db, object_type &obj)
Definition: cache-traits.hxx:156
pointer_traits::element_type object_type
Definition: cache-traits.hxx:29
Definition: database.hxx:38
static position_type insert(odb::database &db, const id_type &id, const pointer_type &p)
Definition: cache-traits.hxx:64
static pointer_type find(odb::database &db, const id_type &id)
Definition: cache-traits.hxx:80
static position_type insert(odb::database &db, const id_type &id, object_type &obj)
Definition: cache-traits.hxx:149
P pointer_type
Definition: cache-traits.hxx:26
Definition: cache-traits.hxx:34
static void erase(const position_type &p)
Definition: cache-traits.hxx:86
Definition: pointer-traits.hxx:21
const position_type & position() const
Definition: cache-traits.hxx:41
Definition: cache-traits.hxx:24
Definition: forward.hxx:137
session_type::template cache_position< object_type > position_type
Definition: cache-traits.hxx:32
static position_type insert(odb::database &db, const pointer_type &p)
Definition: cache-traits.hxx:70
insert_guard()
Definition: cache-traits.hxx:36
access::object_traits< T >::pointer_type pointer_type
Definition: traits.hxx:116
Definition: pointer-traits.hxx:22
void release()
Definition: cache-traits.hxx:44
Definition: cache-traits.hxx:176