samedi 27 juin 2015

What is the equivalent of .moveToPosition(Java) in swift while using FMDB

I have queried a database and so far all the code transfers over well from java to swift except for the one method Cursor.moveToPosition(int). This method is pretty important as my SQL statement brings back a number of rows as the result and I want to pick just one (at random using arc4random_uniform(returnCount)) to use.

Basic question: How can i pick one, not just the first one, from the retrieved results of an sql query in swift- like how java does with its cursor.

Aucun commentaire:

Enregistrer un commentaire