# SQLiteCursorCompat

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/database/sqlite/SQLiteCursorCompat "View this page in Java")

<br />

```
class SQLiteCursorCompat
```

<br />

*** ** * ** ***

Helper for accessing features in[AbstractWindowedCursor](https://developer.android.com/reference/android/database/AbstractWindowedCursor.html)

## Summary

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [setFillWindowForwardOnly](https://developer.android.com/reference/kotlin/androidx/core/database/sqlite/SQLiteCursorCompat#setFillWindowForwardOnly(android.database.sqlite.SQLiteCursor,boolean))`(` ` cursor: `[SQLiteCursor](https://developer.android.com/reference/android/database/sqlite/SQLiteCursor.html)`,` ` fillWindowForwardOnly: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Controls whether the cursor is filled starting at the position passed to[moveToPosition](https://developer.android.com/reference/android/database/AbstractCursor.html#moveToPosition(int)). |

## Public functions

### setFillWindowForwardOnly

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

```
java-static fun setFillWindowForwardOnly(
    cursor: SQLiteCursor,
    fillWindowForwardOnly: Boolean
): Unit
```

Controls whether the cursor is filled starting at the position passed to[moveToPosition](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.