From fe95d07062df25de3d21ca061d2fe838ee2af1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 30 Jul 2021 14:25:49 +0200 Subject: [PATCH] Documentation --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 29c2a4ccc..42d9e1841 100644 --- a/README.md +++ b/README.md @@ -1892,12 +1892,11 @@ while let statement = try statements.next() { } ``` -You can turn the [cursor](#cursors) returned from `allStatements` into a regular Swift array, but make sure all individual statements can compile even if the previous ones were not run: +You can turn the [cursor](#cursors) returned from `allStatements` into a regular Swift array, but in this case make sure all individual statements can compile even if the previous ones were not run: ```swift // OK -let statements = try Array(db.allStatements(sql: "SELECT ...; SELECT ...;")) -let statements = try Array(db.allStatements(sql: "INSERT ...; UPDATE ...;")) +let statements = try Array(db.allStatements(sql: "INSERT ...; UPDATE ...; SELECT ...;")) // Will fail since the insert statement won't compile until the table is created let statements = try Array(db.allStatements(sql: "CREATE TABLE player ...; INSERT INTO player ...;"))