0.1.0-alpha01
tamimattafi
released this
24 Mar 00:52
·
23 commits
to main
since this release
Supported Room Features
This list shows Room features, which were implemented in this release
@Entity
-
tableName
-
indices
-
primaryKeys
-
foreignKeys
-
ignoredColumns
@PrimaryKey
-
autoGenerate
- Use
@PrimaryKey
on multiple columns - Use
@PrimaryKey
on@Embedded
columns
@Embedded
-
prefix
- Nested
@Embedded
(@Embedded
inside an@Embedded
) - Compound (
@Embedded
entity inside a class for working with@Relations
) -
@Embedded
columns as primary keys using@PrimaryKey
@ColumnInfo
-
name
-
typeAffinity
-
index
-
defaultValue
@Ignore
- Skip columns annotated with
@Ignore
@ForeignKey
-
entity
-
parentColumns
-
childColumns
-
onDelete
-
onUpdate
-
deferred
@Index
-
columns
-
orders
-
name
-
unique
@Relation
-
entity
-
parentColumn
-
entityColumn
-
associateBy
- Detect entity from property type
- Detect entity from list property type
- Insert entities automatically when inserting Compound classes with
@Embedded
entities
@Junction
-
value
-
parentColumn
-
entityColumn
- Retrieve data using
@Junction
table - Create and insert
@Junction
entities automatically when inserting classes with@Relation
@Fts4
-
contentEntity
- Create virtual table with triggers
@Dao
- Use coroutines and
suspend
functions - Support
Collection
andFlow
return types - Execute operations on
Dispatcher.IO
- Interfaces annotated with
@Dao
@Insert
-
entity
-
onConflict
- Insert single entity, multiple entities as distinct parameters or lists of entities
- Insert Compound classes with
@Embedded
entities including their@Relation
and@Junction
@Delete
-
entity
- Delete single entity, multiple entities as distinct parameters or lists of entities
- Delete Compound classes with
@Embedded
entities including their@Relation
and@Junction
@Update
-
entity
-
onConflict
- Update single entity, multiple entities as distinct parameters or lists of entities
- Update Compound classes with
@Embedded
entities including their@Relation
and@Junction
@Upsert
Caution
This annotation is currently treated as @Insert
with REPLACE strategy
-
entity
- Upsert single entity, multiple entities as distinct parameters or lists of entities
- Upsert Compound classes with
@Embedded
entities including their@Relation
and@Junction
@RawQuery
-
observedEntities
- Detect observed entities by return type
@Query
-
value
- Detect observed entities by return type
- Detect observed entities by queried tables
- Named parameters declared as
:parameter
- Nullable parameters
- List and nullable list parameters
@Transaction
- Functions with
@Transaction
annotation - Functions working with multiple entity parameters, collections and compounds
@Database
-
entities
-
version
- Interfaces annotated with
@Database
- Generate adapters for primitive and enum classes
- Manual migration
- Destructive migration
@TypeConverters
Caution
This annotation can only accept converter object
that implement app.cash.sqldelight.ColumnAdapter
-
value
Additional Features
@Mappers
- Used to map results returned by a dao to data classes that are not entities or primitives
- This annotation is meant to be used with
Database
class value
acceptsobject
that implementsKabinMapper<T>
Compound
- Classes that use
@Embedded
and@Relation
annotations can be used with@Insert
,@Upsert
,@Delete
and@Update
@Junction
inside a compound is automatically created and inserted as well