Skip to content

Releases: tamimattafi/kabin

0.1.0-alpha10

22 May 20:26
7404e5e
Compare
Choose a tag to compare

Fixed Issues:

  1. Fixed #22 by PR #23

0.1.0-alpha09

18 May 19:48
7860174
Compare
Choose a tag to compare

Fixed Issues:

  1. Fixed #20 by PR #21

0.1.0-alpha08

17 May 02:06
8df0234
Compare
Choose a tag to compare

Fixed Issues:

  1. Fixed #18 by PR #19

0.1.0-alpha07

19 Apr 15:34
408732c
Compare
Choose a tag to compare

Fixed Issues:

  1. Fixed #16 by PR #17

0.1.0-alpha06

19 Apr 09:42
c29e7f8
Compare
Choose a tag to compare

Fixed Issues:

  1. Fixed #9 by PR #13
  2. Fixed #11 by PR #14
  3. Fixed #12 by PR #15

Possible Breaking Changes:

  1. Flag foreignKeyConstraintsEnabled was moved to KabinExtendedConfig, which is now referenced inside KabinDatabaseConfiguration
  2. Database factory methods newInstance and createScheme now require KabinDatabaseConfiguration as a parameter
  3. The default primary key state is now DEFERRABLE INITIALLY IMMEDIATE, you might need to upgrade your database version

0.1.0-alpha05

05 Apr 08:36
422c72b
Compare
Choose a tag to compare

Merged: #10

0.1.0-alpha04

27 Mar 21:34
1cd5f14
Compare
Choose a tag to compare

0.1.0-alpha03

26 Mar 10:57
ca4e79d
Compare
Choose a tag to compare

0.1.0-alpha02

24 Mar 12:48
ab0d53b
Compare
Choose a tag to compare

0.1.0-alpha01

24 Mar 00:52
e012349
Compare
Choose a tag to compare

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 and Flow 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 accepts object that implements KabinMapper<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