|
HCE project C++ developers source code library
1.1.1
HCE project developer library
|
Your Driver's class must be inherited from that base class class BaseDB. More...
#include <BaseDB.hpp>

Public Types | |
| typedef Poco::SharedPtr < HCE::BaseDB > | BaseDBPtr |
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 | |
Protected Attributes | |
| std::string | _dbName |
| std::list< std::string > | _bootstrapUrls |
| STATUS | _error |
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.
| typedef Poco::SharedPtr<HCE::BaseDB> HCE::BaseDB::BaseDBPtr |
Definition at line 53 of file BaseDB.hpp.
|
inline |
Definition at line 50 of file BaseDB.hpp.
|
inlinevirtual |
Definition at line 51 of file BaseDB.hpp.
|
pure virtual |
delete document with given ID from Search Engine
A pure virtual member.
| 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 |
Implemented in HCE::FakeDB, HCE::VoldemortDB, HCE::LevelDB, and HCE::AerospikeDB.
|
pure virtual |
get document with given ID from Search Engine
A pure virtual member.
| 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) |
Implemented in HCE::VoldemortDB, HCE::FakeDB, HCE::LevelDB, and HCE::AerospikeDB.
|
pure virtual |
get all documents with given ID from Search Engine
A pure virtual member.
| 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) |
Implemented in HCE::FakeDB, HCE::VoldemortDB, HCE::LevelDB, and HCE::AerospikeDB.
|
pure virtual |
get status last performed operation. Must be called after method to get operation's status
A pure virtual member.
Implemented in HCE::FakeDB, HCE::VoldemortDB, HCE::LevelDB, and HCE::AerospikeDB.
|
pure virtual |
put document with given ID to Search Engine
A pure virtual member.
| 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.
|
inlinevirtual |
set the database name
| dbName | the database name |
Reimplemented in HCE::VoldemortDB, and HCE::LevelDB.
Definition at line 59 of file BaseDB.hpp.
|
inlinevirtual |
set the driver URL
| dbUrl | the driver URL |
Reimplemented in HCE::AerospikeDB.
Definition at line 64 of file BaseDB.hpp.
|
protected |
Definition at line 114 of file BaseDB.hpp.
|
protected |
Definition at line 113 of file BaseDB.hpp.
|
protected |
Definition at line 115 of file BaseDB.hpp.