Skip to content

V9.7.0

Choose a tag to compare

@jeremydmiller jeremydmiller released this 06 Jul 16:17
· 524 commits to master since this release

What's Changed

Shared, dialect-neutral SQL-generation contract in Weasel.Core (#327)

Introduces a dialect-neutral SQL-generation substrate in Weasel.Core so a database-agnostic consumer (e.g. Marten/Polecat's shared storage runtime) can compose WHERE fragments, select clauses, and commands without referencing Weasel.Postgresql / Weasel.SqlServer.

New in Weasel.Core:

  • Weasel.Core.ICommandBuilder — a non-generic, dialect-neutral command-builder surface exposing only the members whose signatures are identical across dialects (Append, AppendParameters, AddParameters, StartNewCommand, TenantId, LastParameterName, and the DbParameter[]-returning AppendWithDbParameters from #324).
  • Weasel.Core.SqlGeneration.ISqlFragment / ICompoundFragment — neutral fragment contracts applied against ICommandBuilder.

This is not a breaking change — the existing provider types now subclass the new Core abstractions:

  • Weasel.Postgresql.ICommandBuilder and Weasel.SqlServer.ICommandBuilder derive from Weasel.Core.ICommandBuilder (provider-typed AppendParameter / grouped-parameter overloads stay on the dialect interface).
  • Each dialect SqlGeneration.ISqlFragment derives from the Core fragment, keeps its existing dialect-typed Apply overload, and satisfies the neutral Apply(ICommandBuilder) requirement via a default interface method that forwards to it — so existing fragment implementers need no changes and existing call sites still bind to the dialect overload.

SQL Server parity: SqlServer.CommandBuilder now also implements Weasel.Core.ICommandBuilder, and a SQL Server ICompoundFragment lets CompoundWhereFragment participate in neutral tree-walks. SQL Server's per-fragment Contains(string) stays dialect-only.

This unblocks the physical package move of Marten's extracted, Npgsql-free storage runtime (JasperFx/marten#4830).

Full Changelog: V9.6.0...V9.7.0