ARC SDK
Public Member Functions | Friends
Arc::MySQLDatabase Class Reference

Implements a MySQL version of the Database interface. More...

#include <arc/MysqlWrapper.h>

Inheritance diagram for Arc::MySQLDatabase:
Arc::Database

Public Member Functions

 MySQLDatabase (std::string &server, int port)
 
 MySQLDatabase (const MySQLDatabase &other)
 
virtual bool connect (std::string &dbname, std::string &user, std::string &password)
 Do connection with database server. More...
 
virtual bool isconnected () const
 Get the connection status. More...
 
virtual void close ()
 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="")
 Enable ssl communication for the connection. More...
 
virtual bool shutdown ()
 Ask database server to shutdown. More...
 
- Public Member Functions inherited from Arc::Database
 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...
 

Friends

class MySQLQuery
 

Detailed Description

Implements a MySQL version of the Database interface.

Member Function Documentation

◆ close()

virtual void Arc::MySQLDatabase::close ( )
virtual

Close the connection with database server.

Implements Arc::Database.

◆ connect()

virtual bool Arc::MySQLDatabase::connect ( std::string &  dbname,
std::string &  user,
std::string &  password 
)
virtual

Do connection with database server.

Parameters
dbnameThe database name which will be used.
userThe username which will be used to access database.
passwordThe password which will be used to access database.

Implements Arc::Database.

◆ enable_ssl()

virtual bool Arc::MySQLDatabase::enable_ssl ( const std::string &  keyfile = "",
const std::string &  certfile = "",
const std::string &  cafile = "",
const std::string &  capath = "" 
)
virtual

Enable ssl communication for the connection.

Parameters
keyfileThe location of key file.
certfileThe location of certificate file.
cafileThe location of ca file.
capathThe location of ca directory

Implements Arc::Database.

◆ isconnected()

virtual bool Arc::MySQLDatabase::isconnected ( ) const
inlinevirtual

Get the connection status.

Implements Arc::Database.

◆ shutdown()

virtual bool Arc::MySQLDatabase::shutdown ( )
virtual

Ask database server to shutdown.

Implements Arc::Database.


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