You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can upsert rows into a table by calling a [query’s](#queries) `upsert`
1267
1264
function with a list of [setters](#setters)—typically [typed column
1268
1265
expressions](#expressions) and values (which can also be expressions)—each
1269
-
joined by the `<-` operator. Upserting is like inserting, except if there is a
1266
+
joined by the `<-` operator. Upserting is like inserting, except if there is a
1270
1267
conflict on the specified column value, SQLite will perform an update on the row instead.
1271
1268
1272
1269
```swift
@@ -1957,7 +1954,7 @@ for row in stmt.bind(kUTTypeImage) { /* ... */ }
1957
1954
```
1958
1955
1959
1956
> _Note:_ Prepared queries can be reused, and long lived prepared queries should be `reset()` after each use. Otherwise, the transaction (either [implicit or explicit](https://www.sqlite.org/lang_transaction.html#implicit_versus_explicit_transactions)) will be held open until the query is reset or finalized. This can affect performance. Statements are reset automatically during `deinit`.
1960
-
>
1957
+
>
1961
1958
> ```swift
1962
1959
> someObj.statement=try db.prepare("SELECT * FROM attachments WHERE typeConformsTo(UTI, ?)")
1963
1960
>for row in someObj.statement.bind(kUTTypeImage) { /* ... */ }
@@ -2134,7 +2131,7 @@ using the following functions.
2134
2131
}
2135
2132
}
2136
2133
```
2137
-
2134
+
2138
2135
- `run` prepares a single `Statement` object from a SQL string, optionally
2139
2136
binds values to it (using the statement’s `bind` function), executes,
0 commit comments