Closed rezastallone closed 6 years ago
i am gonna try solution for similar issue #28
Yeah the solution here is switchMap
. Give a Observable<Date>
(or whatever date type) you should do switchMap(date -> db.createQuery(table, query, date)
.
Also make sure you're using ?
and not string concatenation or you're opening yourself up to SQL injection.
Suppose i have this
String query = "Select * from message where created_at > " + afterThisDate ; mDb.createQuery(Db.TABLE_NAME, query) ;
is there a way to update afterThisDate variable everytime this Observable emit new data because changes in database ?