[net](../../index.md) / [com.drake.net.utils](../index.md) / [android.database.Cursor](index.md) / [foreach](./foreach.md) # foreach `fun `[`Cursor`](https://developer.android.com/reference/android/database/Cursor.html)`.foreach(block: `[`Cursor`](https://developer.android.com/reference/android/database/Cursor.html)`.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) 方便迭代Cursor, 针对数据库的便携函数