|
ifw-ccf
1.0.0
|
DB implementing (partially) the rad::DbAdapter interface; used for internal/test purposes. More...
#include <db.hpp>
Public Member Functions | |
| InternalDb () | |
| ~InternalDb () | |
| void | Config (const std::string &endpoint, const timeval &timeout) |
| Configure the endpoint and timeout to apply for this interface. More... | |
| int | Delete (const std::vector< std::string > &keys) |
| Delete the keys listed. More... | |
| bool | Exists (const std::string &key) |
| Check if the given key exists. More... | |
| std::string | Get (const std::string &key) |
| Get the value of the given key. More... | |
| std::vector< std::string > | MultiGet (const std::vector< std::string > &keys) |
| Get a set of keys. More... | |
| std::string | Get (const std::string &key, const std::string &field) |
| Get the given key/field. More... | |
| std::vector< std::string > | MultiGet (const std::string &key, const std::vector< std::string > &fields) |
| Get a set of keys/fields. More... | |
| std::map< std::string, std::string > | Scan (const std::string &key, const std::string &pattern) |
| Scan the DB for the given key applying the given key/field. More... | |
| void | Set (const std::string &key, const std::string &value) |
| Set the given key to the given value. More... | |
| void | MultiSet (const std::vector< std::string > &kvs) |
| Set a set of keys and values. More... | |
| void | Set (const std::string &key, const std::string &field, const std::string &value) |
| Set the given key/field to the given value. More... | |
| void | MultiSet (const std::string &key, const std::vector< std::string > &fvs) |
| Set the given set of keys to the given values. More... | |
| void | Connect () |
| Connect to the DB. More... | |
| void | Disconnect () |
| Disconnect from the DB. More... | |
| bool | IsConnected () |
| Returns true if connection is establihed. More... | |
| InternalDb (const InternalDb &)=delete | |
| InternalDb & | operator= (const InternalDb &)=delete |
| Disable copy constructor. More... | |
DB implementing (partially) the rad::DbAdapter interface; used for internal/test purposes.
|
inline |
|
inline |
|
delete |
| void ccf::common::InternalDb::Config | ( | const std::string & | endpoint, |
| const timeval & | timeout | ||
| ) |
Configure the endpoint and timeout to apply for this interface.
| void ccf::common::InternalDb::Connect | ( | ) |
Connect to the DB.
| int ccf::common::InternalDb::Delete | ( | const std::vector< std::string > & | keys | ) |
Delete the keys listed.
| void ccf::common::InternalDb::Disconnect | ( | ) |
Disconnect from the DB.
| bool ccf::common::InternalDb::Exists | ( | const std::string & | key | ) |
Check if the given key exists.
| std::string ccf::common::InternalDb::Get | ( | const std::string & | key | ) |
Get the value of the given key.
| std::string ccf::common::InternalDb::Get | ( | const std::string & | key, |
| const std::string & | field | ||
| ) |
Get the given key/field.
| bool ccf::common::InternalDb::IsConnected | ( | ) |
Returns true if connection is establihed.
| std::vector< std::string > ccf::common::InternalDb::MultiGet | ( | const std::string & | key, |
| const std::vector< std::string > & | fields | ||
| ) |
Get a set of keys/fields.
| std::vector< std::string > ccf::common::InternalDb::MultiGet | ( | const std::vector< std::string > & | keys | ) |
Get a set of keys.
| void ccf::common::InternalDb::MultiSet | ( | const std::string & | key, |
| const std::vector< std::string > & | fvs | ||
| ) |
Set the given set of keys to the given values.
| void ccf::common::InternalDb::MultiSet | ( | const std::vector< std::string > & | kvs | ) |
Set a set of keys and values.
|
delete |
Disable copy constructor.
| std::map< std::string, std::string > ccf::common::InternalDb::Scan | ( | const std::string & | key, |
| const std::string & | pattern | ||
| ) |
Scan the DB for the given key applying the given key/field.
| void ccf::common::InternalDb::Set | ( | const std::string & | key, |
| const std::string & | field, | ||
| const std::string & | value | ||
| ) |
Set the given key/field to the given value.
| void ccf::common::InternalDb::Set | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
Set the given key to the given value.