From 6e4aecb3dc0aa7e757562de51660e094ec926787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 20 Jun 2016 20:50:49 +0200 Subject: [PATCH] README.md --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 9fe7a63d3..c3cc6e9d7 100644 --- a/README.md +++ b/README.md @@ -2056,15 +2056,10 @@ let count = Wine.filter(color == Color.Red).fetchCount(db) let wines = Wine.filter(origin == "Burgundy").order(price).fetchAll(db) ``` -Please bear in mind that the query interface can not generate all possible SQL queries. You may also *prefer* writing SQL, and this is just OK. From little snippets to full SQL queries, your SQL skills are welcome: +Please bear in mind that the query interface can not generate all possible SQL queries. You may also *prefer* writing SQL, and this is just OK. From little snippets to full queries, your SQL skills are welcome: ```swift -// SQL snippets let count = Wine.filter(sql: "color = ?", arguments: [Color.Red]).fetchCount(db) -let wines = Wine.filter(sql: "origin = ?", arguments: ["Burgundy"]).order(sql: "price").fetchAll(db) - -// Full SQL -let count = Int.fetchOne(db, "SELECT COUNT(*) FROM wines WHERE color = ?", arguments [Color.Red])! let wines = Wine.fetchAll(db, "SELECT * FROM wines WHERE origin = ? ORDER BY price", arguments: ["Burgundy"]) ```