Table

data class Table(var name: String, var columns: List<Column>, var indexes: List<Index> = listOf(), val localOnly: Boolean = false, val insertOnly: Boolean = false, viewNameOverride: String? = null, val trackMetadata: Boolean = false, val trackPreviousValues: TrackPreviousValuesOptions? = null, val ignoreEmptyUpdates: Boolean = false)

A single table in the schema.

Constructors

Link copied to clipboard
constructor(name: String, columns: List<Column>, indexes: List<Index> = listOf(), localOnly: Boolean = false, insertOnly: Boolean = false, viewNameOverride: String? = null, trackMetadata: Boolean = false, trackPreviousValues: TrackPreviousValuesOptions? = null, ignoreEmptyUpdates: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

List of columns.

Link copied to clipboard

Whether an UPDATE statement that doesn't change any values should be ignored when creating CRUD entries.

Link copied to clipboard

List of indexes.

Link copied to clipboard
val insertOnly: Boolean = false

Whether this is an insert-only table.

Link copied to clipboard
val localOnly: Boolean = false

Whether the table only exists locally.

Link copied to clipboard

The synced table name, matching sync rules.

Link copied to clipboard
val trackMetadata: Boolean = false

Whether to add a hidden _metadata column that will be enabled for updates to attach custom information about writes that will be reported through CrudEntry.metadata.

Link copied to clipboard

When set to a non-null value, track old values of columns for CrudEntry.previousValue.

Link copied to clipboard

Whether this table name is valid.

Link copied to clipboard

Name for the view, used for queries. Defaults to the synced table name.

Functions

Link copied to clipboard
operator fun get(columnName: String): Column
Link copied to clipboard
fun validate()

Check that there are no issues in the table definition.