refactor(sql_builder): consolidate slot SQL preparation into dedicated functions - #109
Conversation
|
@copilot review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
==========================================
+ Coverage 94.76% 94.96% +0.20%
==========================================
Files 27 27
Lines 20678 20805 +127
==========================================
+ Hits 19596 19758 +162
+ Misses 1082 1047 -35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Reviewed |
5a94caa to
dfd7037
Compare
|
@copilot review |
Second review pass done. Verified in more depth this time:
One note: lenient-mode message wording changed for two cases — integer parse failures no longer append the Fixed two comment defects introduced when the commit was amended/reflowed: a duplicated sentence fragment in Fuzz CI remains red from a nightly
Correction: the comment fixes landed in |
…d functions refactor(deserializer): implement strict and lenient error handling policies refactor(connection): streamline replication slot SQL commands in PgReplicationConnection and NativeConnection test(stream): remove rustls-tls feature checks from tests for consistency
8cbab4a to
235752d
Compare
|
@copilot review |
Reviewed |
deserializer.rs): collapse the two ~220-lineserde impls behind a compile-time
ErrorPolicytrait (Strict/Lenient) plus oneshared coercion impl. Coercion rules and error messages are now single-sourced.
Strict's zero-copy
visit_borrowed_*+#[inline]path is preserved viamonomorphization. The two
Deserializerimpls stay separate (a single impl isimpossible under serde's
'deborrow model) — they differ only in the finalborrowed-vs-owned visit.
sql_builder.rs, both backends): addprepare_{create,alter,read}_slotto pair the version-check with the SQL builderin one place; both backends now call them instead of re-pairing. The real seam
libpq.rs,stream.rs): add libpq's matchingnull_for_testing_with_frames; 8 shared-pump tests now run on both backends,closing the libpq COPY-ingress coverage hole.
..._terminates_after_transport_stopstays rustls-only (it drives
PQputCopyEnd, which segfaults on libpq'snull-pointer conn; that path is backend-specific and integration-tested).