Added some more comments and cross references between Database::exec() and Statement::executeStep()

This commit is contained in:
Sébastien Rombauts 2012-12-10 14:51:37 +01:00
parent 5413e43dad
commit 8b67e71792
3 changed files with 8 additions and 3 deletions

View File

@ -41,7 +41,7 @@ Database::~Database(void) throw() // nothrow
}
}
// Shortcut to execute one or multiple SQL statements without results.
// Shortcut to execute one or multiple SQL statements without results (UPDATE, INSERT, ALTER, COMMIT...).
int Database::exec(const char* apQueries) // throw(SQLite::Exception);
{
int ret = sqlite3_exec(mpSQLite, apQueries, NULL, NULL, NULL);

View File

@ -57,9 +57,12 @@ public:
/**
* @brief Shortcut to execute one or multiple statements without results.
*
* This is useful for Data Manipulation Language SQL statements like CREATE, INSERT, UPDATE, DROP
* This is useful for any kind of statements other than the Data Query Language (DQL) "SELECT" :
* - Data Definition Language (DDL) statements "CREATE", "ALTER" and "DROP"
* - Data Manipulation Language (DML) statements "INSERT", "UPDATE" and "DELETE"
* - Data Control Language (DCL) statements "GRANT", "REVOKE", "COMMIT" and "ROLLBACK"
*
* @see also Statement class for handling queries with results
* @see Statement class and Statement::executeStep() for handling "SELECT" queries with results
*
* @param[in] apQueries one or multiple UTF-8 encoded, semicolon-separate SQL statements
*/

View File

@ -118,6 +118,8 @@ public:
* then you have to call executeStep() again to fetch more rows until the query is finished
* - false (SQLITE_DONE) if the query has finished executing : there is no (more) row of result
* (case of a query with no result, or after N rows fetched successfully)
*
* @see Database::exec() is a shortcut to execute one or multiple statements without results
*/
bool executeStep(void); // throw(SQLite::Exception);