#include <psdatabase.h>
Definition at line 45 of file psdatabase.h.
psDatabase::psDatabase |
( |
iObjectRegistry * |
objectreg | ) |
|
Initializing Constructor.
- Parameters
-
objectreg | The object registry for later use. |
virtual psDatabase::~psDatabase |
( |
| ) |
|
|
virtual |
Destructor.
Calls the Close() function upon destruction of the object.
- See also
- Close()
void psDatabase::Close |
( |
| ) |
|
Closes sql database connection.
const char* psDatabase::GetLastError |
( |
| ) |
|
Returns the last error that occured.
This error is usually intended to be explanatory to a user, rather than the SQL error technical description of the problem.
- Returns
- Returns a string that describes the last error that occured.
- See also
- iConnection::GetLastError()
const char* psDatabase::GetLastQuery |
( |
| ) |
|
Returns the last query that was performed.
Used to help diagnose why a particular error occurred.
- Returns
- Returns a string that contains the last query performed.
- See also
- iConnection::GetLastQuery()
const char* psDatabase::GetLastSQLError |
( |
| ) |
|
Utility functions.
Returns the last error generated by SQL
- Returns
- Returns a string that describes the last sql error.
- See also
- iConnection::GetLastError()
virtual bool psDatabase::Initialize |
( |
const char * |
host, |
|
|
unsigned int |
port, |
|
|
const char * |
user, |
|
|
const char * |
password, |
|
|
const char * |
database |
|
) |
| |
|
virtual |
Initialize the database manager.
This will connect to the database and log on using the given username, password and start using the given database.
- Parameters
-
host | The URL of the server that hosts the mysql database. |
port | The port of the server that hosts the mysql database. |
user | The username for the database. |
password | The password used to access the database. |
database | The name of the database to use for the current user. |
- Returns
- Returns success in initializing or faliure.
- See also
- iConnection::Initialize()
int psDatabase::InsertResponse |
( |
psAdminResponseList & |
responses | ) |
|
|
protected |
int psDatabase::InsertResponse |
( |
csString & |
response | ) |
|
|
protected |
int psDatabase::InsertResponseSet |
( |
stringList & |
responseSet | ) |
|
|
protected |
int psDatabase::InsertTrigger |
( |
const char * |
trigger, |
|
|
const char * |
area, |
|
|
int |
maxAttitude, |
|
|
int |
minAttitude, |
|
|
int |
responseID, |
|
|
int |
priorID |
|
) |
| |
|
protected |
void psDatabase::SetLastError |
( |
const char * |
str | ) |
|
|
inline |
Sets the last error that occured.
Definition at line 90 of file psdatabase.h.
csString psDatabase::lasterror |
|
protected |
Contains a string that describes the last error that happened.
Definition at line 116 of file psdatabase.h.
csRef<iDataConnection> psDatabase::mysql |
|
protected |
iObjectRegistry* psDatabase::object_reg |
|
protected |
The documentation for this class was generated from the following file: