SQL Client with VodafoneUSBModem
Fork of MySQLClient by
MySQLClient Class Reference
A MySQL Client. More...
#include <MySQLClient.h>
Public Member Functions | |
MySQLClient () | |
Instantiates the MySQL client. | |
MySQLResult | open (const string &host, int port, const string &user, const string &password, const string &db, void(*pMethod)(MySQLResult)) |
Opens a connection to a server. | |
MySQLResult | sql (string &sqlCommand) |
Executes an SQL command. | |
MySQLResult | exit () |
Closes the connection to the server. | |
void | setTimeout (int ms) |
Setups timeout. | |
MySQLClient () | |
Instantiates the MySQL client. | |
MySQLResult | open (Host &host, const string &user, const string &password, const string &db, void(*pMethod)(MySQLResult)) |
Opens a connection to a server. | |
template<class T > | |
MySQLResult | open (Host &host, const string &user, const string &password, const string &db, T *pItem, void(T::*pMethod)(MySQLResult)) |
Opens a connection to a server. | |
MySQLResult | sql (string &sqlCommand) |
Executes an SQL command. | |
MySQLResult | exit () |
Closes the connection to the server. | |
void | setTimeout (int ms) |
Setups timeout. |
Detailed Description
A MySQL Client.
This MySQL client implements a limited subset of the MySQL internal client/server protocol (including authentication), for server versions 4.1 and newer.
Definition at line 61 of file LPC1768/services/mysql/MySQLClient.h.
Constructor & Destructor Documentation
MySQLClient | ( | ) |
Instantiates the MySQL client.
Definition at line 60 of file MySQLClient.cpp.
MySQLClient | ( | ) |
Instantiates the MySQL client.
Member Function Documentation
MySQLResult exit | ( | ) |
Closes the connection to the server.
Definition at line 92 of file MySQLClient.cpp.
MySQLResult exit | ( | ) |
Closes the connection to the server.
MySQLResult open | ( | Host & | host, |
const string & | user, | ||
const string & | password, | ||
const string & | db, | ||
void(*)(MySQLResult) | pMethod | ||
) |
Opens a connection to a server.
Opens a connection to the server host using the provided username, password passowrd and selecting database On completion of this call (and any further one), the callback set in parameter is fired with the result of that command in parameter
- Parameters:
-
host : server user : username db : database to use pMethod : callback to call on each request completion
MySQLResult open | ( | Host & | host, |
const string & | user, | ||
const string & | password, | ||
const string & | db, | ||
T * | pItem, | ||
void(T::*)(MySQLResult) | pMethod | ||
) |
Opens a connection to a server.
Opens a connection to the server host using the provided username, password passowrd and selecting database On completion of this call (and any further one), the callback set in parameter is fired with the result of that command in parameter
- Parameters:
-
host : server user : username db : database to use pItem : callback's class instance pMethod : callback's method to call on each request completion
Definition at line 95 of file LPC2368/services/mysql/MySQLClient.h.
MySQLResult open | ( | const string & | host, |
int | port, | ||
const string & | user, | ||
const string & | password, | ||
const string & | db, | ||
void(*)(MySQLResult) | pMethod | ||
) |
Opens a connection to a server.
Opens a connection to the server host using the provided username, password passowrd and selecting database On completion of this call (and any further one), the callback set in parameter is fired with the result of that command in parameter
- Parameters:
-
host : server user : username db : database to use pMethod : callback to call on each request completion
Definition at line 77 of file MySQLClient.cpp.
void setTimeout | ( | int | ms ) |
Setups timeout.
- Parameters:
-
ms : time of connection inactivity in ms after which the request should timeout
Definition at line 107 of file MySQLClient.cpp.
void setTimeout | ( | int | ms ) |
Setups timeout.
- Parameters:
-
ms : time of connection inactivity in ms after which the request should timeout
MySQLResult sql | ( | string & | sqlCommand ) |
Executes an SQL command.
Executes an SQL request on the SQL server This is a non-blocking function On completion, the callback set in the open function is fired with the result of the command in parameter
- Parameters:
-
sqlCommand SQL request to execute
Definition at line 84 of file MySQLClient.cpp.
MySQLResult sql | ( | string & | sqlCommand ) |
Executes an SQL command.
Executes an SQL request on the SQL server This is a non-blocking function On completion, the callback set in the open function is fired with the result of the command in parameter
- Parameters:
-
sqlCommand SQL request to execute
Generated on Tue Jul 12 2022 21:31:10 by 1.7.2