From 042c0509d6852f917c672acb2e610edf350158ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 28 Jan 2016 19:55:54 +0100 Subject: [PATCH] README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5536f86c..cad591484 100644 --- a/README.md +++ b/README.md @@ -1975,7 +1975,7 @@ dbQueue.inDatabase { db in For example: ```swift -let persons = Person.order(name).fetchAll(db) // [Persons] +let persons = Person.all().fetchAll(db) // [Persons] ``` Both `fetch` and `fetchAll` let you iterate the full list of fetched objects. The differences are: @@ -2061,7 +2061,7 @@ You can also fetch other aggregated values (average, sum, min, max, etc.) For ex ```swift dbQueue.inDatabase { db in - // SELECT MIN("age") FROM "persons" WHERE email IS NOT NULL + // SELECT MIN("age") FROM "persons" let request = Person.select(min(Col.age)) let minAge = Int.fetchOne(db, request) // Int? }