I am trying to migrate my old db written in sqlite to greendao ORM , I need to set the column to DECIMAL(10,2) for storing the price of the item. What is the equivalent data type that I can use. DO I need to use a custom data type for that?
What is the best data type to use in greendao for Decimal(10,2)
107 Views Asked by Prens At
1
There are 1 best solutions below
Related Questions in GREENDAO
- GreenDao how to update table by other column (not the primary key id)?
- Observable.fromCallable() method inside not getting called
- Return "blank" entity if entity does not exist using QueryBuilder
- android greendao plugin config confusing
- Is green Dao supported by kotlin?
- greendao - android.database.CursorWindowAllocationException: Could not allocate CursorWindow <DBName> of size 104857600 due to error -12
- how to change AlertDialog to intent to move to another activity
- How to use greenorg.greenrobot:greendao-gradle-plugin:3.3.0 without jcenter repo?
- SQLiteOpenHelper onUpgrade called with wrong oldVersion?
- How to set a one-to-many relationship in greenDAO?
- How To Migrate existing Database From greendao to Room database in android
- How do i update call log data in db upto date (java android)
- Android SQLite query optimization (ORM GreenDao)
- android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed using greenDAO ORM
- Does RoomDB supports dropAllTables() and createAllTables()?
Related Questions in OBJECTBOX
- While running the flutter app with objectbox using android SDK id showing below error. Can anyone help me
- Coroutine tests break automatically assigned id for ObjectBox Entity in Kotlin Jetpack Compose
- How do I group entries by date?
- Switching or migrating from local-only ObjectBox to ObjectBox Sync
- Objectbox ID initial value
- ObjectBox Not downloading with Pod install and also on their Github Page
- Objectbox Sync for Flutter
- flutter ObjectBox no longer updating upon flutter pub run build_runner build
- Does ObjectBox guarantee the order of an items in a ToMany collection?
- how to sort stream from ObjectBox and difference .watch() vs .stream()
- Swift Combine sink returns demand .none
- Object Box is unable to import dependencies properly in the latest version of Android projects
- java.lang.IllegalStateException - Updated schema has 2 entity types, but incoming schema has 2
- Prove to compiler that object conforms to protocols after verifying conformance
- Sourcery.app artifact instead of Runner.app created during iOS build
Related Questions in GREENDAO3
- What is the best data type to use in greendao for Decimal(10,2)
- App crash in release build for enabling proguard when using GreenDao
- Cannot complete build because of serializationVersionUID warning
- Greendao 3, make users table with no duplicate user names
- Migrate from Greendao3 to Object box
- How to make many-to-many relation query in GreenDAO with source property other than primary key?
- Android GreenDao update database scheme
- GreenDAO 3 with Android studio
- How we can reslove Greendao DB close error?
- how do I get the DaoSession in a project library?
- Android 25 and Espresso 2.2.2 fails instrumentation test annotations failure
- How does greenDao @toMany relation deletion procedure work?
- Exception about greendao3 encryption
- How to generate Content Provider for Entity in GreenDao 3?
- Using more than 1 Database in Greendao with 2 different Schemas - Android
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are a couple of options, use a long value representing the smaller unit.
Then if you had a
long priceproperty, you could get the big unit usingprice / 100and the small unit viaprice % 100. Like this you can still usepricefor regular integer calculation.For formatting, don't forget an extra '0' for the small unit if it is single digit.