ifw-ccf  1.0.0
Public Member Functions | List of all members
ccf::common::InternalDb Class Reference

DB implementing (partially) the rad::DbAdapter interface; used for internal/test purposes. More...

#include <db.hpp>

Inheritance diagram for ccf::common::InternalDb:

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
 
InternalDboperator= (const InternalDb &)=delete
 Disable copy constructor. More...
 

Detailed Description

DB implementing (partially) the rad::DbAdapter interface; used for internal/test purposes.

Constructor & Destructor Documentation

◆ InternalDb() [1/2]

ccf::common::InternalDb::InternalDb ( )
inline

◆ ~InternalDb()

ccf::common::InternalDb::~InternalDb ( )
inline

◆ InternalDb() [2/2]

ccf::common::InternalDb::InternalDb ( const InternalDb )
delete

Member Function Documentation

◆ Config()

void ccf::common::InternalDb::Config ( const std::string &  endpoint,
const timeval &  timeout 
)

Configure the endpoint and timeout to apply for this interface.

◆ Connect()

void ccf::common::InternalDb::Connect ( )

Connect to the DB.

◆ Delete()

int ccf::common::InternalDb::Delete ( const std::vector< std::string > &  keys)

Delete the keys listed.

◆ Disconnect()

void ccf::common::InternalDb::Disconnect ( )

Disconnect from the DB.

◆ Exists()

bool ccf::common::InternalDb::Exists ( const std::string &  key)

Check if the given key exists.

◆ Get() [1/2]

std::string ccf::common::InternalDb::Get ( const std::string &  key)

Get the value of the given key.

◆ Get() [2/2]

std::string ccf::common::InternalDb::Get ( const std::string &  key,
const std::string &  field 
)

Get the given key/field.

◆ IsConnected()

bool ccf::common::InternalDb::IsConnected ( )

Returns true if connection is establihed.

◆ MultiGet() [1/2]

std::vector< std::string > ccf::common::InternalDb::MultiGet ( const std::string &  key,
const std::vector< std::string > &  fields 
)

Get a set of keys/fields.

◆ MultiGet() [2/2]

std::vector< std::string > ccf::common::InternalDb::MultiGet ( const std::vector< std::string > &  keys)

Get a set of keys.

◆ MultiSet() [1/2]

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.

◆ MultiSet() [2/2]

void ccf::common::InternalDb::MultiSet ( const std::vector< std::string > &  kvs)

Set a set of keys and values.

◆ operator=()

InternalDb& ccf::common::InternalDb::operator= ( const InternalDb )
delete

Disable copy constructor.

◆ Scan()

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.

◆ Set() [1/2]

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.

◆ Set() [2/2]

void ccf::common::InternalDb::Set ( const std::string &  key,
const std::string &  value 
)

Set the given key to the given value.


The documentation for this class was generated from the following files: