Skip to content

v0.4.1 — composite foreign keys

Latest

Choose a tag to compare

@andylbrummer andylbrummer released this 19 May 00:39
· 1958 commits to main since this release

Headline: composite foreign keys now work end-to-end on SqlServer, Postgres, MySQL, and Sqlite. Prior versions silently skipped them in ForeignKeyRelationshipStrategy.

Added — composite FKs

  • TableLinkDto.ChildIds/ParentIds + IsComposite (single-column path unchanged).
  • ForeignKeyRelationshipStrategy resolves + links composite FKs across all 4 dialects.
  • Composite SQL emission: suffixed JoinId_<i> / src_id_<i> aliases + ANDed multi-column ON-clauses.
  • ReaderEnum: composite-aware key extraction + matching via new JoinKeyValues / JoinKeyMatcher (single path for both Single and Join query types).
  • JoinKeyNames — single source of truth for alias convention.
  • TableJoin owns its own SQL emission (EmitJoinIdProjection, EmitSrcProjection, EmitOnClause).

Added — local dev infra

  • docker-compose.test.yml (sqlserver 2022 + postgres 16 + mysql 8.4) + scripts/test-env.sh mirror the CI matrix.

Tests

  • 8 new composite-FK integration tests (2 directions × 4 dialects) against a colliding-LocationId fixture.
  • Unit test asserting suffixed-alias SQL shape.
  • 3463 Core + 358 integration tests green across all 4 dialects.

Full changelog: https://github.com/standardbeagle/BifrostQL/blob/v0.4.1/CHANGELOG.md