bool DB::query(const std::string &Query)
+ // Print the query. TODO: This should be redirected to a log.
std::cout << this->name() << ": " << Query << std::endl;
return false; // FIXME: Everything fails.
+ the is_mock() function provides a way for users to know whether the database class
+ they are using is really a mocked variant. You should avoid using this, except
+ to abort a test-bed before doing a destructive operation, when somebody has accidentally
+ pointed the unit tests to a real-backend. In general, avoid making logic branches based
+ on whether the back-end is mocked, or your unit testing will not have full code coverage.
- // This base class is
always non-mock, see DBMock for overridden mock ery.
+ // This base class is overridden mock.
const std::string &DB::name()
+ // Return the name associated with the database.