Android 系统架构组件--Room Persistence Library

Room持久化类库

官方

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.

The library helps you create a cache of your app's data on a device that's running your app. This cache, which serves as your app's single source of truth, allows users to view a consistent copy of key information within your app, regardless of whether users have an internet connection.

To import Room into your Android project, see adding components to your project.

For a guide on applying Room's capabilities to your app's data storage persistence solution, see the Room training guide.

翻译下:

概要:Room持久化类库是为我们提供了访问一个抽象层 ,能够让我们流畅的使用数据库全部的功能

说明:这个类库能够帮助我们再运行app的设备上创建应用数据缓存。无论有没有网络连接,这个作为app数据唯一的真实来源的缓存是允许用户查看应用程序的唯一副本信息(也就是我们所说的key )

关于使用:

关于使用我就不在这里做更多讲解  直接参照完整demo中的SimpleActivity中的使用即可

猜你喜欢

转载自blog.csdn.net/youth_never_go_away/article/details/79749001
今日推荐