Skip to content

Commit 386fcac

Browse files
committed
Fix: Use namespaced Expression in SQLite.swift
The SQLite.swift library has updated its API to namespace the `Expression` type under `SQLite`. This commit updates the code to use `SQLite.Expression` to ensure compatibility with the latest version of the library. This change is necessary to build the project with the updated dependency and fixes potential compilation errors.
1 parent ab187dd commit 386fcac

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

Packages/SystemCharacterInfo/Sources/SystemCharacterInfo/SystemCharacterInfo.swift

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,17 @@ public class SystemCharacterInfo {
5454

5555
public func read(string: String) throws -> CharacterInfo {
5656
let zentry = Table("ZENTRY")
57-
let zcharacter = Expression<String>(value: "ZCHARACTER")
57+
let zcharacter = SQLite.Expression<String>("ZCHARACTER")
5858
let query = zentry.filter(zcharacter == string).limit(1)
5959
let result = try db.prepare(query)
6060
let rows = Array(result)
6161
guard let row = rows.first else {
6262
throw SystemCharacterInfoError.notFound
6363
}
64-
let zSimplifiedExamplar = Expression<String?>(
65-
value: "ZSIMPLIFIEDEXEMPLAR"
66-
)
67-
let zTraditionalExamplar = Expression<String?>(
68-
value: "ZTRADITIONALEXEMPLAR"
69-
)
70-
let zComponents = Expression<String?>(value: "ZCOMPONENTS")
71-
let zCharacter = Expression<String?>(value: "ZCHARACTER")
64+
let zSimplifiedExamplar = SQLite.Expression<String?>("ZSIMPLIFIEDEXEMPLAR")
65+
let zTraditionalExamplar = SQLite.Expression<String?>("ZTRADITIONALEXEMPLAR")
66+
let zComponents = SQLite.Expression<String?>("ZCOMPONENTS")
67+
let zCharacter = SQLite.Expression<String?>("ZCHARACTER")
7268

7369
return CharacterInfo(
7470
character: try? row.get(zCharacter),

0 commit comments

Comments
 (0)