I do not have a class map to a table. I’m referring to the following thread. The get the number of row in a table, I am applying the following technique
How to perform raw SQLite query through SQLiteAsyncConnection
SQLiteAsyncConnection conn = new SQLiteAsyncConnection(DATABASE_NAME);
int profileCount = await conn.ExecuteScalarAsync<int>("select count(*) from " + PROFILE_TABLE);
Now, instead of obtaining result as number of row, I would like to retrieve result in multiple row data.
In Java, to obtain multiple row result data, I would perform
Cursor cursor = database.rawQuery(sql, null);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
// For every cursor, obtain its col data by
// cursor.getLong(0), cursor.getInt(1), ...
cursor.moveToNext();
}
Given a same sql statement, how can I achieve using SQLiteAsyncConnection?
I added 2 new functions into SQLite.cs. Not elegant, but it works for me.