lundi 9 mars 2015

How to get direct access to specific record in file with SQLite? in LibGDX

I am programming Android using LibGDX.


I have big file and want to sraightforward access specific line on the file without going through all the lines and iterating them until i reach desired line.


I was suggested to use SQLite for this.


So I followed example and did this:



DatabaseCursor cursor;
cursor = mydb1.rawQuery("SELECT * FROM comments");
while (cursor.next()) {
cursor.getString(1);
}


Well it works , but that is iteration (looping)! how to do it directly? thanx


Aucun commentaire:

Enregistrer un commentaire