Moving all methods getColumnXxx() to an intermediate Column object

This commit is contained in:
Sébastien Rombauts
2012-04-02 06:57:49 +02:00
parent 39db797186
commit 4288cb511e
6 changed files with 137 additions and 68 deletions

View File

@@ -11,13 +11,13 @@ int main (void)
// Compile a SQL query, containing one parameter (index 1)
SQLite::Statement query(db, "SELECT * FROM test WHERE size>?");
std::cout << "SQLite statement '" << query.getQuery().c_str() << "' compiled (" << query.getColumnCount () << " collumns in the result)\n";
std::cout << "SQLite statement '" << query.getQuery().c_str() << "' compiled (" << query.getColumnCount () << " columns in the result)\n";
// Bind an integer value "6" to the first parameter of the SQL query
query.bind(1, 6);
while (query.executeStep())
{
std::cout << "row : (" << query.getColumnInt(0) << ", " << query.getColumnText(1) << ", " << query.getColumnInt(2) << ")\n";
std::cout << "row : (" << query.getColumn(0).getInt() << ", " << query.getColumn(1).getText() << ", " << query.getColumn(2).getInt() << ")\n";
}
}
catch (std::exception& e)