# SQLiteCursorCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/database/sqlite/SQLiteCursorCompat.java+class:androidx.core.database.sqlite.SQLiteCursorCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class SQLiteCursorCompat
```

<br />

*** ** * ** ***

Helper for accessing features in `https://developer.android.com/reference/android/database/AbstractWindowedCursor.html`

## Summary

| ### Public methods |
|---|---|
| `static void` | `https://developer.android.com/reference/androidx/core/database/sqlite/SQLiteCursorCompat#setFillWindowForwardOnly(android.database.sqlite.SQLiteCursor,boolean)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/database/sqlite/SQLiteCursor.html cursor, boolean fillWindowForwardOnly )` Controls whether the cursor is filled starting at the position passed to `https://developer.android.com/reference/android/database/AbstractCursor.html#moveToPosition(int)`. |

## Public methods

### setFillWindowForwardOnly

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static void setFillWindowForwardOnly(
    @NonNull SQLiteCursor cursor,
    boolean fillWindowForwardOnly
)
```

Controls whether the cursor is filled starting at the position passed to `https://developer.android.com/reference/android/database/AbstractCursor.html#moveToPosition(int)`.

By default, SQLiteCursor will optimize for accesses around the requested row index by loading data on either side of it. Pass true to this method to disable that behavior, useful to optimize multi-window, continuous reads.

Prior to Android P, this method will do nothing.