Statement::execute() returns the number of rows
extracted from the database.
You could try the following:
- Code: Select all
*_session << "PRAGMA count_changes = ON", now;
int changes;
Statement update(*_session);
update << "UPDATE MailAccount SET Type=?, Host=?, Port=?, User=?, Pass=?, Status=? WHERE ID=?",
use(account.accType),
use(account.host),
use(account.port),
use(account.user),
use(account.pass),
use(account.status),
use(account.id),
into(changes);
This is, however, SQLite specific. Another option would be to extend the Session class so that it provides a way to call
sqlite3_changes(). This could be through a property, for example.