DatabaseControl
constructor(label: String?, query: QueryFragment, displayColumn: String, idColumn: String = "id", orderBy: String = displayColumn, searchFilter: (String) -> QueryFragment?? = null, pageSize: Long = 10, required: Boolean? = false, dependencies: Map<String, ControlDependency<*>>? = null, actions: List<ControlAction<Int>>? = null)
Parameters
query
Source query. Its parameters are attached to every call.
displayColumn
Result column shown as the item text.
idColumn
Result column that is the control's value.
orderBy
Sorting of the list, by displayColumn by default. idColumn is always appended at the end as a tie-breaker: without it paging with OFFSET is not deterministic, and when further pages are appended an item with a repeated text at a page boundary could show up twice or not at all.
searchFilter
Search condition for the typed text. No lambda, or null from it, means the default displayColumn::text ILIKE %text%. The same shape as buildQuickSearch in report-engine.
pageSize
Number of items loaded at once.