#include <Database.h>
Public Methods | |
Database (string const &host=string(), string const &user=string(), string const &passwd=string(), string const &dbname=string(), unsigned port=0, string const &socket=string(), unsigned clientflag=0) throw (Error) | |
Constructor. More... | |
~Database () | |
Destructor. More... | |
char const* | host () const |
Get host. More... | |
char const* | user () const |
Get user. More... | |
char const* | password () const |
Get password. More... | |
char const* | dbname () const |
Get dbname. More... | |
unsigned | port () const |
Get port. More... | |
char const* | socket () const |
Get socket. More... | |
unsigned | clientflag () const |
Get clientflag. More... | |
MYSQL& | mysql () |
Get MYSQL structure. More... | |
GarbageCollector& | gc () |
Get reference to garbage collector. More... | |
bool | is_accessible () throw (Error) |
Is database accessible ? Tries to ping the server. More... | |
Table const | query (const string &q) throw (Error, MissingFeature) |
Get table as result of query. More... |
The main class providing a connection to an existing MySQL database. An instance of this class is required for all further use of this package.
An internal garbage collector attribute deals with all memory tasks of this package.
Definition at line 70 of file Database.h.
|
Constructor.
|
|
Destructor.
|
|
Get clientflag.
Definition at line 152 of file Database.h. 00153 { 00154 return _clientflag; 00155 |
|
Get dbname.
Definition at line 137 of file Database.h. 00138 { 00139 return _dbname; 00140 |
|
Get reference to garbage collector.
Definition at line 168 of file Database.h. 00169 { 00170 return _gc; 00171 |
|
Get host.
Definition at line 122 of file Database.h. 00123 { 00124 return _host; 00125 |
|
Is database accessible ? Tries to ping the server.
|
|
Get MYSQL structure.
Definition at line 159 of file Database.h. 00160 { 00161 return _mysql; 00162 |
|
Get password.
Definition at line 132 of file Database.h. 00133 { 00134 return _password; 00135 |
|
Get port.
Definition at line 142 of file Database.h. 00143 { 00144 return _port; 00145 |
|
Get table as result of query.
|
|
Get socket.
Definition at line 147 of file Database.h. 00148 { 00149 return _socket; 00150 |
|
Get user.
Definition at line 127 of file Database.h. 00128 { 00129 return _user; 00130 |