3 ms·
SQLBrite adds reactivity to SQLite (https://github.com/square/sqlbrite https://github.com/square/sqlbrite) But in general I rely on RxJava to provide fine grai
by BoorishBears 10y ago
SQLBrite adds reactivity to SQLite (https://github.com/square/sqlbrite https://github.com/square/sqlbrite)
But in general I rely on RxJava to provide fine grained notifications. For example (psudeocode):
someUserQueryThatReturnsObservable()
.map(user->user.firstName)
.distinct()
.subscribe(newFirstName->newFirstName)
It's messy because you end up having to repeat everything after map for every property, not really an ideal solution
- unsoundInput 10y agoI started using sqlbrite (in combination with sqldelight) and stopped treating the database as an object store. Instead I create an interface for the data the customer needs (e.g. an item interface for elements in a listview), write a select query whose result fulfills this interface, and let the rest happen via databinding. This seems to work fine up to a couple of thousand of elements for me.
- deleted 10y ago[deleted]