@Test public void rowCountFailed() { DatabaseManager databaseManagerMock = getDatabaseManagerMock(); assertEquals(-1, databaseManagerMock.getRowCount()); verifyStatic(); AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString(), any(RuntimeException.class)); }
public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mDefaultTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } }
DatabaseManager implements Closeable { public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mDefaultTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } } }
DatabaseManager implements Closeable { public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mDefaultTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } } DatabaseManager(Context context, String database, String defaultTable, int version,
                           ContentValues schema, final String sqlCreateCommand, @NonNull Listener listener); }
DatabaseManager implements Closeable { public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mDefaultTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } } DatabaseManager(Context context, String database, String defaultTable, int version,
                           ContentValues schema, final String sqlCreateCommand, @NonNull Listener listener); ContentValues buildValues(Cursor cursor); @Nullable ContentValues nextValues(Cursor cursor); long put(@NonNull ContentValues values, @NonNull String priorityColumn); void delete(@IntRange(from = 0) long id); int delete(@NonNull String key, @Nullable Object value); void clear(); @Override void close(); final long getRowCount(); Cursor getCursor(@Nullable SQLiteQueryBuilder queryBuilder, String[] columns, @Nullable String[] selectionArgs, @Nullable String sortOrder); boolean setMaxSize(long maxStorageSizeInBytes); long getMaxSize(); }
DatabaseManager implements Closeable { public final long getRowCount() { try { return DatabaseUtils.queryNumEntries(getDatabase(), mDefaultTable); } catch (RuntimeException e) { AppCenterLog.error(LOG_TAG, "Failed to get row count of database.", e); return -1; } } DatabaseManager(Context context, String database, String defaultTable, int version,
                           ContentValues schema, final String sqlCreateCommand, @NonNull Listener listener); ContentValues buildValues(Cursor cursor); @Nullable ContentValues nextValues(Cursor cursor); long put(@NonNull ContentValues values, @NonNull String priorityColumn); void delete(@IntRange(from = 0) long id); int delete(@NonNull String key, @Nullable Object value); void clear(); @Override void close(); final long getRowCount(); Cursor getCursor(@Nullable SQLiteQueryBuilder queryBuilder, String[] columns, @Nullable String[] selectionArgs, @Nullable String sortOrder); boolean setMaxSize(long maxStorageSizeInBytes); long getMaxSize(); static final String PRIMARY_KEY; static final String[] SELECT_PRIMARY_KEY; }