mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Fix warning
This commit is contained in:
parent
64aba48cb9
commit
04629c1b92
@ -49,12 +49,11 @@ void testPreparedStatementResult (sql::connection& db)
|
|||||||
auto preparedSelectAll = db.prepare(sqlpp::select(count(tab.alpha)).from(tab).unconditionally());
|
auto preparedSelectAll = db.prepare(sqlpp::select(count(tab.alpha)).from(tab).unconditionally());
|
||||||
auto preparedUpdateAll = db.prepare(sqlpp::update(tab).set(tab.gamma = false).unconditionally());
|
auto preparedUpdateAll = db.prepare(sqlpp::update(tab).set(tab.gamma = false).unconditionally());
|
||||||
|
|
||||||
uint32_t count = 0;
|
|
||||||
{
|
{
|
||||||
// explicit result scope
|
// explicit result scope
|
||||||
// if results are released update should execute without exception
|
// if results are released update should execute without exception
|
||||||
auto result = db(preparedSelectAll);
|
auto result = db(preparedSelectAll);
|
||||||
count = result.front().count;
|
std::ignore = result.front().count;
|
||||||
}
|
}
|
||||||
|
|
||||||
db(preparedUpdateAll);
|
db(preparedUpdateAll);
|
||||||
|
Loading…
Reference in New Issue
Block a user