You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README with accurate metrics and prominent swift-records integration
- Update test count to 467 (from 280+)
- Remove coverage percentage claims
- Change Swift requirement to 6.1+ (from 6.0+)
- Make swift-records integration more prominent with feature list
- Remove CLAUDE.md reference from documentation section
- Update license to MIT (from Apache/AGPL dual-license)
- Remove 'production-ready' claims
docs: fix trait configuration syntax in README
- Traits are package-level, not target swiftSettings
- CasePaths and SQLValidation traits enabled by default
- Consumers just add dependency normally
docs: improve README examples - remove unnecessary @column annotation, update window function examples to match tests, showcase elegant trigger DSL
-⚡**Production-ready**: Swift 6.0+ with strict concurrency
17
-
-🧪**280+ tests** with SQL snapshot testing
18
-
-🔌**Seamless integration** with [swift-records](https://github.com/coenttb/swift-records)
15
+
-🔌**Built for [swift-records](https://github.com/coenttb/swift-records)**: High-level database operations with connection pooling, transactions, and migrations
16
+
-⚡**Swift 6.1+** with strict concurrency
17
+
-🧪**467 tests** with SQL snapshot testing
19
18
20
19
## Quick Start
21
20
@@ -63,18 +62,17 @@ Debug builds have Swift 6.x compiler linker issues. This is a known Swift compil
63
62
64
63
### Optional Features
65
64
66
-
Enable optional traits in your `Package.swift`:
65
+
The following traits are enabled by default:
66
+
-**StructuredQueriesPostgresCasePaths**: Enum table support via swift-case-paths
67
+
-**StructuredQueriesPostgresSQLValidation**: SQL validation using PostgresNIO (heavy dependency)
68
+
69
+
These traits are configured at the package level and automatically available when you add the dependency:
-**Build**: Use `swift build -c release` (debug mode has linker issues)
438
453
-**PostgreSQL**: Designed for PostgreSQL 12+
439
454
440
455
### CI Status
441
456
442
457
Tested on:
443
-
- ✅ Swift 6.0, 6.1, 6.2
458
+
- ✅ Swift 6.1, 6.2
444
459
- ✅ macOS (latest)
445
460
- ✅ Linux (Ubuntu)
446
461
@@ -462,13 +477,25 @@ Key differences from Point-Free's swift-structured-queries (SQLite):
462
477
463
478
## Integration with swift-records
464
479
465
-
This package provides **query building only**. For database operations (connection pooling, execution, migrations), use [swift-records](https://github.com/coenttb/swift-records):
480
+
This package provides **query building only**. For complete database functionality, use it with [**swift-records**](https://github.com/coenttb/swift-records):
481
+
482
+
### What swift-records Provides
483
+
484
+
- 🔄 **Connection pooling** with automatic lifecycle management
485
+
- 💾 **Transaction support** with isolation levels and savepoints
486
+
- 🔄 **Migration management** with version tracking
487
+
- 🧪 **Test utilities** with schema isolation for parallel testing
488
+
489
+
### Usage
466
490
467
491
```swift
468
-
// Query building (this package)
469
-
let statement = User.where { $0.isActive }
492
+
// 1. Build queries (this package)
493
+
let statement = User
494
+
.where { $0.isActive }
495
+
.order(by: \.name)
496
+
.limit(10)
470
497
471
-
//Execution (swift-records)
498
+
//2. Execute with swift-records
472
499
let users =tryawait statement.fetchAll(db)
473
500
let user =tryawait statement.fetchOne(db)
474
501
tryawait statement.execute(db)
@@ -482,12 +509,7 @@ To learn about the core concepts behind structured query building in Swift, chec
482
509
483
510
## License
484
511
485
-
Dual-licensed:
486
-
487
-
-**Apache License 2.0**: Core query building infrastructure (inherited from Point-Free's swift-structured-queries)
488
-
-**AGPL 3.0**: PostgreSQL-specific additions and features
489
-
490
-
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-AGPL](LICENSE-AGPL) for details.
512
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
0 commit comments