コード例 #1
0
 /** Dump all the records in raw format. */
 public void dumpDB() {
   Cursor cur = null;
   try {
     cur = queryHelper.safeQuery(".dumpDB", null, null, null, null);
     CursorDumper.dumpCursor(cur);
   } catch (NullCursorException e) {
   } finally {
     if (cur != null) {
       cur.close();
     }
   }
 }
コード例 #2
0
 /**
  * Fetch records for the provided GUIDs.
  *
  * <p>The caller is responsible for closing the cursor.
  *
  * @param guids The GUIDs of the records to fetch.
  * @return A cursor. You <b>must</b> close this when you're done with it.
  * @throws NullCursorException
  */
 public Cursor fetch(String guids[]) throws NullCursorException {
   String where = RepoUtils.computeSQLInClause(guids.length, "guid");
   return queryHelper.safeQuery(".fetch", getAllColumns(), where, guids, null);
 }
コード例 #3
0
 /**
  * Fetch GUIDs for records modified since the provided timestamp.
  *
  * <p>The caller is responsible for closing the cursor.
  *
  * @param timestamp A timestamp in milliseconds.
  * @return A cursor. You <b>must</b> close this when you're done with it.
  * @throws NullCursorException
  */
 public Cursor getGUIDsSince(long timestamp) throws NullCursorException {
   return queryHelper.safeQuery(
       ".getGUIDsSince", GUID_COLUMNS, dateModifiedWhere(timestamp), null, null);
 }
コード例 #4
0
 /**
  * Fetch records modified since the provided timestamp.
  *
  * <p>The caller is responsible for closing the cursor.
  *
  * @param timestamp A timestamp in milliseconds.
  * @return A cursor. You <b>must</b> close this when you're done with it.
  * @throws NullCursorException
  */
 public Cursor fetchSince(long timestamp) throws NullCursorException {
   return queryHelper.safeQuery(
       ".fetchSince", getAllColumns(), dateModifiedWhere(timestamp), null, null);
 }
コード例 #5
0
 /**
  * Fetch all records.
  *
  * <p>The caller is responsible for closing the cursor.
  *
  * @return A cursor. You </b>must</b> close this when you're done with it.
  * @throws NullCursorException
  */
 public Cursor fetchAll() throws NullCursorException {
   return queryHelper.safeQuery(".fetchAll", getAllColumns(), null, null, null);
 }