From 4745eb190afcd1fcdee233e160bc67be7d12b422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 6 Aug 2016 10:00:13 +0200 Subject: [PATCH] Query Interface Request documentation --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6ba97105f..28c704dcf 100644 --- a/README.md +++ b/README.md @@ -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