realtime-csharp icon indicating copy to clipboard operation
realtime-csharp copied to clipboard

fix: enhancement of postgres change handlers

Open grdsdev opened this issue 9 months ago • 0 comments
trafficstars

This pull request includes several changes to improve the handling of PostgreSQL changes, update channel naming conventions, and enhance testing configurations. The most important changes include the introduction of a new method for handling PostgreSQL changes, deprecations of older methods, and updates to test cases to reflect these new changes.

Enhancements to PostgreSQL Change Handling:

  • Realtime/Interfaces/IRealtimeChannel.cs: Added a new method OnPostgresChange to register and add PostgreSQL change handlers with various parameters.
  • Realtime/RealtimeChannel.cs: Implemented the OnPostgresChange method and marked the older AddPostgresChangeHandler and Register methods as obsolete. [1] [2]

Deprecations:

  • Realtime/Interfaces/IRealtimeClient.cs: Marked the Channel method with multiple parameters as obsolete, advising to use the simpler Channel(string channelName) method instead.
  • Realtime/PostgresChanges/PostgresChangesOptions.cs: Deprecated the Parameters property, indicating it will be removed in a future version.

Channel Naming Conventions:

  • Realtime/Client.cs: Updated channel topic creation to ensure it starts with "realtime:".
  • Updated various test files (RealtimeTests/ChannelPostgresChangesTests.cs, RealtimeTests/ChannelTests.cs, RealtimeTests/ClientTests.cs) to use the new channel naming conventions (realtime:public:todos). [1] [2] [3]

Testing Configurations:

  • .github/workflows/build-and-test.yml: Replaced commented-out steps with Supabase setup and start commands to streamline the build and test workflow.
  • supabase/.gitignore: Added .branches, .temp, and .env to the .gitignore file to exclude Supabase-related temporary files.

These changes collectively enhance the functionality and maintainability of the codebase, particularly in handling PostgreSQL changes and improving testing workflows.

grdsdev avatar Jan 24 '25 14:01 grdsdev