Your Driver's class must be inherited from that base class class BaseDB.
More...
#include <BaseDB.hpp>
Public Member Functions |
| BaseDB () |
virtual | ~BaseDB () |
virtual void | setDatabaseName (const std::string &dbName) |
| set the database name
|
virtual void | setDriverUrl (const std::string &dbUrl) |
| set the driver URL
|
virtual void | put (const std::string &key, const std::string &value)=0 |
| put document with given ID to Search Engine
|
virtual std::string | get (const std::string &key)=0 |
| get document with given ID from Search Engine
|
virtual std::vector< std::string > | get_all ()=0 |
| get all documents with given ID from Search Engine
|
virtual void | del (const std::string &key)=0 |
| delete document with given ID from Search Engine
|
virtual int | getLastError () const =0 |
| get status last performed operation. Must be called after method to get operation's status
|
void | setWriteUnique (const bool writeUnique) |
void | setWritePolicy (const bool writePolicy) |
const bool | getWriteUnique () const |
const bool | getWritePolicy () const |
Detailed Description
Your Driver's class must be inherited from that base class class BaseDB.
A base Search Engine driver's class
Definition at line 47 of file BaseDB.hpp.
Member Typedef Documentation
Constructor & Destructor Documentation
virtual HCE::BaseDB::~BaseDB |
( |
| ) |
|
|
inlinevirtual |
Member Function Documentation
virtual void HCE::BaseDB::del |
( |
const std::string & |
key | ) |
|
|
pure virtual |
delete document with given ID from Search Engine
A pure virtual member.
- Parameters
-
key | the document's ID method must set _error to operation's result state: ACTION_SUCCESS - operation was completed successfully ACTION_GENERAL_FAILURE - operation was failed |
- Returns
- document's content
Implemented in HCE::FakeDB, HCE::VoldemortDB, HCE::LevelDB, and HCE::AerospikeDB.
virtual std::string HCE::BaseDB::get |
( |
const std::string & |
key | ) |
|
|
pure virtual |
get document with given ID from Search Engine
A pure virtual member.
- Parameters
-
key | the document's ID method must set _error to operation's result state: DOCUMENT_PRESENT - operation was completed successfully (document was present) DOCUMENT_NOT_PRESENT - operation was failed (document wasn't present) |
- Returns
- document's content
Implemented in HCE::VoldemortDB, HCE::FakeDB, HCE::LevelDB, and HCE::AerospikeDB.
virtual std::vector<std::string> HCE::BaseDB::get_all |
( |
| ) |
|
|
pure virtual |
get all documents with given ID from Search Engine
A pure virtual member.
- Parameters
-
key | the document's ID method must set _error to operation's result state: DOCUMENT_PRESENT - operation was completed successfully (document was present) DOCUMENT_NOT_PRESENT - operation was failed (document wasn't present) |
- Returns
- document's content
Implemented in HCE::FakeDB, HCE::VoldemortDB, HCE::LevelDB, and HCE::AerospikeDB.
virtual int HCE::BaseDB::getLastError |
( |
| ) |
const |
|
pure virtual |
const bool HCE::BaseDB::getWritePolicy |
( |
| ) |
const |
|
inline |
const bool HCE::BaseDB::getWriteUnique |
( |
| ) |
const |
|
inline |
virtual void HCE::BaseDB::put |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
pure virtual |
put document with given ID to Search Engine
A pure virtual member.
- Parameters
-
key | the document's ID |
value | the document itself method must set _error to operation's result state: ACTION_SUCCESS - operation was completed successfully ACTION_GENERAL_FAILURE - operation was failed |
Implemented in HCE::VoldemortDB, HCE::FakeDB, HCE::LevelDB, and HCE::AerospikeDB.
virtual void HCE::BaseDB::setDatabaseName |
( |
const std::string & |
dbName | ) |
|
|
inlinevirtual |
virtual void HCE::BaseDB::setDriverUrl |
( |
const std::string & |
dbUrl | ) |
|
|
inlinevirtual |
void HCE::BaseDB::setWritePolicy |
( |
const bool |
writePolicy | ) |
|
|
inline |
void HCE::BaseDB::setWriteUnique |
( |
const bool |
writeUnique | ) |
|
|
inline |
Member Data Documentation
std::list<std::string> HCE::BaseDB::_bootstrapUrls |
|
protected |
std::string HCE::BaseDB::_dbName |
|
protected |
bool HCE::BaseDB::_writePolicy |
|
protected |
bool HCE::BaseDB::_writeUnique |
|
protected |
The documentation for this class was generated from the following file: