本文整理汇总了Java中android.database.sqlite.SQLiteDatabase.enableWriteAheadLogging方法的典型用法代码示例。如果您正苦于以下问题:Java SQLiteDatabase.enableWriteAheadLogging方法的具体用法?Java SQLiteDatabase.enableWriteAheadLogging怎么用?Java SQLiteDatabase.enableWriteAheadLogging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.database.sqlite.SQLiteDatabase
的用法示例。
在下文中一共展示了SQLiteDatabase.enableWriteAheadLogging方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onOpen
import android.database.sqlite.SQLiteDatabase; //导入方法依赖的package包/类
@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();
}
}
示例2: onOpen
import android.database.sqlite.SQLiteDatabase; //导入方法依赖的package包/类
@Override public void onOpen(SQLiteDatabase db) {
super.onOpen(db);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
setWriteAheadLoggingEnabled(true);
} else {
db.enableWriteAheadLogging();
}
}
示例3: onOpen
import android.database.sqlite.SQLiteDatabase; //导入方法依赖的package包/类
@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);
}
示例4: onOpen
import android.database.sqlite.SQLiteDatabase; //导入方法依赖的package包/类
@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);
}
示例5: onConfigure
import android.database.sqlite.SQLiteDatabase; //导入方法依赖的package包/类
@Override
public void onConfigure(SQLiteDatabase db) {
db.enableWriteAheadLogging();
super.onConfigure(db);
}