Skip to content

Tags: coenttb/swift-structured-queries-postgres

Tags

0.2.1

Toggle 0.2.1's commit message
docs: update Related Packages section with accurate categorization

0.2.0

Toggle 0.2.0's commit message
Release 0.2.0 - Enhanced PostgreSQL Functions and API Improvements

Major Features:
- PostgreSQL UUID functions (Chapter 9.14) - uuid_generate_v1-v5, uuid_nil, namespaces
- Complete lifted aggregate support (sum, avg, min, max) with filtering and HAVING
- Closure-based filter parameters for conditional aggregation
- High-level Table and Where APIs for intuitive aggregate queries

Organizational Improvements:
- Organized functions into PostgreSQL namespaces (String, Math, Array, Window, Conditional, Subquery, CTE)
- Aligned directory structure with PostgreSQL Chapter 9 documentation
- Renamed Convenience/ → Extensions/ for clarity
- Split DateTime functions into focused files

API Enhancements:
- Added @_disfavoredOverload to prevent stdlib method conflicts
- Improved Array function APIs with Swifty naming
- Better Optional handling in queries
- Self.all pattern for cleaner Table.count() semantics

Fixes:
- Resolved #sql macro warnings with escaped apostrophes
- Improved test infrastructure and snapshot testing
- Removed deprecated .upper() and .lower() methods

Infrastructure:
- Removed Slack notification workflow
- Updated documentation (Architecture.md, TESTING.md)
- Switched to stable swift-syntax version range
- Comprehensive test coverage with 880 passing tests

Breaking Changes:
- Functions moved to new namespaces (use PostgreSQL.String.concat instead of concat, etc.)
- Convenience/ directory renamed to Extensions/
- Some aggregate APIs consolidated with generic helpers

This release represents a significant reorganization improving alignment with PostgreSQL documentation
while maintaining comprehensive test coverage and adding powerful new aggregate capabilities.

0.1.0

Toggle 0.1.0's commit message
Release 0.1.0 - Swift Structured Queries for PostgreSQL

Initial release providing type-safe PostgreSQL query building for Swift.

Features:
- Type-safe query builder DSL for PostgreSQL
- @table macro for automatic query generation
- Comprehensive PostgreSQL function support (Chapter 9 coverage)
- Window functions, CTEs, and advanced SQL features
- JSONB operators and full-text search
- Enum table support via CasePaths
- Snapshot testing with optional SQL validation

CI and Testing:
- Tests pass on macOS (Xcode 26.0) and Linux (Swift 6.1, 6.2)
- CI completes in ~5 minutes
- SQL validation gracefully handles missing PostgreSQL
- No heavy dependencies by default (PostgresNIO optional via trait)

This package is a PostgreSQL-focused fork of Point-Free's swift-structured-queries.