Event-storage E1: de-Npgsql the closed-shape event binders + per-event ops (Weasel 9.14.0)#4898
Merged
Conversation
…t ops (consume Weasel 9.14.0) Consumes Weasel 9.14.0 (weasel#339: dialect-neutral grouped-parameter seam + StorageColumnType.Binary) to drop the direct Npgsql reference from the closed-shape event metadata binders and the two per-event append operations, in place — no file moves. This is the event-side analog of the document INC-3 increment and prepares these types for the E2/E3 physical move into Weasel.Storage. - IEventMetadataBinder.Bind now takes the neutral Weasel.Core.IGroupedParameterBuilder. - The 5 metadata binders (Sequence/Headers/Causation/Correlation/UserName) take a ctor-injected IStorageDialect and set provider parameter types via SetParameterType(param, StorageColumnType.X) instead of NpgsqlDbType. - RichAppendEventOperation + QuickAppendEventWithVersionOperation bind their core columns the same way; the QuickWithVersion op gains an IStorageDialect ctor param, and all three descriptors carry a Dialect slot the event dialect installs (resolved per stream identity from PostgresStorageDialect<TId>). - PostgresStorageDialect.SetParameterType maps the new StorageColumnType.Binary to NpgsqlDbType.Bytea (event bdata column). - CompiledQueryPlan implements the two new neutral Weasel.Core.ICommandBuilder members (AppendParameter(object) / CreateGroupedParameterBuilder) explicitly, delegating to its existing Npgsql-typed implementations. PostgresEventStoreDialect and the Quick bulk operation (QuickAppendEventsOperation, array params to mt_quick_append_events) stay Postgres-local by design. Validated (net10): EventSourcingTests 1430, TenantPartitionedEventsTests 217, LinqTests compiled-query 75, all green; full solution Debug + Release clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the #4821 / #4830 follow-on — moving the closed-shape event storage into Weasel.Storage so Polecat can ship its SQL Server event dialect. This is the event-side analog of the document INC-3 increment: it consumes the new Weasel 9.14.0 neutral grouped-parameter seam to drop the direct Npgsql reference from the event metadata binders and the per-event append operations, in place (no file moves yet), leaving them ready for the E2/E3 physical move.
Follows E0 (#4885, merged).
Upstream (already published)
Weasel 9.14.0 (weasel#339) added a dialect-neutral grouped-parameter seam —
Weasel.Core.IGroupedParameterBuilder,ICommandBuilder.CreateGroupedParameterBuilder(char?)/AppendParameter(object)— plusStorageColumnType.Binary.Changes
IEventMetadataBinder.Bindnow takes the neutralWeasel.Core.IGroupedParameterBuilder.Sequence/Headers/Causation/Correlation/UserName) take a ctor-injectedIStorageDialectand type their parameters viaSetParameterType(param, StorageColumnType.X)instead ofNpgsqlDbType— mirroring the document-sideDocumentCausationIdBinderetc.RichAppendEventOperationandQuickAppendEventWithVersionOperationbind their core columns the same way. The QuickWithVersion op gains anIStorageDialectctor param; all three descriptors carry aDialectslot the event dialect installs, resolved per stream identity fromPostgresStorageDialect<TId>.PostgresStorageDialect.SetParameterTypemaps the newStorageColumnType.Binary→NpgsqlDbType.Bytea(the eventbdatacolumn).CompiledQueryPlanimplements the two new neutralWeasel.Core.ICommandBuildermembers explicitly, delegating to its existing Npgsql-typed implementations (same disambiguation weasel#327 needed).PostgresEventStoreDialectand the Quick bulk operation (QuickAppendEventsOperation— array params tomt_quick_append_events,PostgresExceptionMT001/MT003) stay Postgres-local by design.Validation
CompiledQueryPlanchangeMarten.slnxDebug + Release cleanNext: E2 moves the descriptor core + binders +
IEventStoreSqlDialectinto Weasel.Storage; E3 moves the storage hierarchy + ops.🤖 Generated with Claude Code