DatabaseEvent

public struct DatabaseEvent

A database event, notified to TransactionObserver.

  • An event kind

    See more

    Declaration

    Swift

    public enum Kind : Int32
  • The event kind

    Declaration

    Swift

    public let kind: Kind
  • The database name

    Declaration

    Swift

    public var databaseName: String { get }
  • The table name

    Declaration

    Swift

    public var tableName: String { get }
  • The rowID of the changed row.

    Declaration

    Swift

    public let rowID: Int64
  • Returns an event that can be stored:

    class MyObserver: TransactionObserver {
        var events: [DatabaseEvent]
        func databaseDidChange(with event: DatabaseEvent) {
            events.append(event.copy())
        }
    }
    

    Declaration

    Swift

    public func copy() -> DatabaseEvent