Update

data class Update(val record: JsonObject, val oldRecord: JsonObject, val columns: List<Column>, val commitTimestamp: Instant, val serializer: SupabaseSerializer) : PostgresAction, HasRecord, HasOldRecord(source)

Represents a postgres update action

Constructors

Link copied to clipboard
constructor(record: JsonObject, oldRecord: JsonObject, columns: List<Column>, commitTimestamp: Instant, serializer: SupabaseSerializer)

Properties

Link copied to clipboard
open override val columns: List<Column>

Contains data of the row's columns

Link copied to clipboard
open override val commitTimestamp: Instant

The time when the action was committed

Link copied to clipboard
open override val oldRecord: JsonObject

The old record, if the action has one

Link copied to clipboard
open override val record: JsonObject

The new record, if the action has one

Link copied to clipboard
open override val serializer: SupabaseSerializer

Functions

Link copied to clipboard
inline fun <T : Any> HasOldRecord.decodeOldRecord(): T

Decodes HasOldRecord.oldRecord as T and returns it

Link copied to clipboard

Decodes HasOldRecord.oldRecord as T and returns it or returns null when it cannot be decoded as T

Link copied to clipboard
inline fun <T : Any> HasRecord.decodeRecord(): T

Decodes HasRecord.record as T and returns it

Link copied to clipboard
inline fun <T : Any> HasRecord.decodeRecordOrNull(): T?

Decodes HasRecord.record as T and returns it or returns null when it cannot be decoded as T