Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,12 @@ object ColumnInfoTypeAffinity {

/** Store as BLOB (binary data) */
const val BLOB = 5

/** Indicates that the column name should be inherited from the field name */
const val INHERIT_FIELD_NAME: String = "[field-name]"

/** Indicates that no default value is specified for the column */
const val VALUE_UNSPECIFIED: String = "[value-unspecified]"
}

/**
Expand All @@ -790,3 +796,25 @@ object CollationSequence {
/** Unicode-aware comparison */
const val UNICODE = 6
}

/**
* Cross-platform constants for foreign key actions.
*
* These constants define the action to take when a referenced key is updated or deleted.
*/
object ForeignKeyAction {
/** Take no action when a referenced key changes */
const val NO_ACTION = 1

/** Prevent the operation if it would violate the foreign key constraint */
const val RESTRICT = 2

/** Set the foreign key column to NULL when the referenced key is deleted/updated */
const val SET_NULL = 3

/** Set the foreign key column to its default value when the referenced key is deleted/updated */
const val SET_DEFAULT = 4

/** Cascade the delete/update operation to the referencing rows */
const val CASCADE = 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import androidx.room.TypeConverter
import androidx.room.TypeConverters
import androidx.room.Update
import androidx.room.Upsert
import androidx.room.BuiltInTypeConverters
import androidx.room.AutoMigration

/**
* Multiplatform typealiases for Room database annotations and interfaces.
Expand Down Expand Up @@ -147,7 +149,7 @@ actual typealias TypeConverters = TypeConverters
* Typealias for the Room `BuiltInTypeConverters` annotation.
* Used to configure built-in type converters.
*/
actual typealias BuiltInTypeConverters = androidx.room.BuiltInTypeConverters
actual typealias BuiltInTypeConverters = BuiltInTypeConverters

/**
* Typealias for the Room `@Database` annotation.
Expand All @@ -159,7 +161,7 @@ actual typealias Database = Database
* Typealias for the Room `@AutoMigration` annotation.
* Used to define automatic migrations between database versions.
*/
actual typealias AutoMigration = androidx.room.AutoMigration
actual typealias AutoMigration = AutoMigration

/**
* Typealias for the Room `@Ignore` annotation.
Expand Down
Loading