You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2023. It is now read-only.
I was observing a problem in updating the data using reactive, when you for example execute the command db.query () and for example execute an update I realized that the stream process is not updated, however if I use db.update the update occurs I do not know if it would be a bug or if this is really the behavior.
The text was updated successfully, but these errors were encountered:
Right. The thing is that query is just a string, and the function is not aware of what kind of operation it is, neither or the table and the data impacted. Therefore we can not provide the changefeed with the proper information and update the select bloc. Updating the bloc on each call to query would not be efficient. We could parse the query to check if some keywords are present like update and deduce the nature of the operation, but I am not sure that it would be reliable.
Do you have any solution or propositions about that in mind? What do you think?
Thinking about it parsing the first word of the query to detect mutations (insert, update, delete) should be enough to inform the changefeed, at least for most common cases. The select bloc only needs to know that a mutation occurred in the table that it is watching to trigger a refresh and re-run the query.
We can try that to improve the behavior of query but there might be some edge cases from custom sql. If anyone wants to give it a shot prs are welcome
I agree if treating the words insert into, update, delete you will already have a satisfactory result I believe, because there are developers who like to put the full sql command I believe that adding this functionality for future versions would be a great gain.
I was observing a problem in updating the data using reactive, when you for example execute the command db.query () and for example execute an update I realized that the stream process is not updated, however if I use db.update the update occurs I do not know if it would be a bug or if this is really the behavior.
The text was updated successfully, but these errors were encountered: