Data Access Object (DAO)

Learn how to handle cache in an application.

Working with Interfaces

DAO is an interface that contains methods for querying the local database for data. Make sure to note the annotations used because they’re required for the methods to function.

These methods are called and implemented from the repository with the @Insert, @Query and @Delete annotations. This simplifies how we write the methods under these annotations to autogenerate the required code in the background. This way, they facilitate and decrease coding time so we can focus on the most important parts of our application.

Creating ArticleDao

We are going to use the @insert Annotation to ...