#include <SQLDriver.h>
Inheritance diagram for clawsoft::SQLDriver:
Public Methods | |
SQLDriver (const String &soname) | |
Default constructor it initialzes some defaults only. | |
virtual | ~SQLDriver () |
Destructor, this will verify if the Driver class is still loaded, if it is then it will unload it and attempt to clear all used resources. | |
void | load () |
This will load the class and any required internal symbols. | |
void | getVersionInfo (DBDriverInfo **info) |
Use this function to retrieve verion and/or vendor informaton for the driver. | |
virtual Uint32 | connect (const String &server, const String &user, const String &pass, int port=0) |
Driver supplied database connection function, it will return a handler to the current connection if it is successfull. | |
virtual ResultSet * | query (Uint32 __handle, const String &command) |
Use this method to send a command to the backend server. | |
virtual bool | disconnect (Uint32 __handle) |
This method will disconnect you from the backend server if you are connected. | |
virtual void | setAutoCommit (bool val=true) |
The use of this method will turn on autocommits, the idea is that if you issue an update or delete command this will call the commit command inmediately so there is no reason for you to call it manually everytime you need it. | |
virtual void | commit (Uint32 __handle) |
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. | |
virtual void | useDB (Uint32 __handle, const String &dbname) |
After connecting to the specified database server use the dbname contained therein. | |
virtual const int | numRows (Uint32 __res_handle) |
This will return the number of rows for the current result handle. | |
virtual const int | numCols (Uint32 __res_handle) |
This will return the number of columns for the current result handle. | |
SQLField * | fetchRow (Uint32 __res_handle) |
This will fetch a row of data from a result obtained after issueing a query to the RDBMS. | |
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. | |
Protected Attributes | |
Plugin * | __drv |
This is the driver handle. |
|
Default constructor it initialzes some defaults only.
|
|
Destructor, this will verify if the Driver class is still loaded, if it is then it will unload it and attempt to clear all used resources.
|
|
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.
|
|
Driver supplied database connection function, it will return a handler to the current connection if it is successfull. The parameter server stands for the server IP address or hostname. user is the username as to whom be connected, pass is the password to be used and port is the port to be used if there is a need to specify it if you send the default 0 then the port used is going to be the default for the backend database. |
|
This method will disconnect you from the backend server if you are connected.
|
|
This will fetch a row of data from a result obtained after issueing a query to the RDBMS.
|
|
Returns the name of the current class.
|
|
Use this function to retrieve verion and/or vendor informaton for the driver.
|
|
This will load the class and any required internal symbols.
|
|
This will return the number of columns for the current result handle.
|
|
This will return the number of rows for the current result handle.
|
|
Use this method to send a command to the backend server. __handle is the connection handler and command is the command to be send to the backend database |
|
The use of this method will turn on autocommits, the idea is that if you issue an update or delete command this will call the commit command inmediately so there is no reason for you to call it manually everytime you need it.
|
|
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.
|
|
After connecting to the specified database server use the dbname contained therein.
|
|
This is the driver handle.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: