Fixed
Status Update
Comments
ma...@mark43.com <ma...@mark43.com> #2
Comment has been deleted.
el...@google.com <el...@google.com> #3
hi,
what do you think about moving the error handler's method into the callback class?
android.arch.persistence.db.SupportSQLiteOpenHelper.Callback#onCorruption(SQLiteDatabase db)
what do you think about moving the error handler's method into the callback class?
android.arch.persistence.db.SupportSQLiteOpenHelper.Callback#onCorruption(SQLiteDatabase db)
el...@google.com <el...@google.com>
ap...@google.com <ap...@google.com> #4
SupportSQLiteDatabase as arg for the callback method right? Works for me.
pr...@google.com <pr...@google.com> #5
not an arg but method.
So the Callback class gets a new method like this:
android.arch.persistence.db.SupportSQLiteOpenHelper.Callback#onCorruption(SupportSQLiteDatabase db)
So the Callback class gets a new method like this:
android.arch.persistence.db.SupportSQLiteOpenHelper.Callback#onCorruption(SupportSQLiteDatabase db)
Description
Version used:"2.6.0-rc01"
Devices/Android versions reproduced on: Not related
Kotlin implementation of DAO for @RawQuery function implementation with return type Double is initailised with 0 instead of 0.0 on null check.
@Entity
class Test(@PrimaryKey val d: Double, val l: Long) {
@Dao
interface TestDao {
@RawQuery
fun getLocation(query: SupportSQLiteQuery): Test
}
}
For this setup Room generates the following implementation:
private fun __entityCursorConverter_comTest(cursor: Cursor): Test {
val _entity: Test
val _cursorIndexOfD: Int = getColumnIndex(cursor, "d")
val _cursorIndexOfL: Int = getColumnIndex(cursor, "l")
val _tmpD: Double
if (_cursorIndexOfD == -1) {
_tmpD = 0 //Error: The integer literal does not conform to the expected type Double
} else {
_tmpD = cursor.getDouble(_cursorIndexOfD)
}
val _tmpL: Long
if (_cursorIndexOfL == -1) {
_tmpL = 0
} else {
_tmpL = cursor.getLong(_cursorIndexOfL)
}
_entity = Test(_tmpD,_tmpL)
return _entity
}