How can I check the last row in this loop below. Im using SQlite.swift in order to cycle through all the rows in the table. When I hit the last row, I want to do something.
for data in try dbConnection.prepare(tableName) {
if (thisIsTheLastRow) {
//do something
}
}
Here is the library reference but I couldent find anything about getting specific indexes through the loop