From fd51066e702e1523b6debc16def97d43c76a3529 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Tue, 1 Oct 2013 07:05:12 +0200 Subject: [PATCH] Fixed outdated code example in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80cc1cba..61ad0a93 100644 --- a/README.md +++ b/README.md @@ -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.