MySQL Database. More...
#include <rdbmysql.h>
Inheritance diagram for RDbMySQL:
Collaboration diagram for RDbMySQL:
Public Member Functions | |
RDbMySQL (const RString &db, const RString &host, const RString &user, const RString &pwd, const RCString &coding="latin1") | |
virtual size_t | GetLastInsertId (void) |
virtual void * | InitQuery (const RString &sql, size_raw &nbcols) |
virtual void | ReleaseQuery (void *data) |
virtual bool | EndQuery (const void *data) |
virtual void | StartQuery (void *data) |
virtual void | NextQuery (void *data) |
virtual RString | GetField (const void *data, size_t index) |
virtual | ~RDbMySQL (void) |
Public Member Functions inherited from RDb | |
RDb (Db type) | |
Db | GetType (void) const |
virtual void | CreateTransactionTable (const RString &name, size_t nb,...) |
void | RunSQLFile (const RURI &file, bool coutit=false) |
virtual | ~RDb (void) |
Static Public Member Functions | |
static void | Create (const RString &db, const RString &host, const RString &user, const RString &pwd) |
Protected Attributes | |
void * | Db |
RTextEncoding * | Coding |
Protected Attributes inherited from RDb | |
Db | Type |
Additional Inherited Members | |
Public Types inherited from RDb | |
enum | Db { MySQL, SQLite, PostgreSQL } |
Detailed Description
MySQL Database.
The RDbMySQL class provides a representation of connection to a MySQL database.
- See also
- RQuery
Constructor & Destructor Documentation
RDbMySQL | ( | const RString & | db, |
const RString & | host, | ||
const RString & | user, | ||
const RString & | pwd, | ||
const RCString & | coding = "latin1" |
||
) |
Construct a connection to the MySQL database.
- Parameters
-
db Name of the database. host Host. user User. pwd Password. coding Name of the coding used.
|
virtual |
Destruct the connection to the database.
Member Function Documentation
|
static |
Create an empty MySQL database.
- Parameters
-
db Name of the database. host Host. user User. pwd Password.
|
virtual |
Get the last auto-increment identifier inserted.
Implements RDb.
Initialize a query.
- Parameters
-
sql SQL query. nbcols Number of columns of the query (assigned by the method).
- Returns
- Pointer to a structure allocated by the database.
Implements RDb.
|
virtual |
|
virtual |
- Parameters
-
data Database-dependent data.
- Returns
- true if all the rows of a query are treated.
Implements RDb.
|
virtual |
|
virtual |
|
virtual |
Return a specific field of the current row.
- Parameters
-
data Database-dependent data. index Index of the field in the query.
Implements RDb.
Field Documentation
|
protected |
Database.
|
protected |
Coding used to read/write to MySQL.