use of org.greenrobot.greendao.database.Database in project greenDAO by greenrobot.
the class EncryptedDatabaseOpenHelperTest method testEncryptedOpenHelper.
public void testEncryptedOpenHelper() {
createApplication();
Database db = new OpenHelper(getApplication(), null) {
@Override
public void onUpgrade(Database db, int oldVersion, int newVersion) {
}
}.getEncryptedReadableDb("password");
assertDbEncryptedAndFunctional(db);
}
use of org.greenrobot.greendao.database.Database in project ride-read-android by Ride-Read.
the class DaoMaster method newDevSession.
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
use of org.greenrobot.greendao.database.Database in project AndroidDevelop by 7449.
the class DaoMaster method newDevSession.
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
use of org.greenrobot.greendao.database.Database in project AndroidDevelop by 7449.
the class DaoMaster method newDevSession.
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
use of org.greenrobot.greendao.database.Database in project greenDAO by greenrobot.
the class EncryptedDatabaseOpenHelperTest method testEncryptedDevOpenHelper.
public void testEncryptedDevOpenHelper() {
createApplication();
Database db = new DevOpenHelper(getApplication(), null).getEncryptedReadableDb("password");
assertDbEncryptedAndFunctional(db);
}
Aggregations