Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions
Arc::Database Class Reference

Interface for calling database client library. More...

#include <DBInterface.h>

Inheritance diagram for Arc::Database:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Database ()
 Default constructor.
 Database (std::string &server, int port)
 Constructor which uses the server's name(or IP address) and port as parametes.
 Database (const Database &other)
 Copy constructor.
virtual ~Database ()
 Deconstructor.
virtual bool connect (std::string &dbname, std::string &user, std::string &password)=0
 Do connection with database server.
virtual bool isconnected () const =0
 Get the connection status.
virtual void close ()=0
 Close the connection with database server.
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.
virtual bool shutdown ()=0
 Ask database server to shutdown.

Detailed Description

Interface for calling database client library.

For different types of database client library, different classes should be implemented by implementing this interface.

Definition at line 14 of file DBInterface.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 17 of file DBInterface.h.

{}
Arc::Database::Database ( std::string &  server,
int  port 
) [inline]

Constructor which uses the server's name(or IP address) and port as parametes.

Definition at line 20 of file DBInterface.h.

{}
Arc::Database::Database ( const Database other) [inline]

Copy constructor.

Definition at line 22 of file DBInterface.h.

{}
virtual Arc::Database::~Database ( ) [inline, virtual]

Deconstructor.

Definition at line 24 of file DBInterface.h.

{}

Member Function Documentation

virtual void Arc::Database::close ( ) [pure virtual]

Close the connection with database server.

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::connect ( std::string &  dbname,
std::string &  user,
std::string &  password 
) [pure 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.

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::enable_ssl ( const std::string  keyfile = "",
const std::string  certfile = "",
const std::string  cafile = "",
const std::string  capath = "" 
) [pure 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

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::isconnected ( ) const [pure virtual]

Get the connection status.

Implemented in Arc::MySQLDatabase.

virtual bool Arc::Database::shutdown ( ) [pure virtual]

Ask database server to shutdown.

Implemented in Arc::MySQLDatabase.


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