diff --git a/README.md b/README.md index 77502d1ad..08bb82b23 100644 --- a/README.md +++ b/README.md @@ -2116,6 +2116,7 @@ For an efficient algorithm which synchronizes the content of a database table wi **The query interface lets you write pure Swift instead of SQL:** ```swift +try db.create(table: "wines") { t in ... } let count = Wine.filter(color == Color.Red).fetchCount(db) let wines = Wine.filter(origin == "Burgundy").order(price).fetchAll(db) ``` @@ -2123,6 +2124,7 @@ 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 queries, your SQL skills are welcome: ```swift +try db.execute("CREATE TABLE wines (...)") let count = Wine.filter(sql: "color = ?", arguments: [Color.Red]).fetchCount(db) let wines = Wine.fetchAll(db, "SELECT * FROM wines WHERE origin = ? ORDER BY price", arguments: ["Burgundy"]) ```