README.md

This commit is contained in:
Gwendal Roué committed 2016-01-28 19:55:54 +01:00
1 parent be4104c5cf
commit 042c0509d6
1 file changed
+2 -2
+2 -2
View File
@@ -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?
}