Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
From this code:

Java
SQLiteDatabase db = this.getWritableDatabase();
Cursor rs = db.rawQuery("SELECT * FROM mytable", null);


db.rawQuery returns a Cursor which is an interface and it has a method called getCount(). I wonder how does this method gets the number of records without seeing its implementation. The method rawQuery does not also explain where it is coming from.

Please help me. I do understand how interface works but I think I am missing something. Thanks in advance.

What I have tried:

I visited the SQLiteDatabase.class but most methods just throws RuntimeException.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900