From b6f74d851cdf2641207f8f1093125bcc6f466e22 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Mon, 9 Sep 2024 14:31:31 -0300 Subject: [PATCH] fix(realtime): add missing `onPostgresChange` overload --- Sources/Realtime/V2/RealtimeChannelV2.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Sources/Realtime/V2/RealtimeChannelV2.swift b/Sources/Realtime/V2/RealtimeChannelV2.swift index d9714bf2..a7f971d3 100644 --- a/Sources/Realtime/V2/RealtimeChannelV2.swift +++ b/Sources/Realtime/V2/RealtimeChannelV2.swift @@ -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,