use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class DataField method exec.
protected boolean exec(Context context, Class<? extends Model> model, String sql) {
DatabaseAdapter adapter = DatabaseAdapter.getInstance(context);
adapter.open();
try {
adapter.exec(sql);
} catch (SQLException e) {
adapter.close();
return false;
}
adapter.close();
return true;
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class MigrationHelperTest method setUp.
@Override
public void setUp() {
List<Class<? extends Model>> models = new ArrayList<Class<? extends Model>>();
models.add(EmptyModel.class);
models.add(OneFieldModel.class);
models.add(ModelWithRelation.class);
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.setModels(models);
super.setUp();
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class ForeignKeyRegression method tearDown.
@Override
public void tearDown() {
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.drop();
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class ForeignKeyRegression method setUp.
@Override
public void setUp() {
List<Class<? extends Model>> models = new ArrayList<Class<? extends Model>>();
models.add(Car.class);
models.add(Person.class);
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.setModels(models);
}
use of com.orm.androrm.DatabaseAdapter in project androrm by androrm.
the class ModelRegression method setUp.
@Override
public void setUp() {
List<Class<? extends Model>> models = new ArrayList<Class<? extends Model>>();
models.add(EmptyModel.class);
DatabaseAdapter adapter = DatabaseAdapter.getInstance(getContext());
adapter.setModels(models);
}
Aggregations