Simple object storage, ready to use save, find and remove of model classes. id management is not provided.
More...
#include <simple_obj_store.h>
|
Model | find (connection::ptr_t connection, const std::string &id) |
| As the name says, get an object from id specifying it's unique identifier. More...
|
|
void | append_save (connection::ptr_t connection, const Model &m) |
| Save an object on database, or update it if it's already present. Append only method, for using inside a transaction for example. You should take care of calling connection::get_reply() after it. More...
|
|
void | save (connection::ptr_t connection, const Model &m) |
| Save an object on database, or update it if it's already present. More...
|
|
void | append_remove (connection::ptr_t connection, const Model &m) |
| Remove object and all related data from database. Append only method, for using inside a transaction for example. You should take care of calling connection::get_reply() after it. More...
|
|
void | remove (connection::ptr_t connection, const Model &m) |
| Remove object and all related data from database. More...
|
|
std::string | model_key (const std::string &id) |
| Returns Redis Key used to save object data. More...
|
|
template<typename Model>
class redis3m::patterns::simple_obj_store< Model >
Simple object storage, ready to use save, find and remove of model classes. id management is not provided.
template<typename Model >
Remove object and all related data from database. Append only method, for using inside a transaction for example. You should take care of calling connection::get_reply() after it.
- Parameters
-
template<typename Model >
Save an object on database, or update it if it's already present. Append only method, for using inside a transaction for example. You should take care of calling connection::get_reply() after it.
- Parameters
-
template<typename Model >
As the name says, get an object from id specifying it's unique identifier.
- Parameters
-
- Returns
- Use model.loaded() to check if it's valid or not
template<typename Model >
Returns Redis Key used to save object data.
- Parameters
-
- Returns
template<typename Model >
Remove object and all related data from database.
- Parameters
-
template<typename Model >
Save an object on database, or update it if it's already present.
- Parameters
-
The documentation for this class was generated from the following file: