v1.2.3
release: v1.2.3 - CTE & UNION fluent builders
🎯 Core Theme: Composable SQL pipelines without leaving BuilderX
✨ New Capabilities:
-
Common Table Expressions
With(name, fn)&WithRecursive(name, fn)for multi-stage query setup- Automatic alias normalization and parameter propagation
- Regression coverage via
with_cte_test.go
-
UNION chaining
UNION(kind, fn)withALL()helper (default = DISTINCT)- Stack multiple unions while preserving ORDER BY / LIMIT semantics
- New tests ensure DISTINCT/ALL correctness
-
Metadata injection
Meta(func(meta *interceptor.Metadata))enables inline TraceID/Tenant setup- Interceptors receive enriched metadata prior to Build()
🔧 Internal Improvements:
- Shared SQL core writer now feeds both base SELECT and UNION branches
DISTINCTconstant renamed toDISTINCT_SCRIPTto avoid helper collision- Builder states cache CTE / UNION clauses to avoid duplicate builds
📖 Documentation:
- README updated with v1.2.3 highlight section, CTE/UNION examples, metadata usage
- CHANGELOG、Release Notes、Test Report 全面同步
🧪 Quality:
go test ./...✅ (~240 cases including new suites)- No breaking changes; existing APIs continue to work unchanged
🚀 Summary:
v1.2.3 brings enterprise-grade analytics features—CTEs, recursive hierarchies, UNION composition, and observability—while keeping the fluent builder experience intact.