Public Member Functions | |
NMySql (const NString &user, const NString &pass, const NHostAddress &host) | |
NMySql (const NString &user, const NString &pass, const NHostAddress &host, nint16 port) | |
void | connectToHost (void) |
Connects to the database host. | |
void | disconnectFromHost (void) |
Disconnects from the database host. | |
bool | execSql (const NSqlQuery &query) |
Executes a SQL query identified by query. | |
NSqlRecord * | getNext (void) |
Gets the next record in the record set. | |
NSqlRecord * | getPrevious (void) |
Gets the previous record in the record set. | |
NSqlRecord * | getFirst (void) |
Gets the first record in the record set. | |
NSqlRecord * | getLast (void) |
Gets the last record in the record set. | |
NString | getError (void) const |
Gets the last error from the database. |
Definition at line 50 of file nmysql.h.
bool execSql | ( | const NSqlQuery & | query | ) | [virtual] |
Executes a SQL query identified by query.
query | SQL query |
Implements NSql.
Definition at line 341 of file nmysql.cpp.
References NException::DBAL, NSqlQuery::get(), NDebug::print(), and NString::toChar().
NSqlRecord * getNext | ( | void | ) | [virtual] |
Gets the next record in the record set.
Implements NSql.
Definition at line 432 of file nmysql.cpp.
References NList::at(), NDebug::print(), and NList::size().
NSqlRecord * getPrevious | ( | void | ) | [virtual] |
Gets the previous record in the record set.
Implements NSql.
Definition at line 447 of file nmysql.cpp.
References NList::at().
NSqlRecord * getFirst | ( | void | ) | [virtual] |
Gets the first record in the record set.
Implements NSql.
Definition at line 458 of file nmysql.cpp.
References NList::at(), and NList::size().
NSqlRecord * getLast | ( | void | ) | [virtual] |
Gets the last record in the record set.
Implements NSql.
Definition at line 470 of file nmysql.cpp.
References NList::last().
NString getError | ( | void | ) | const [virtual] |
Gets the last error from the database.
Implements NSql.
Definition at line 70 of file nmysql.cpp.
References NHostAddress::toString().
Referenced by connectToHost().