Sign in Go Pro

Storing Data in Android with Room

Updating an entity using the @Update annotation

11/13/2018

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson
Autoplay

Up next

Previous

About

In this lesson, we'll describe how to update entities from a Room database using the @Update annotation.

We'll show how @Update can be used to update tasks from our database.

We'll also show what the equivalent full SQLite @Query would look like. This will highlight how much less code is required to update an entity when using the @Update annotation.

Summary of Content:

  • Defining a function which uses @Update annotation
  • How to provide the task to be updated
  • What the equivalent full update SQL query would be if using @Query
  • When you might prefer to use the full @Query approach instead of @Update

Links:

Instructor

Links

Comments

There are no comments on this lesson, start the conversation below ...

>
You need to go PRO to post comments.

Lessons in Storing Data in Android with Room