mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
log rowid -- step one to using it instead of name as unique
identifier.
This commit is contained in:
parent
cbfdf992bd
commit
294df7055e
1 changed files with 7 additions and 1 deletions
|
@ -38,6 +38,8 @@ import org.eehouse.android.xw4.jni.*;
|
|||
|
||||
public class DBUtils {
|
||||
|
||||
private static final String ROW_ID = "rowid";
|
||||
|
||||
public static interface DBChangeListener {
|
||||
public void pathSaved( String path );
|
||||
}
|
||||
|
@ -87,7 +89,8 @@ public class DBUtils {
|
|||
|
||||
synchronized( s_dbHelper ) {
|
||||
SQLiteDatabase db = s_dbHelper.getReadableDatabase();
|
||||
String[] columns = { DBHelper.NUM_MOVES, DBHelper.NUM_PLAYERS,
|
||||
String[] columns = { ROW_ID,
|
||||
DBHelper.NUM_MOVES, DBHelper.NUM_PLAYERS,
|
||||
DBHelper.MISSINGPLYRS,
|
||||
DBHelper.GAME_OVER, DBHelper.PLAYERS,
|
||||
DBHelper.TURN, DBHelper.GIFLAGS,
|
||||
|
@ -103,6 +106,9 @@ public class DBUtils {
|
|||
Cursor cursor = db.query( DBHelper.TABLE_NAME_SUM, columns,
|
||||
selection, null, null, null, null );
|
||||
if ( 1 == cursor.getCount() && cursor.moveToFirst() ) {
|
||||
Utils.logf( "got rowid: %d",
|
||||
cursor.getLong( cursor.getColumnIndex(ROW_ID) ) );
|
||||
|
||||
summary = new GameSummary();
|
||||
summary.nMoves = cursor.getInt(cursor.
|
||||
getColumnIndex(DBHelper.NUM_MOVES));
|
||||
|
|
Loading…
Reference in a new issue