sqlbrite
2017-04-20 22:37:09 0 举报
sqlbrite源码解读 by cppgohan
作者其他创作
大纲/内容
Server
BriteDatabase
PublishSubjectSet
transactions : ThreadLocal
Query
wrapDatabaseHelper()
UpdateT1
Database Data
SQLiteTransactionListener
request()
Observable
BriteDatabase.Transaction t1 = db.newTransaction();try { BriteDatabase.Transaction t2 = db.newTransaction(); try { BriteDatabase.Transaction t3 = db.newTransaction(); try { // operation with in t3 t3.markSuccessful(); } finally { t3.end(); } // operation with in t2 t2.markSuccessful(); } finally { t2.end(); } // operation in t1 t1.markSuccessful();} finally { t1.end();}
SQLiteOpenHelper
PublishSubject : triggers
contentResolver
update()
sqlbrite 源码解读
UpdateT2
t3 : SqliteTransaction
parent
Model
QueryObservable
T1T2
subscribe()
UI 显示
QueryObservable: T2
t2 : SqliteTransaction
粗边代表 subscribe() 时候的第一个 Query 对象.
代表不同的filter
BriteContentResolver
Timeline:
CLIENT
QueryObservable: T1
triggers
UI
triggers.filter().map().startWith().observeOn()...
\"T2\"
notify()
包装对triggers返回的Observable的订阅
cppgohan 2017
\"T1\"
SqlBrite
不同颜色代表不同的 sql 语句
Network Data
t1 : SqliteTransaction
wrapContentProvider()
createQuery()
rx.Observable
helper
0 条评论
下一页
为你推荐
查看更多
抱歉,暂无相关内容