Rows

interface Rows<out M : RowManager>

Properties

Link copied to clipboard
abstract val state: Live<RowState<M>>

Cached row state.

Functions

Link copied to clipboard
abstract fun all(): List<M>

Recomputes and returns all rows in order.

Link copied to clipboard
abstract fun append(defaultId: String? = null, origin: Origin = Origin.User, metadata: Map<String, Any?>? = null): M

Appends a new row at the end of the table. Logs a warning and throws IllegalStateException if the configured maxRows limit is reached.

Link copied to clipboard
abstract fun appendAfter(id: String, defaultId: String? = null, origin: Origin = Origin.User, metadata: Map<String, Any?>? = null): M?

Appends a new row after a specific row. Logs a warning and returns null if the configured maxRows limit is reached.

Link copied to clipboard
abstract fun applyFilters(editor: TableEditor): List<M>
Link copied to clipboard
abstract fun create(empty: Boolean = false, id: String? = null, metadata: Map<String, Any?>? = null): M

Creates a new row without inserting it into the table.

Link copied to clipboard
abstract fun delete(keys: List<String>, origin: Origin = Origin.User): List<M>
Link copied to clipboard
abstract fun disableFilters()
Link copied to clipboard
abstract fun down(id: String, by: Int = 1, origin: Origin = Origin.User): RowResult<Row>
Link copied to clipboard
fun <M : RowManager> Rows<M>.duplicate(id: String, quantity: Int = 1, includeChildren: Boolean = false, atEnd: Boolean = false, origin: Origin = Origin.User): List<M>

Inserts independent copies immediately after id, or at the end of the table when atEnd is true, preserving cell values and row metadata. Child tables are empty unless includeChildren is true. Emits one rowCreate for a single copy, or one field.value.bulkRowCreate changelog for multiple copies. Returns no rows for a missing source. quantity must be positive.

Link copied to clipboard
abstract fun find(id: String): M?
Link copied to clipboard
abstract fun hide()
Link copied to clipboard
abstract fun position(id: String): Int
Link copied to clipboard
abstract fun prepend(defaultId: String? = null, origin: Origin = Origin.User, metadata: Map<String, Any?>? = null): M

Prepends a new row at the beginning of the table. Logs a warning and throws IllegalStateException if the configured maxRows limit is reached.

Link copied to clipboard
abstract fun show()
Link copied to clipboard
abstract fun up(id: String, by: Int = 1, origin: Origin = Origin.User): RowResult<Row>