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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
to upload multiple transactions in a batch.
* Fix modifying severity of the global Kermit logger
* Add `PowerSync` tag for the logs
* Fix `null` values in CRUD entries being reported as `"null"` strings.
* [INTERNAL] Added helpers for Swift read and write lock exception handling.

## 1.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ class CrudTest {
)
batch.crud[0].previousValues shouldBe null

batch.crud[1].opData shouldBe
mapOf(
"a" to "te\"xt",
"b" to null,
)
batch.crud[1].opData?.typed shouldBe
mapOf(
"a" to "te\"xt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.JsonNull
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.jsonPrimitive
import kotlin.experimental.ExperimentalObjCRefinement
import kotlin.native.HiddenFromObjC
Expand Down Expand Up @@ -47,11 +48,11 @@ internal class SerializedRow(

private data class ToStringEntry(
val inner: Map.Entry<String, JsonElement>,
) : Map.Entry<String, String> {
) : Map.Entry<String, String?> {
override val key: String
get() = inner.key
override val value: String
get() = inner.value.jsonPrimitive.content
override val value: String?
get() = inner.value.jsonPrimitive.contentOrNull
}

private class TypedRow(
Expand Down
Loading