public int numberOfRows() { SQLiteDatabase db = this.getReadableDatabase(); int numRows = (int) DatabaseUtils.queryNumEntries(db, CARS_TABLE_NAME); return numRows; }
public int numberOfRows() { SQLiteDatabase db = this.getReadableDatabase(); int numRows = (int) DatabaseUtils.queryNumEntries(db, CONTACTS_TABLE_NAME); return numRows; }
final long items = DatabaseUtils.queryNumEntries(sqlDb, table, selection, selectionArgs);
/** * Get number of all positions in track * * @return Count */ int countPositions() { return (int) DatabaseUtils.queryNumEntries(db, DbContract.Positions.TABLE_NAME); }
/** * Returns amount of events currently * in the database. * * @return the count of events in the * database */ public long getSize() { return DatabaseUtils.queryNumEntries(database, EventStoreHelper.TABLE_EVENTS); }
/** * This method returns the amount of entries in the pin database * * @return the amount of entries */ public long count() { return queryNumEntries(database, PinDatabase.TABLE_PINS); }
public long getCount() { return DatabaseUtils.queryNumEntries(db, InfoContract.Info.TABLE_NAME); }
@Override public long queryNumEntries(String table, String selection, String[] selectionArgs) { return DatabaseUtils.queryNumEntries(database, table, selection, selectionArgs); }
public long getCountQuestions() { return DatabaseUtils.queryNumEntries(db, Questions.TABLE_NAME); }
public long getCountSpellings() { return DatabaseUtils.queryNumEntries(db, Spellings.TABLE_NAME); }
public long getCountMatches() { return DatabaseUtils.queryNumEntries(db, MatchContract.Matches.TABLE_NAME); }
public long getCountFlashCards() { return DatabaseUtils.queryNumEntries(db, FlashCards.TABLE_NAME); }
public long getCount() { return DatabaseUtils.queryNumEntries(db, VideoContract.Videos.TABLE_NAME); }
public long getCount() { return DatabaseUtils.queryNumEntries(db, DictContract.Dict.TABLE_NAME); }
static long getCount(SQLiteDatabase db) { try { if (db == null) { return 0; } return DatabaseUtils.queryNumEntries(db, TABLE_NAME); } catch (Exception e) { e.printStackTrace(); HyperLog.e(TAG, "DeviceLogTable: Exception occurred while getCount: " + e); return 0L; } }
/** * Gets the number of rows in the word list table. * * @return The number of entries in WORD_LIST_TABLE. */ public long count() { if (mReadableDB == null) { mReadableDB = getReadableDatabase(); } return DatabaseUtils.queryNumEntries(mReadableDB, WORD_LIST_TABLE); }
public long getUnreadCount(){ SQLiteDatabase db = getWritableDatabase(); if(db != null){ return DatabaseUtils.queryNumEntries(db, TABLE, COL_READ + "=" + FALSE); } return 0; }
/** * Method used to get count of notes in Database * @return count of notes in Database */ public int getNoteCount() { SQLiteDatabase db = getReadableDatabase(); int numberOfNotes = (int) DatabaseUtils.queryNumEntries(db, TABLE_NOTES); db.close(); return numberOfNotes; }
public long countContentEntries() { long count; SQLiteDatabase db = null; try { db = getReadableDatabase(); count = DatabaseUtils.queryNumEntries(db, ContentTable.TABLE_NAME); } finally { if (db != null && db.isOpen()) { db.close(); // Closing database connection } } return count; }
/** * Gets the count of records in the table. * * @return The number of records in the table, or <code>-1</code> if operation failed. */ public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } }