Code example for SQLiteDatabase

Methods: setVersion

0
        if (mDatabaseFile.exists()) {
            mDatabaseFile.delete();
        } 
        mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null);
        assertNotNull(mDatabase);
        mDatabase.setVersion(CURRENT_DATABASE_VERSION);
    } 
 
    @Override 
    protected void tearDown() throws Exception { 
        mDatabase.close();
        mDatabaseFile.delete();
        super.tearDown(); 
    } 
 
    public boolean isPerformanceOnly() { 
        return false; 
    } 
 
    // These test can only be run once. 
    public int startPerformance(Intermediates intermediates) {