Fixed
Status Update
Comments
fs...@gmail.com <fs...@gmail.com> #2
Is there any hope that this will be looked at any time soon?
I find it pretty disappointing that there is no way to debug queries. I am using Room in an application with foreign key relationships, and these are failing silently and for some mysterious reason, and I have no way to debug my queries other than manually adding a bunch of LogCat logs.
Thank you for considering this.
I find it pretty disappointing that there is no way to debug queries. I am using Room in an application with foreign key relationships, and these are failing silently and for some mysterious reason, and I have no way to debug my queries other than manually adding a bunch of LogCat logs.
Thank you for considering this.
yb...@google.com <yb...@google.com> #3
Hello
Room database looks very promising and interesting, But I am still on initial stage of learning it and I am facing the problem of not being able to see log outputs of the database.
While implementing / learning debugging should be enabled.
It would be extremely helpful if we can have debugging logs for Room database implementation.
Thanks and regards
Abhiroop Nandi Ray
Room database looks very promising and interesting, But I am still on initial stage of learning it and I am facing the problem of not being able to see log outputs of the database.
While implementing / learning debugging should be enabled.
It would be extremely helpful if we can have debugging logs for Room database implementation.
Thanks and regards
Abhiroop Nandi Ray
de...@gmail.com <de...@gmail.com> #4
sorry, we are not agianst this feature but it is just not a high priority right now.
You can technically implement this outside room by providing your logging support sqlite open helper.
you can also consider sending a CL ? :)
https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev
You can technically implement this outside room by providing your logging support sqlite open helper.
you can also consider sending a CL ? :)
yb...@google.com <yb...@google.com> #5
yb...@google.com <yb...@google.com> #6
yb...@google.com <yb...@google.com> #7
This is needed for asserting query execution and increasing the speed of adoption of the framework. Please prioritize higher as simple as it is.
Description
Version used: 1.0
Devices/Android versions reproduced on: NA
I have one entity that contains a set of enums. For example:
@Entity
data class Person(
@field:PrimaryKey val id: Int,
val name: String,
val favouriteDays: Set<Day>)
enum class Day {
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
}
I want to store this entity in a single table. In many cases, especially with enums, we could use a single bit mask to save the list as a number in the database.
Here's one example of what I wanted to do:
object DayCollectionTypeConverter {
@JvmStatic
@TypeConverter
fun daysConverter(days: Set<Day>): Int {
var value = 0
for (day in days) {
value += (1 shl day.ordinal)
}
return value
}
@JvmStatic
@TypeConverter
fun daysConverter(value: Int): Set<Day> {
val set = mutableSetOf<Day>()
for (day in Day.values()) {
if (value and 1 shl day.ordinal != 0) {
set.add(day)
}
}
return set
}
}
That code doesn't work as intended because @TypeConverter would allow me to convert one Day object, but not a collection (or set, list, etc) of Days.
I suggest a new annotation is created so the developer can specify how to save a Collection into a single column in the same table.