realtime-csharp
realtime-csharp copied to clipboard
fix: enhancement of postgres change handlers
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 methodOnPostgresChangeto register and add PostgreSQL change handlers with various parameters.Realtime/RealtimeChannel.cs: Implemented theOnPostgresChangemethod and marked the olderAddPostgresChangeHandlerandRegistermethods as obsolete. [1] [2]
Deprecations:
Realtime/Interfaces/IRealtimeClient.cs: Marked theChannelmethod with multiple parameters as obsolete, advising to use the simplerChannel(string channelName)method instead.Realtime/PostgresChanges/PostgresChangesOptions.cs: Deprecated theParametersproperty, 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.envto the.gitignorefile 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.