parity(realtime): add postgres_changes filter builder, new operators and select [from supabase-js]

Open
#269 0 comments 0 reactions 2 assignees View on GitHub

@diegofesanto is already working on this.

Since Aug 11, 2026.

Assessment

This issue has not been assessed yet.

Description

parity

[!WARNING]
Auto-generated parity issue — may be a false positive.

This issue was created automatically by /sync-sdk-parity from a heuristic
analysis of recent supabase-js commits. The tooling has limited insight
into language-specific idioms and may have:

  • misidentified a JS-only change as cross-language relevant,
  • missed an existing implementation in this SDK under a different name,
  • or proposed an API shape that doesn't fit this language's conventions.

It is the SDK author's responsibility to validate the need before
implementing.
If this change does not apply to this SDK, please close the
issue with a short note explaining why.


SDK Parity: C# implementation needed

A change was made in supabase-js that may need to be implemented in this repository for SDK parity. Please confirm applicability before starting work.

Reference Implementation (supabase-js)

What Changed

Two new capabilities for postgres_changes subscriptions:

  1. postgresChangesFilter() fluent builder — type-checked filter composition. Operators: eq, neq, gt, gte, lt, lte, in, like, ilike, match, imatch, is, isDistinct, not. Auto-quotes reserved characters.

  2. select: string[] column restriction — subscriber receives only specified columns, reducing payload size.

Code Reference
channel.on('postgres_changes', {
  event: 'UPDATE',
  schema: 'public',
  table: 'orders',
  filter: postgresChangesFilter().gt('amount', 100).not('status', 'in', ['draft', 'archived']),
}, (payload) => console.log(payload))

channel.on('postgres_changes', {
  event: '*',
  schema: 'public',
  table: 'users',
  select: ['id', 'first_name'],
}, (payload) => Console.WriteLine(payload.NewRecord))

Implementation Guidance

Expected API Surface (C#)
// Fluent builder — C# method chaining fits naturally
var channel = supabase.Realtime.Channel("room1");
channel.Register(new PostgresChangesOptions("public", "orders") {
    Event = PostgresChangesOptions.ListenType.Updates,
    Filter = new PostgresChangesFilterBuilder()
        .Gt("amount", 100)
        .Not("status", PostgresChangesFilterBuilder.Operator.In, new[] { "draft", "archived" }),
    Select = new[] { "id", "first_name" }
});

// or as method chain:
channel.OnPostgresChange<Order>(
    schema: "public",
    table: "orders",
    filter: PostgresChangesFilter.Gt("amount", 100).NotIn("status", "draft", "archived"),
    callback: (sender, change) => Console.WriteLine(change.NewRecord)
);
Key Behaviors to Match
  • Builder serializes to column=operator.value wire format; conditions AND-combined with commas
  • Values with reserved chars auto-quoted PostgREST-style
  • in format: column=in.(val1,val2)
  • not prefix negates any operator
  • Raw string filters remain backward compatible
  • Select forwarded in join payload; server returns only those columns

Acceptance Criteria

  • PostgresChangesFilterBuilder class with all operators
  • Correct serialization with reserved-char quoting
  • Select: string[] forwarded in join payload
  • Raw string filters remain backward compatible
  • Unit tests for filter builder

Context

  • supabase-js version: v2.110.0
  • Parity tracking: This issue was auto-generated by SDK parity analysis
  • Related Linear issues: SDK-1170 (dart), SDK-1171 (py), SDK-1172 (swift)

Generated with Claude Code /sync-sdk-parity

Dominant language
C#
Stars
701
Forks
106
Avg merge
16h 35m
Merged PRs (30d)
45

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/supabase-csharp

All issues in supabase/supabase-csharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.