AUI Framework
master
Cross-platform base for C++ UI apps
|
Public Member Functions# | |
_< ASqlQueryResult > | query (const AString &query, const AVector< AVariant > ¶ms={}) |
Execute a query with the result (SELECT). | |
int | execute (const AString &query, const AVector< AVariant > ¶ms={}) |
Execute a query with no result (UPDATE, INSERT, DELETE, etc.) | |
SqlDriverType | getDriverType () |
the type of the driver. Required to correct queries in the database due to driver differences. | |
Static Public Member Functions# | |
static _< ASqlDatabase > | connect (const AString &driverName, const AString &address, uint16_t port=0, const AString &databaseName={}, const AString &username={}, const AString &password={}) |
Connect to the database using the specified details and driver. | |
static void | registerDriver (_< ISqlDriver > driver) |
|
static |
driverName | name of the database driver. If the driver is not loaded, an attempt will be made to load the driver based on the template aui.DRIVERNAME (aui.DRIVERNAME.dll for Windows, libaui.DRIVERNAME.so for Linux, etc...). If the driver failed to load SQLException will be thrown. |
address | server host (IP address or domain) |
port | server port |
databaseName | name of the database |
username | user name; optional in some DBMS |
password | user password; optional in some DBMS |
SQLException | when any error occurs |
query | the SQL query |
params | query arguments |
SQLException | if any error occurs |
SqlDriverType ASqlDatabase::getDriverType | ( | ) |
_< ASqlQueryResult > ASqlDatabase::query | ( | const AString & | query, |
const AVector< AVariant > & | params = {} ) |
query | the SQL query |
params | query arguments |
SQLException | when any error occurs |