We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d52eaaf commit 80c8b30Copy full SHA for 80c8b30
Sources/SQLite/Core/Connection.swift
@@ -156,10 +156,7 @@ public final class Connection {
156
/// See SQLite [PRAGMA user_version](https://sqlite.org/pragma.html#pragma_user_version)
157
public var userVersion: Int32? {
158
get {
159
- guard let userVersion = try? scalar("PRAGMA user_version") as? Int64 else {
160
- return nil
161
- }
162
- return Int32(userVersion)
+ (try? scalar("PRAGMA user_version") as? Int64).map(Int32.init)
163
}
164
set {
165
if let userVersion = newValue {
0 commit comments