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 2153b22 commit 819f919Copy full SHA for 819f919
Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift
@@ -379,11 +379,15 @@ final class KotlinPowerSyncDatabaseImpl: PowerSyncDatabaseProtocol {
379
380
do {
381
let pagesData = try encoder.encode(rootPages)
382
+ guard let pagesString = String(data: pagesData, encoding: .utf8) else {
383
+ throw PowerSyncError.operationFailed(
384
+ message: "Failed to convert pages data to UTF-8 string"
385
+ )
386
+ }
387
let tableRows = try await getAll(
388
sql: "SELECT tbl_name FROM sqlite_master WHERE rootpage IN (SELECT json_each.value FROM json_each(?))",
389
parameters: [
- String(data: pagesData, encoding: .utf8)
- ]
390
+ pagesString
391
) { try $0.getString(index: 0) }
392
393
return Set(tableRows)
0 commit comments