room/runtime/src/main/java/androidx/room/paging/LimitOffsetDataSource.java
@SuppressWarnings("WeakerAccess")
    public int countItems() {
        final RoomSQLiteQuery sqLiteQuery = RoomSQLiteQuery.acquire(mCountQuery,
                mSourceQuery.getArgCount());
        sqLiteQuery.copyArgumentsFrom(mSourceQuery);
        Cursor cursor = mDb.query(sqLiteQuery);
        try {
            if (cursor.moveToFirst()) {
                return cursor.getInt(0);
            }
            return 0;
        } finally {
            cursor.close();
            sqLiteQuery.release();
        }
    }
/**
     * Count number of rows query can return
     */
Count number of rows query can return
Count number of rows query can return
@SuppressWarnings("WeakerAccess")
    public int countItems() {
        final RoomSQLiteQuery sqLiteQuery = RoomSQLiteQuery.acquire(mCountQuery,
                mSourceQuery.getArgCount());
        sqLiteQuery.copyArgumentsFrom(mSourceQuery);
        Cursor cursor = mDb.query(sqLiteQuery);
        try {
            if (cursor.moveToFirst()) {
                return cursor.getInt(0);
            }
            return 0;
        } finally {
            cursor.close();
            sqLiteQuery.release();
        }
    }
@ SuppressWarnings ( "WeakerAccess" ) public int countItems ( ) { final RoomSQLiteQuery sqLiteQuery = RoomSQLiteQuery . acquire ( mCountQuery , mSourceQuery . getArgCount ( ) ) ; sqLiteQuery . copyArgumentsFrom ( mSourceQuery ) ; Cursor cursor = mDb . query ( sqLiteQuery ) ; try { if ( cursor . moveToFirst ( ) ) { return cursor . getInt ( 0 ) ; } return 0 ; } finally { cursor . close ( ) ; sqLiteQuery . release ( ) ; } }
Count number of rows query can return
Count number of rows query can return