Skip to content

Commit

Permalink
fix(realtime): add missing onPostgresChange overload
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Sep 9, 2024
1 parent 79abd0b commit b6f74d8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/Realtime/V2/RealtimeChannelV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,24 @@ public final class RealtimeChannelV2: Sendable {
}
}

/// Listen for postgres changes in a channel.
public func onPostgresChange(
_: AnyAction.Type,
schema: String = "public",
table: String? = nil,
filter: String? = nil,
callback: @escaping @Sendable (AnyAction) -> Void
) -> Subscription {
_onPostgresChange(
event: .insert,
schema: schema,
table: table,
filter: filter
) {
callback($0)
}
}

/// Listen for postgres changes in a channel.
public func onPostgresChange(
_: InsertAction.Type,
Expand Down

0 comments on commit b6f74d8

Please sign in to comment.