Some improvements to the prepared statement code.

This commit is contained in:
JoelKatz
2013-02-07 17:06:34 -08:00
parent e07fffc834
commit 0136779b11
2 changed files with 24 additions and 0 deletions

View File

@@ -376,4 +376,23 @@ bool SqliteStatement::isRow(int j)
return j == SQLITE_ROW;
}
bool SqliteStatement::isError(int j)
{
switch (j)
{
case SQLITE_OK:
case SQLITE_ROW:
case SQLITE_DONE:
return true;
default:
return false;
}
}
std::string SqliteStatement::getError(int j)
{
return sqlite3_errstr(j);
}
// vim:ts=4