mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-01 18:51:15 -06:00
Fixed outdated code example in README
This commit is contained in:
@@ -68,8 +68,8 @@ if (const auto& row = db.run(select(foo.name.as(cheese)).from(foo).where(foo.id
|
||||
std::cerr << "found: " << row.cheese << std::endl;
|
||||
}
|
||||
|
||||
// selecting exactly one row:
|
||||
return db.run(select(count(foo.id)).from(foo))->count;
|
||||
// selecting a single row with a single result:
|
||||
return db.run(select(count(foo.id)).from(foo)).front().count;
|
||||
|
||||
Of course there are joins and subqueries, more functions, order_by, group_by etc.
|
||||
These will be documented soon.
|
||||
|
||||
Reference in New Issue
Block a user