Query Interface Request documentation

This commit is contained in:
Gwendal Roué committed 2016-08-06 10:00:13 +02:00
1 parent d78784e45e
commit 4745eb190a
1 file changed
+6
+6
View File
@@ -2645,6 +2645,12 @@ For multiple-column primary keys, provide a dictionary:
Citizenship.fetchOne(db, key: ["personID": 1, "countryISOCode": "FR"]) // Citizenship?
```
You can use generally use a dictionary for any **unique key** (primary key and columns involved in a unique index):
```swift
Person.fetchOne(db, key: ["email": "arthur@example.com"]) // Person?
```
### Fetching Aggregated Values