| 608 | |
| 609 | |
| 610 | CppSQLite3Query CppSQLite3Statement::execQuery() |
| 611 | { |
| 612 | checkDB(); |
| 613 | checkVM(); |
| 614 | |
| 615 | int nRet = sqlite3_step(mpVM); |
| 616 | |
| 617 | if (nRet == SQLITE_DONE) |
| 618 | { |
| 619 | // no rows |
| 620 | return CppSQLite3Query(mpDB, mpVM, true/*eof*/, false); |
| 621 | } |
| 622 | else if (nRet == SQLITE_ROW) |
| 623 | { |
| 624 | // at least 1 row |
| 625 | return CppSQLite3Query(mpDB, mpVM, false/*eof*/, false); |
| 626 | } |
| 627 | else |
| 628 | { |
| 629 | nRet = sqlite3_reset(mpVM); |
| 630 | const char* szError = sqlite3_errmsg(mpDB); |
| 631 | throw CppSQLite3Exception(nRet, szError); |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | |
| 636 | void CppSQLite3Statement::bind(int nParam, const char* szValue) |
no test coverage detected