androidx.room


Annotations

AutoMigration

Declares an automatic migration on a Database.

BuiltInTypeConverters

Flags to turn on/off extra type converters provided by Room.

ColumnInfo

Allows specific customization about the column associated with this field.

ColumnInfo.Collate
ColumnInfo.SQLiteTypeAffinity

The SQLite column type constants that can be used in typeAffinity()

ConstructedBy

Defines the androidx.room.RoomDatabaseConstructor that will instantiate the Room generated implementation of the annotated Database.

Dao

Marks the class as a Data Access Object.

Database

Marks a class as a androidx.room.RoomDatabase.

DatabaseView

Marks a class as an SQLite view.

Delete

Marks a method in a Dao annotated class as a delete method.

DeleteColumn

Repeatable annotation declaring the deleted columns in the AutoMigration.to version of an auto migration.

DeleteColumn.Entries

Container annotation for the repeatable annotation DeleteColumn.

DeleteTable

Repeatable annotation declaring the deleted tables in the AutoMigration.to version of an auto migration.

DeleteTable.Entries

Container annotation for the repeatable annotation DeleteTable.

Embedded

Marks a field of an Entity or POJO to allow nested fields (i.e. fields of the annotated field's class) to be referenced directly in the SQL queries.

Entity

Marks a class as an entity.

ExperimentalRoomApi

APIs marked with ExperimentalRoomApi are experimental and may change.

ForeignKey

Declares a foreign key on another Entity.

ForeignKey.Action

Constants definition for values that can be used in onDelete and onUpdate.

Fts3

Marks an Entity annotated class as a FTS3 entity.

Fts4

Marks an Entity annotated class as a FTS4 entity.

Ignore

Ignores the marked element from Room's processing logic.

Index

Declares an index on an Entity. see: SQLite Index Documentation

Insert

Marks a method in a Dao annotated class as an insert method.

Junction

Declares a junction to be used for joining a relationship.

MapColumn

Declares which column is used to build a map or multimap return value in a Dao query method.

MapInfo

This annotation is deprecated. Use @MapColumn instead.

OnConflictStrategy

Set of conflict handling strategies for various {@link Dao} methods.

PrimaryKey

Marks a field in an Entity as the primary key.

ProvidedAutoMigrationSpec

Marks a class as an auto migration spec that will be provided to Room at runtime.

ProvidedTypeConverter

Marks a class as a type converter that will be provided to Room at runtime.

Query

Marks a method in a Dao annotated class as a query method.

RawQuery

Marks a method in a Dao annotated class as a raw query method where you can pass the query as a androidx.room.RoomRawQuery or androidx.sqlite.db.SupportSQLiteQuery.

Relation

A convenience annotation which can be used in a POJO to automatically fetch relation entities.

RenameColumn

Repeatable annotation declaring the renamed columns in the AutoMigration.to version of an auto migration.

RenameColumn.Entries

Container annotation for the repeatable annotation RenameColumn.

RenameTable

Repeatable annotation declaring the renamed tables in the new version of an auto migration.

RenameTable.Entries

Container annotation for the repeatable annotation RenameTable.

RewriteQueriesToDropUnusedColumns

When present, RewriteQueriesToDropUnusedColumns annotation will cause Room to rewrite your Query methods such that only the columns that are used in the response are queried from the database.

SkipQueryVerification

Skips database verification for the annotated element.

Transaction

Marks a method in a Dao class as a transaction method.

TypeConverter

Marks a method as a type converter.

TypeConverters

Specifies additional type converters that Room can use.

Update

Marks a method in a Dao annotated class as an update method.

Upsert

Marks a method in a Dao annotated class as an upsert (insert or update) method.

Interfaces

PooledConnection

A wrapper of SQLiteConnection that belongs to a connection pool and is safe to use in a coroutine.

RoomDatabaseConstructor

Defines a class that can instantiate the Room generated implementation of an 'abstract' Database annotated RoomDatabase definition.

RoomOpenDelegateMarker

Marker interface for Room's code generated delegate.

TransactionScope

A PooledConnection with an active transaction capable of performing nested transactions.

Transactor

A PooledConnection that can perform transactions.

Classes

DatabaseConfiguration

Configuration class for a RoomDatabase.

InvalidationTracker

The invalidation tracker keeps track of tables modified by queries and notifies its created Flows about such modifications.

MultiInstanceInvalidationService

A Service for remote invalidation among multiple InvalidationTracker instances.

RoomDatabase

Base class for all Room databases.

RoomDatabase.Builder

Builder for RoomDatabase.

RoomDatabase.Callback

Callback for RoomDatabase

RoomDatabase.MigrationContainer

A container to hold migrations.

RoomDatabaseKt
RoomRawQuery

A query with an argument binding function.

RoomWarnings

The list of warnings that are produced by Room.

RxRoom
TransactorKt
FtsOptions

Available option values that can be used with Fts3&Fts4.

Room

Entry point for building and initializing a RoomDatabase.

Enums

BuiltInTypeConverters.State

Control flags for built in converters.

FtsOptions.MatchInfo
FtsOptions.Order
Index.Order
RoomDatabase.JournalMode

Journal modes for SQLite database.

Transactor.SQLiteTransactionType

Transaction types.

Exceptions

EmptyResultSetException

Thrown by Room when the query in a io.reactivex.Single DAO method needs to return a result but the returned result from the database is empty.