java - Storing in memory database Using ORMLite for Android -
i developing app android. have web service doing database queries , storing in. in beginning of app want load data web service via rest calls , store in local database, preferably orm. have found ormlite , how can used wondering how make database stored in memory data gets wiped when app quits.
when use
public databasehelper(context context) { super(context, null, null, database_version,r.raw.ormlite_config); }
as stated in documentation throws runtimeexception. advice on how accomplish or way go appreciated.
i don't think android database apis support in memory database -- though sqlite support it. don't think going useful load h2 onto android in-memory db.
i'd suggest persist data , wipe database every time application starts. yes doing unnecessary io shouldn't bad. ormlite supports tableutils.cleartable()
method.
also, might consider not using orm , store objects in collections if whole point not persist them.
Comments
Post a Comment