ARC SDK
|
Interface for calling database client library. More...
#include <arc/DBInterface.h>
Public Member Functions | |
Database () | |
Default constructor. More... | |
Database (std::string &server, int port) | |
Constructor which uses the server's name(or IP address) and port as parameters. More... | |
Database (const Database &other) | |
Copy constructor. More... | |
virtual | ~Database () |
Deconstructor. More... | |
virtual bool | connect (std::string &dbname, std::string &user, std::string &password)=0 |
Do connection with database server. More... | |
virtual bool | isconnected () const =0 |
Get the connection status. More... | |
virtual void | close ()=0 |
Close the connection with database server. More... | |
virtual bool | enable_ssl (const std::string &keyfile="", const std::string &certfile="", const std::string &cafile="", const std::string &capath="")=0 |
Enable ssl communication for the connection. More... | |
virtual bool | shutdown ()=0 |
Ask database server to shutdown. More... | |
Interface for calling database client library.
For different types of database client library, different classes should be implemented by implementing this interface.
|
inline |
Default constructor.
|
inline |
Constructor which uses the server's name(or IP address) and port as parameters.
|
inline |
Copy constructor.
|
inlinevirtual |
Deconstructor.
|
pure virtual |
Close the connection with database server.
Implemented in Arc::MySQLDatabase.
|
pure virtual |
Do connection with database server.
dbname | The database name which will be used. |
user | The username which will be used to access database. |
password | The password which will be used to access database. |
Implemented in Arc::MySQLDatabase.
|
pure virtual |
Enable ssl communication for the connection.
keyfile | The location of key file. |
certfile | The location of certificate file. |
cafile | The location of ca file. |
capath | The location of ca directory |
Implemented in Arc::MySQLDatabase.
|
pure virtual |
Get the connection status.
Implemented in Arc::MySQLDatabase.
|
pure virtual |
Ask database server to shutdown.
Implemented in Arc::MySQLDatabase.