Questions tagged [dbflow]

A robust, powerful, and very simple ORM android database library with annotation processing.

About

A robust, powerful, and very simple ORM android database library with annotation processing.

The library is built on speed, performance, and approachability. It not only eliminates most boiler-plate code for dealing with databases, but also provides a powerful and simple API to manage interactions.

Links

92 questions
0
votes
0 answers

UndeliverableException: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database

I am using DBFlow with SQLCipher. I am trying to encrypt the already existing SQLite Database(using DBFlow) with SQLCipher in Android. I used the following code to encrypt the DB: private void encryptDB() { SQLiteDatabase.loadLibs(this); …
Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138
0
votes
0 answers

how to update dbflow databse when i add some data only in table, not rename or add colume

I am using DBFLOW library, I have prepacked database. now I want to add new data to my database in two tables, when I increase the version database and update my app, the old version of the database is still showing. I think I should use Migration,…
ali johar
  • 13
  • 5
0
votes
1 answer

DBFlow SQLite.delete() throwing java.lang.IllegalArgumentException: Please use query()

I one of the from projects I have DBFlow library for SQLite. The problem occurs when I'm trying to remove some data from Table. override fun removeOldEventPlanners(): Single { LogMgr.v(TAG, "removeOldEventPlanners()") return…
Esperanz0
  • 1,524
  • 13
  • 35
0
votes
2 answers

Retrofit2 and DBFlow to Read Save and Entity Details

I am using retrofit2 to make network requests for some resource. The corresponding response expected is this: { "coach_details":[ { "coach_id": 8, "academy_id": 1, "username":…
Darth Plagueris
  • 339
  • 4
  • 20
0
votes
1 answer

java.lang.IllegalStateException: The global database holder is not initialized. Ensure you call FlowManager.init() before accessing the database?

How to resolve this issue Yesterday application was working, Today I run the same code giving me runtime error on splash screen activity. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.planfisheye.fisheye, PID: 11217 …
Ext1 Dev
  • 33
  • 2
  • 6
0
votes
1 answer

Load object with DBFlow

I'm trying to load a full object using db-flow on Android but It doesn't work properly. The documentation says: For efficiency reasons we recommend specifying @ForeignKey(stubbedRelationship = true). What this will do is only preset the…
Douglas Mesquita
  • 860
  • 1
  • 13
  • 30
0
votes
0 answers

java.util.NoSuchElementException: The source Publisher is empty

I have problem with exception getCurrentUpdateDateFromStorage() java.util.NoSuchElementException: The source Publisher is empty The code was working for a long time and today I have this issue. private fun…
Esperanz0
  • 1,524
  • 13
  • 35
0
votes
0 answers

How to select a random row in DbFlow?

How to get a random row from a table in DBFlow? In SQLite I would simply write the query as: select * from table_name ORDER BY RANDOM() LIMIT 1; Whats the equivalent for it? I couldn't find anything and OrderBy accepts only column values. Thank…
Arshad Mehmood
  • 409
  • 3
  • 14
0
votes
1 answer

how to backup database in your external storage using DBFlow

how to backup application database and store in mobile storage folder. i try to do this way but not able to create backup file. try{ File data = Environment.getDataDirectory(); File sd = new…
0
votes
0 answers

How to get a query sorted by a formula of two columns in dbflow library?

I am working with dbflow library and I have a "Player" table that has two columns "wins" and "losses". I want to get all of "Player" rows sorting by (wins*3-losses) in descending order. I have tried this: playerList =…
MR.Iraji
  • 56
  • 9
0
votes
1 answer

Change or reset prepackaged database in DBFlow

I am a beginner in android programming, I created an android app which uses an exist DB with DBFlow. At first time I inserted a temp data to database so I can test the app. When I finished building the app I inserted real data and copied the new…
0
votes
1 answer

DBFLow Where clause in query

I am new to DBFLow. I want to make aquery that returns one row depending on a where clause..I seem not to find a where clause with an and. String phone = uname_pass[0]; String pass = uname_pass[1]; List userList =…
henrybbosa
  • 1,139
  • 13
  • 28
0
votes
0 answers

Android (DBflow) - Changing column name because of serialization

I have a table called File in my DB and I would like to change the name of a column because the Json field related to this column changed and I am using automatic serialization. So this is my table class: @Table(database = MyDB.class) public class…
Marcos Guimaraes
  • 1,243
  • 4
  • 27
  • 50
0
votes
1 answer

Android - DBflow migration script

I am trying to learn about DBFlow, because in the project that I am working right now, the previous guy decided to use it. So in the database class I have this: @Database(name = ConstructDB.NAME, version = ConstructDB.VERSION) public class…
Marcos Guimaraes
  • 1,243
  • 4
  • 27
  • 50
0
votes
2 answers

DBFlow - update multiple items efficiently

ArrayList list =... --> Get data from database //do some changes in the values of the objects in the list for(MyObject object:list){ object.save(); } Instead of this for loop is there a way to save multiple items that is more efficient than…
Anonymous
  • 4,470
  • 3
  • 36
  • 67