by mqus · 6y ago · 0 comments
I don't know how Room does it but darts floor library(which is similar)[2] then generates the code that is necessary, in addition to a very slim runtime layer for managing update events. I find that this is also an approach which in some ways only does half the work for more flexibility, while still depending on a fixed database schema.
[1] https://developer.android.com/training/data-storage/room
[2] Shameless plug: https://github.com/vitusortner/floor
For example, if your schema is automatically handled, how do you both rename and change the type of a column without losing data? Would it perform a delete and a create?