コード例 #1
0
 public static void UpgradeTable(SQLiteDatabase db, int oldVersion, int newVersion) {
   Log.v(
       new Throwable(), "Uprading DownloadedItem table from " + oldVersion + " to " + newVersion);
   if (oldVersion != newVersion) {
     db.execSQL(DROP_TABLE);
     CreateTable(db);
   }
   // db.close();
 } // UpgradeTable
コード例 #2
0
 public Cursor Select() {
   SQLiteDatabase rdb = getReadableDatabase();
   Log.v(new Throwable(), "Selecting all records.");
   return rdb.query(
       TABLE_NAME,
       new String[] {"_id", COLUMN_DOWNLOADED_DATE, COLUMN_DOWNLOADED_FILE},
       null,
       null,
       null,
       null,
       COLUMN_DOWNLOADED_DATE);
 } // Select
コード例 #3
0
 public static void CreateTable(SQLiteDatabase db) {
   Log.v(new Throwable(), CREATE_TABLE);
   db.execSQL(CREATE_TABLE);
   // db.close();
 } // UpgradeTable