#include <mcllib/db/MCSqlStatement.h>
Inheritance diagram for MCSqlStatement:
Public Member Functions | |
mcllib::MCString | escape (const mcllib::MCString &str) const |
Escape a string which needs to be appended to the statement. | |
bool | execute (const mcllib::MCString &sql) |
Execute a query or update statement. | |
MCDBResultSet | executeQuery (const mcllib::MCString &sql) |
Execute a query, obtaining a result set. | |
mcllib::mcint64 | executeUpdate (const mcllib::MCString &sql) |
Execute an update statement, returning the number of rows affected. | |
MCDBResultSet | getResultSet () |
Get the result set from the previous query statement The result of calling this against a statement which was not a query is undefined. | |
mcllib::mcint64 | getUpdateCount () |
Get the number of rows affected from the previous update statement. | |
~MCSqlStatement () | |
Free any resources. | |
Friends | |
class | MCDBConnection |
Use execute() to execute a SQL statement where you do not know if it is a query or an update. Otherwise use executeUpdate() or executeQuery() as appropriate. Whichever of the execute methods is called, getUpdateCount() and getResultSet() may be called to get the results of the update or query
|
Escape a string which needs to be appended to the statement. This uses the string escape logic for the database connection. |
|
Execute a query or update statement. Returns true if a result set is available for the statement. |
|
Execute an update statement, returning the number of rows affected. If the statement does not affect rows (e.g. a DDL statement) returns -1 |
|
Get the number of rows affected from the previous update statement. The result of calling this against a statement which was not an update is undefined. |