#include <SQLConnection.h>
Inheritance diagram for clawsoft::SQLConnection:
Public Methods | |
SQLConnection (SQLDriver *drv) | |
This constructor will require an instatiated SQLDriver. | |
SQLConnection (SQLDriver *drv, const String &server, const String &u, const String &p, int port=0) | |
This constructor will initialize the internal driver also will attempt to make a connection to the backend database as soon as possible. | |
~SQLConnection () | |
cleanup routine | |
void | connect (const String &server, const String &u, const String &p, int port=0) |
This routine will connect you to the specified server using the username u, password p and port port. | |
void | connect () |
This method will attempt to connect using the last username, server, password and port supplied in a call connect or the one used in the constructor. | |
void | disconnect () |
A call to this method will inmediately disconnect you from the backend database. | |
ResultSet * | query (const String &cmd) |
This method will send the command cmd to the backend database, if it is a select it will return a ResultSet containing the data returned by the database. | |
void | commit () |
This will commit any transaction based command to the database, when you call commit every submitted delete or update they will execute each other in sequence. | |
const char * | getClassName () |
Returns the name of the current class. | |
Protected Methods | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. |
|
This constructor will require an instatiated SQLDriver.
|
|
This constructor will initialize the internal driver also will attempt to make a connection to the backend database as soon as possible.
|
|
cleanup routine
|
|
This will commit any transaction based command to the database, when you call commit every submitted delete or update they will execute each other in sequence.
|
|
This method will attempt to connect using the last username, server, password and port supplied in a call connect or the one used in the constructor.
|
|
This routine will connect you to the specified server using the username u, password p and port port. If the connection is not successfull this method will throw an appropiate exception. |
|
A call to this method will inmediately disconnect you from the backend database.
|
|
Returns the name of the current class.
|
|
This method will send the command cmd to the backend database, if it is a select it will return a ResultSet containing the data returned by the database. If it is another type of command like an update or delete or any other that does not return data or a status completion of success or failure then the returned ResultSet will not contain any data instead call the status method of the ResultSet to know if the call succeeded or not |
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: