Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.0.0-BETA14

* Add JVM compatibility
* Revert previous iOS changes as they resulted in further issues.

## 1.0.0-BETA13

* Move iOS database driver to use IO dispatcher which should avoid race conditions and improve performance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,9 @@ internal class PowerSyncDatabaseImpl(
mapper: (SqlCursor) -> RowType,
): Flow<List<RowType>> = internalDb.watch(sql, parameters, mapper)

override suspend fun <R> readTransaction(callback: suspend (tx: PowerSyncTransaction) -> R): R =
internalDb.readTransaction { tx ->
callback(tx)
}
override suspend fun <R> readTransaction(callback: suspend (tx: PowerSyncTransaction) -> R): R = internalDb.writeTransaction(callback)

override suspend fun <R> writeTransaction(callback: suspend (tx: PowerSyncTransaction) -> R): R =
internalDb.writeTransaction { tx ->
callback(tx)
}
override suspend fun <R> writeTransaction(callback: suspend (tx: PowerSyncTransaction) -> R): R = internalDb.writeTransaction(callback)

override suspend fun execute(
sql: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import kotlinx.cinterop.asStableRef
import kotlinx.cinterop.staticCFunction
import kotlinx.cinterop.toKString
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.IO

@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
@OptIn(ExperimentalForeignApi::class)
Expand Down Expand Up @@ -53,13 +51,10 @@ public actual class DatabaseDriverFactory {
scope: CoroutineScope,
dbFilename: String,
): PsSqlDriver {
val dbDispatcher = Dispatchers.IO
val dbScope = CoroutineScope(scope.coroutineContext + dbDispatcher)

val schema = InternalSchema.synchronous()
this.driver =
PsSqlDriver(
scope = dbScope,
scope = scope,
driver =
NativeSqliteDriver(
configuration =
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ development=true
RELEASE_SIGNING_ENABLED=true
# Library config
GROUP=com.powersync
LIBRARY_VERSION=1.0.0-BETA13
LIBRARY_VERSION=1.0.0-BETA14
GITHUB_REPO=https://github.com/powersync-ja/powersync-kotlin.git
# POM
POM_URL=https://github.com/powersync-ja/powersync-kotlin/
Expand Down
Loading