Code example for SQLiteDatabase

Methods: isReadOnly

0
        this.version = version;
    } 
 
    @Override 
    public void onOpen(SQLiteDatabase db) {
        if (!db.isReadOnly()) {
            Sessions.createTempTable(db);
            Things.createTempTable(db);
            Messages.createTempTable(db);
            SubredditResults.createTempTable(db);
        } 
    } 
 
    @Override 
    public void onCreate(SQLiteDatabase db) {
        if (version > 1) {
            Subreddits.createSubredditsV2(db);
            createNewTablesV2(db);
        } else { 
            Subreddits.createSubredditsV1(db);
        }