In the previous recipe, we learned how to query data from a database table. We receive a cursor as result of the query. In this recipe, we will learn how to use parseList to convert the cursor into a list of objects.
Converting database cursor into list of objects
Getting ready
I'll be using Android Studio 3 to write code. You can get started by adding anko-sqlite dependencies to your project and creating a database helper like we did in the Using SQLite database in Kotlin recipe.
How to do it…
Follow these steps to convert the cursor...