Commit 29acee0
committed
refactor: add PostgreSQL.Array namespace for organization
Adds PostgreSQL.Array namespace to avoid potential conflicts with Swift.Array.
The existing Array function implementations were already excellent with:
- ✅ Swifty naming (.appending(), .removing(), .replacing())
- ✅ @_disfavoredOverload on .joined() to prevent stdlib conflicts
- ✅ Comprehensive PostgreSQL Chapter 9.19 coverage
- ✅ Well-organized into 4 files by function category
## Changes
- Added Array/Array.swift with PostgreSQL.Array namespace definition
- Documented dual API pattern (namespace vs method style)
- No changes to existing implementations (already perfect)
## No Stdlib Conflicts
- .contains() - Different signature (array literals vs predicates)
- .joined() - Already has @_disfavoredOverload
- .count - Not implemented (using .arrayLength()/.cardinality() instead)
- .append() - Not a conflict (.appending() returns new array)
## Test Results
✅ All 860 tests passing
✅ Existing Array functions work perfectly
✅ Ready for future namespace-style static methods if needed1 parent 0bbb660 commit 29acee0
File tree
1 file changed
+39
-0
lines changed- Sources/StructuredQueriesPostgres/Functions/Array
1 file changed
+39
-0
lines changedLines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments