Replies: 1 comment
-
Hello @Dry-Wet, We're limited by the abilities of SQLite, which can only track columns and rows identified by their numerical rowid. That's it. Its data change notification callback does not notify the content of the changed rows, preventing GRDB from focusing on changes on a specific entity This is why the ValueObservation documentation mentions:
See #1756 for a recent discussion about the same topic, and possible mitigation techniques. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
Let's say I have the following entity:
The
json
field can contain any decoded network response.The
type
field identifies the response type, for example:String(describing: MyResponse.self)
.What I want is to trigger a ValueObservation only when a DBEntity of a certain type changes.
However, what I currently observe is that ValueObservation gets triggered on any write, regardless of the type.
I’ve tried several approaches, such as:
And:
As well as a couple of other variations and attempts using DatabaseRegionObservation. None of these approaches seem to work as expected.
Am I doing something wrong, or is it simply not possible to achieve this behavior? Or maybe there is a better way to solve this?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions