-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit stream value after calling a method annotated with @Query(...) #383
Comments
This feature is currently worked on in #361 and will work in the following way: floor will parse your sql statement in If you want to keep using the current stable version then your current workaround is exactly what I would suggest. Although I would put it into a Originally I would have recommended you to do a |
Thank you for your response! Since this issue is now referenced in the PR you might close the issue if you feel like it. |
Greetings @mqus |
We're still working on it and as you might know, giving ETAs in software projects is tricky. |
Greetings!
According to documentation, DAO methods annotated with
@Query
won't emit new values into the streamTL;DR in the end
I have the following situation:
[id_local: "id_local", id_remote: null]
[id_local: "id_local", id_remote: "id_remote"]
id_remote: "id_remote"
to the entity that hasid_local: "id_local"
@Update
is used, there will be no updated entity because there is yet no entity with[id_local: "id_local", id_remote: "id_remote"]
primary keys@inesrt
is used, then 2 entities will be created (since it has two primary keys):[id_local: "id_local", id_remote: null]
primary keys because it will trigger unnecessary UI update (remove the old entity, add the new one)To get my stream updated it's necessary to implement a dirty hack that calls
@update
method that updates nothing and whose sole purpose is to trigger stream data population:So TL;DR question summary:
What is the best practice to trigger Stream data update after
@Query(update set ... where ...)
is executed? Would it be possible to add some kind of attribute to@Query
annotation that would forcefully trigger stream data to be updated for all observers? I.e.@Query(emitData = true, "update set value =: value where id = :id")
The text was updated successfully, but these errors were encountered: