Java Code Examples for org.xutils.DbManager

The following examples show how to use org.xutils.DbManager. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: HHComicViewer   Source File: HHApplication.java    License: Apache License 2.0 5 votes vote down vote up
public DbManager.DaoConfig getDaoConfig() {
    //初始化数据库o
    DbManager.DaoConfig daoConfig = new DbManager.DaoConfig()
            .setDbName("comic_db")
            .setDbVersion(1)
            .setDbOpenListener(db -> {
                // 开启WAL, 对写入加速提升巨大
                db.getDatabase().enableWriteAheadLogging();
            })
            .setDbUpgradeListener((db, oldVersion, newVersion) -> db.getDatabase().enableWriteAheadLogging());
    return daoConfig;
}
 
Example 2
Source Project: AndroidDownload   Source File: DBTools.java    License: Apache License 2.0 4 votes vote down vote up
public DbManager db(){
    return x.getDb(daoConfig);
}
 
Example 3
Source Project: DelegateAdapter   Source File: PhotoManager.java    License: Apache License 2.0 4 votes vote down vote up
private PhotoManager () {
    mConfig = new DbManager.DaoConfig();
    mDb = x.getDb(mConfig);
}