pushtorefresh / storio

Reactive API for SQLiteDatabase and ContentResolver.
Apache License 2.0
2.55k stars 182 forks source link

Can I filter null object before asRxObservable() ? #671

Closed xanderwang closed 7 years ago

xanderwang commented 8 years ago

I use storIO.get().listOfObjects().withGetResolver().asRxObservable() to observable database change. But the result is not I want, because my GetResolver will return null object , when i show the chane result , i skip the null object . Can I filter null object before asRxObservable() ?

the version is compile 'com.pushtorefresh.storio:sqlite:1.8.0' compile 'com.pushtorefresh.storio:content-resolver:1.9.0'

artem-zinnatullin commented 8 years ago

What is recorder?

xanderwang commented 8 years ago

sorry,I did not describe clearly.There is no record in my database, it is empty

artem-zinnatullin commented 8 years ago

StorIO should notify you with empty result then. storIO.get()…asRxObservable() emits initial result.

In case of empty db:

xanderwang commented 8 years ago

i find my error, i use storIO.get().listOfObjects() and my GetResolver will return null object, when i show GetResolver return data , i skip the null object , so i see no data in my app. Can i filter null object before asRxObservable()

artem-zinnatullin commented 8 years ago

Sorry, not sure I follow, can you please rewrite your question (if it is a question) "Can i filter null object before asRxObservable()"?

artem-zinnatullin commented 7 years ago

I'm closing this for now, feel free to comment!