docs: update plans based on Codex review
Codex review findings applied: - Use CTE pattern to pre-filter valid JSON before OPENJSON - Use OPENJSON...WITH for type-safe extraction (avoids double TRY_CONVERT) - Keep script gaps instead of renumbering (prevents migration drift) - Add xUnit Collection for test isolation (prevents parallel execution issues)
This commit is contained in:
@@ -309,39 +309,38 @@ Share with `Api.IntegrationTests` via `TestWebApplicationFactory` pattern.
|
||||
|
||||
### Phase 1: SQL Functions & Procedure
|
||||
1. Create `045_CreateScalarExtractionFunctions.sql` (3 scalar functions)
|
||||
2. Create `046_CreateSimpleTableFunctions.sql` (5 inline TVFs)
|
||||
2. Create `046_CreateSimpleTableFunctions.sql` (5 inline TVFs with CTE pattern)
|
||||
3. Create `047_CreateComplexTableFunctions.sql` (2 inline TVFs with OPENJSON...WITH)
|
||||
4. Create `048_CreateValidateSearchCriteriaProcedure.sql` (validation procedure)
|
||||
5. Delete obsolete Table Type scripts (033-039)
|
||||
6. Renumber remaining scripts (040-044 → 033-037)
|
||||
5. Delete obsolete Table Type scripts (033-039) - keep gaps, don't renumber
|
||||
|
||||
### Phase 2: Database Tests
|
||||
7. Set up `DatabaseTestBase.cs`
|
||||
8. Write `ScalarFunctionTests.cs`
|
||||
9. Write `SimpleTableFunctionTests.cs`
|
||||
10. Write `ComplexTableFunctionTests.cs`
|
||||
11. Write `ValidateSearchCriteriaProcedureTests.cs`
|
||||
12. Verify all tests pass
|
||||
6. Set up `DatabaseTestBase.cs` with xUnit Collection for isolation
|
||||
7. Write `ScalarFunctionTests.cs`
|
||||
8. Write `SimpleTableFunctionTests.cs`
|
||||
9. Write `ComplexTableFunctionTests.cs`
|
||||
10. Write `ValidateSearchCriteriaProcedureTests.cs`
|
||||
11. Verify all tests pass
|
||||
|
||||
### Phase 3: C# Refactor
|
||||
13. Update `ISearchQueryBuilder` interface
|
||||
14. Update `SqlKataSearchQueryBuilder`
|
||||
15. Update `SearchProcessor`
|
||||
16. Simplify `SearchModel`
|
||||
17. Delete `TableValuedParameterExtensions.cs`
|
||||
18. Delete `FilterEntries/*.cs`
|
||||
19. Update/delete related tests
|
||||
12. Update `ISearchQueryBuilder` interface
|
||||
13. Update `SqlKataSearchQueryBuilder`
|
||||
14. Update `SearchProcessor`
|
||||
15. Simplify `SearchModel`
|
||||
16. Delete `TableValuedParameterExtensions.cs`
|
||||
17. Delete `FilterEntries/*.cs`
|
||||
18. Update/delete related tests
|
||||
|
||||
### Phase 4: Integration & Verification
|
||||
20. Run full test suite
|
||||
21. Fix broken tests
|
||||
22. Manual end-to-end verification
|
||||
19. Run full test suite
|
||||
20. Fix broken tests
|
||||
21. Manual end-to-end verification
|
||||
|
||||
### Phase 5: Documentation
|
||||
23. Update OpenSpec specifications
|
||||
24. Update architecture documentation
|
||||
25. Add Database.Tests documentation
|
||||
26. Create ExtractionFunctions.md reference
|
||||
22. Update OpenSpec specifications
|
||||
23. Update architecture documentation
|
||||
24. Add Database.Tests documentation
|
||||
25. Create ExtractionFunctions.md reference
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user