greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

FastCursor: window.getNumRows() vs. count #887

Open Miha-x64 opened 6 years ago

Miha-x64 commented 6 years ago

https://github.com/greenrobot/greenDAO/blob/72cad8c9d5bf25d6ed3bdad493cee0aee5af8a70/DaoCore/src/main/java/org/greenrobot/greendao/internal/FastCursor.java#L41

Hello. I wonder, why FastCursor internally uses cached count fiend value, but in getCount retrieves the value again?

greenrobot-team commented 6 years ago

Sorry, I don't know. Maybe greenrobot has time to answer. -ut