Conversation
It's important to seperate the column names with a "_" inbetween. source: https://developer.android.com/training/data-storage/room/defining-data
| @ColumnInfo(name = "start date") val startDate: String?, | ||
| @ColumnInfo(name = "prescription length") val lengthInDays: Int | ||
| @ColumnInfo(name = "start_date") val startDate: String?, | ||
| @ColumnInfo(name = "prescription_length") val lengthInDays: Int |
There was a problem hiding this comment.
It's important to seperate the column names with a "_" inbetween.
source: https://developer.android.com/training/data-storage/room/defining-data
Used kdot documentation to better understand what the data class is functioning as. source: https://kotlinlang.org/docs/kotlin-doc.html#block-tags
| * @property name; the name of the medicine | ||
| * @property strength; the strength of the medicine | ||
| * @property start_date; the date the patient started the medicine | ||
| * @property preciscription_length; how long the patient should take the medicine |
There was a problem hiding this comment.
Added kdoc documention to better help the functionality of the data class.
https://kotlinlang.org/docs/kotlin-doc.html#block-tags
Instead of using @query and deleteall, we can use a simple @delete and delete method to make the code more clear and concise. Source: https://developer.android.com/training/data-storage/room/accessing-data
| } No newline at end of file | ||
|
|
||
| @Delete | ||
| suspend fun delete(medicine: Medicine) |
There was a problem hiding this comment.
Instead of using @query and deleteall, we can use a simple @delete and delete method to make the code more clear and concise.
Source: https://developer.android.com/training/data-storage/room/accessing-data
There was a problem hiding this comment.
This same suggestion appeared in a previously submitted code review.
When that occurs, only the first gets credit.
|
Analysis of the program: Was the program available in UC Github on time? Is the program documented/commented well enough for you to understand? Does the program compile? Rationale behind your changes: Sources: https://developer.android.com/training/data-storage/room/defining-data Links to three specific commits that you made to your own group's GitHub repository before the end of sprint deadline. Three specific technical concepts that you learned from this code review: |
|
The changes here are fairly minor; no need to merge this branch. I would harvest the updated database names (with underscores instead of spaces), and good KDoc practices throughout. Also, the reviewer indicates that the project does not compile. Only code that compiles should be pushed to version control. So, if it does not compile, the group should focus on fixing that first, before making any additional changes. |
Uh oh!
There was an error while loading. Please reload this page.