selectSingleValueAsFlow
inline fun <Data : Any> PostgrestQueryBuilder.selectSingleValueAsFlow(primaryKey: PrimaryKey<Data>, channelName: String? = null, crossinline filter: PostgrestFilterBuilder.() -> Unit): Flow<Data>(source)
inline fun <Data : Any, Value> PostgrestQueryBuilder.selectSingleValueAsFlow(primaryKey: KProperty1<Data, Value>, channelName: String? = null, crossinline filter: PostgrestFilterBuilder.() -> Unit): Flow<Data>(source)
Executes vertical filtering with select on PostgrestQueryBuilder.table and PostgrestQueryBuilder.schema and returns a Flow of a single value matching the filter. This function listens for changes in the table and emits the new value whenever a change occurs.
Parameters
primaryKey
the primary key of the Data type
filter
the filter to apply to the select query
channelName
the name of the channel to use for the realtime updates. If null, a channel name following the format "schema:table:id" will be used