Changelog
What changed in Socigy.OpenSource.DB. Binary COPY bulk insert, scalar/affected/DTO procedure returns, database-first scaffolding, and Transit data-key envelope encryption with per-column profiles and OpenBao support in 0.3.3; runtime-named typed tables ([TableType] and DynamicTable) in 0.3.2; the database-context bulk insert plus scalar and aggregate API in 0.3.1; and 0.3.0's field encryption, rotating credentials, and HashiCorp Vault package.
22 June 2026
Socigy.OpenSource.DBv0.3.3stable
Added
- Binary COPY bulk insert.
BulkCopy.InsertMultipleCopyAsync(rows, conn)(andDynamicTable<T>.InsertMultipleCopyAsync) load large batches via PostgreSQL's binaryCOPY ... FROM STDIN (FORMAT BINARY)— much faster than the parameterized multi-row insert and not bound by the 65,535-parameter limit. Values flow through the same per-column pipeline, so[Encrypted], JSON, and value-convertor columns are handled identically;NULLs are written as SQLNULL. COPY cannot useRETURNING, so DB-generated values are not propagated back — useInsertMultipleAsyncwhen you need generated keys. - Scalar procedure returns.
-- @returns scalar: TgeneratesTask<T>for single-value queries (COUNT,MAX,EXISTS, …) over primitives,string,Guid, date/time types, and their nullable forms.NULL/empty →default(T), with numeric widening (e.g.COUNT'sbigint→int) handled. - Affected-row procedure returns.
-- @returns affectedgeneratesTask<int>returning the rows a write affected, instead of the defaultTask<bool>. - DTO procedure returns.
-- @returns:can now name a plain POCO/record (not only a[Table]type); the generator emits an AOT-safe, by-name materializer for projections and report shapes. - Database-first scaffolding. New CLI commands
scaffold schema(live database →structure.json) andscaffold classes(database orstructure.json→ annotated[Table]C# classes), reusing the existing schema model so the result round-trips withgenerate. - Source-linked debug symbols. Embedded PDBs + SourceLink and deterministic CI builds, so consumers can step into library source.
- Public-API surface tracking. The Core project tracks its public API (
PublicAPI.*.txt) to guard against accidental breaking changes ahead of 1.0.
Changed
- New generator diagnostics
SCGDB019–SCGDB022validate the new procedure return directives (unsupported scalar type, conflicting or malformed@returns, and DTOs that cannot be mapped).
Fixed
- Migration generation on Linux/headless builds. With no interactive name prompt, the generated migration's file and class name were derived from the multi-line schema-diff summary, producing an invalid name (embedded newlines and
:). Headless builds now use a clean, deterministic{timestamp}_{prefix}_{hash}identifier. - Package metadata now points at the correct repository (
github.com/Socigy-org/Socigy.OpenSource.DB).