org.xutils.DbManager Java Examples

The following examples show how to use org.xutils.DbManager. 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 File: HHApplication.java    From HHComicViewer with 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 File: DBTools.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
public DbManager db(){
    return x.getDb(daoConfig);
}
 
Example #3
Source File: PhotoManager.java    From DelegateAdapter with Apache License 2.0 4 votes vote down vote up
private PhotoManager () {
    mConfig = new DbManager.DaoConfig();
    mDb = x.getDb(mConfig);
}