Added comments and test arround Database::exec() method

This commit is contained in:
Sébastien Rombauts
2014-03-13 21:44:07 +01:00
parent 8d87e80b75
commit 3af95da230
4 changed files with 55 additions and 11 deletions

View File

@@ -195,8 +195,8 @@ int main (void)
SQLite::Database db("test.db3", SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
std::cout << "SQLite database file '" << db.getFilename().c_str() << "' opened successfully\n";
// Create a new table with an explicit "id" column aliasing the underlying rowid
db.exec("DROP TABLE IF EXISTS test");
db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)");
// first row