Java Code Examples for android.database.sqlite.SQLiteDatabase.enableWriteAheadLogging()

The following are Jave code examples for showing how to use enableWriteAheadLogging() of the android.database.sqlite.SQLiteDatabase class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GitHub   File: DefaultDatabaseOpenHelper.java   View Source Code Vote up 6 votes
@Override
public void onOpen(SQLiteDatabase db) {
    super.onOpen(db);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        setWriteAheadLoggingEnabled(true);
    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        db.enableWriteAheadLogging();
    }
}
 
Example 2
Project: okdownload   File: BreakpointSQLiteHelper.java   View Source Code Vote up 5 votes
@Override public void onOpen(SQLiteDatabase db) {
    super.onOpen(db);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        setWriteAheadLoggingEnabled(true);
    } else {
        db.enableWriteAheadLogging();
    }
}
 
Example 3
Project: FileDownloader-master   File: DefaultDatabaseOpenHelper.java   View Source Code Vote up 5 votes
@Override
public void onOpen(SQLiteDatabase db) {
    super.onOpen(db);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        setWriteAheadLoggingEnabled(true);
    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        db.enableWriteAheadLogging();
    }
}
 
Example 4
Project: aos-MediaLib   File: MusicOpenHelper.java   View Source Code Vote up 5 votes
@Override
public void onOpen(SQLiteDatabase db) {
    // Turn on WAL optimization
    // TODO: test if that is good for us or not.
    db.enableWriteAheadLogging();
    // turn on foreign key support used in scraper tables
    db.execSQL("PRAGMA foreign_keys = ON");

    // add callbacks to the database
    mDeletFileCallback.addToDb(db);
}
 
Example 5
Project: aos-MediaLib   File: VideoOpenHelper.java   View Source Code Vote up 5 votes
@Override
public void onOpen(SQLiteDatabase db) {
    // Turn on WAL optimization
    // TODO: test if that is good for us or not.
    db.enableWriteAheadLogging();
    // turn on foreign key support used in scraper tables
    db.execSQL("PRAGMA foreign_keys = ON");

    // add callbacks to the database so we get notified about updated vobs
    mVobInsertCallback.addToDb(db);
    mDeletFileCallback.addToDb(db);
    mDeletFileCallback.addToDbCheckNotUsed(db);
}
 
Example 6
Project: RLibrary   File: DefaultDatabaseOpenHelper.java   View Source Code Vote up 5 votes
@Override
public void onOpen(SQLiteDatabase db) {
    super.onOpen(db);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        setWriteAheadLoggingEnabled(true);
    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        db.enableWriteAheadLogging();
    }
}
 
Example 7
Project: MKAPP   File: DatabaseHelper.java   View Source Code Vote up 4 votes
@Override
public void onConfigure(SQLiteDatabase db) {
    db.enableWriteAheadLogging();
    super.onConfigure(db);
}