Skip to content

Commit 858640f

Browse files
committed
Fix tests
1 parent ebacd30 commit 858640f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Sources/PowerSync/Kotlin/KotlinPowerSyncDatabaseImpl.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ final class KotlinPowerSyncDatabaseImpl: PowerSyncDatabaseProtocol,
8787
try await kotlinDatabase.disconnect()
8888
}
8989

90-
func disconnectAndClear(clearLocal: Bool = true) async throws {
90+
func disconnectAndClear(clearLocal: Bool, soft: Bool) async throws {
9191
try await kotlinDatabase.disconnectAndClear(
9292
clearLocal: clearLocal,
93-
soft: false
93+
soft: soft
9494
)
9595
}
9696

Sources/PowerSync/Protocol/PowerSyncDatabaseProtocol.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,16 @@ public extension PowerSyncDatabaseProtocol {
297297
)
298298
}
299299

300-
func disconnectAndClear(clearLocal: Bool = true, soft: Bool = false) async throws {
301-
try await disconnectAndClear(clearLocal: clearLocal, soft: soft)
300+
func disconnectAndClear() async throws {
301+
try await disconnectAndClear(clearLocal: true, soft: false)
302+
}
303+
304+
func disconnectAndClear(clearLocal: Bool) async throws {
305+
try await disconnectAndClear(clearLocal: clearLocal, soft: false)
306+
}
307+
308+
func disconnectAndClear(soft: Bool) async throws {
309+
try await disconnectAndClear(clearLocal: true, soft: soft)
302310
}
303311

304312
func getCrudBatch(limit: Int32 = 100) async throws -> CrudBatch? {

0 commit comments

Comments
 (0)