Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing server messages with provided encoding. #138

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Parsing server messages with provided encoding. #138

merged 1 commit into from
Sep 29, 2023

Conversation

isoos
Copy link
Owner

@isoos isoos commented Sep 27, 2023

No description provided.

@isoos
Copy link
Owner Author

isoos commented Sep 27, 2023

/cc @osaxma I think these changes may break you. On the plus side, most of the message parsing logic could be migrated to a slightly more efficient version, and it also enables custom encoding. My question: does the breaking change (mostly constructors of the message classes) too bad, should I mitigate it?

Also: XLogDataMessage.bytes - is this something we want to keep because it is useful?

@codecov-commenter
Copy link

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (c19af6c) 86.70% compared to head (02bced2) 86.65%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
- Coverage   86.70%   86.65%   -0.06%     
==========================================
  Files          29       29              
  Lines        2467     2457      -10     
==========================================
- Hits         2139     2129      -10     
  Misses        328      328              
Files Coverage Δ
lib/src/buffer.dart 100.00% <100.00%> (ø)
lib/src/server_messages.dart 76.03% <100.00%> (-1.66%) ⬇️
lib/src/shared_messages.dart 30.00% <0.00%> (+2.72%) ⬆️
lib/src/message_window.dart 94.33% <90.32%> (-5.67%) ⬇️
lib/src/logical_replication_messages.dart 69.59% <78.12%> (-1.84%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@isoos
Copy link
Owner Author

isoos commented Sep 29, 2023

merging it as-is, we may need to restore parts of it if needed

@isoos isoos merged commit 13c77cd into master Sep 29, 2023
1 check passed
@isoos isoos deleted the reader branch September 29, 2023 21:11
@osaxma
Copy link
Contributor

osaxma commented Sep 30, 2023

/cc @osaxma I think these changes may break you. On the plus side, most of the message parsing logic could be migrated to a slightly more efficient version, and it also enables custom encoding. My question: does the breaking change (mostly constructors of the message classes) too bad, should I mitigate it?

Hey sorry somehow I missed the notification.

Nothing looks breaking here.

Also: XLogDataMessage.bytes - is this something we want to keep because it is useful?

This is how I am using XlogDataMessage mostly (i.e. XLogDataMessage.data getter):

https://github.com/osaxma/postgresql-dart-replication-example/blob/f0615fe5af4bb8fad4c63061e48847fdba29a379/example/listen.dart#L27-L53

For physical replication, which I am not sure if someone wants to implement in Dart, the raw bytes is what they expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants