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
|
### Phase 1: SQL Functions & Procedure
|
||||||
1. Create `045_CreateScalarExtractionFunctions.sql` (3 scalar functions)
|
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)
|
3. Create `047_CreateComplexTableFunctions.sql` (2 inline TVFs with OPENJSON...WITH)
|
||||||
4. Create `048_CreateValidateSearchCriteriaProcedure.sql` (validation procedure)
|
4. Create `048_CreateValidateSearchCriteriaProcedure.sql` (validation procedure)
|
||||||
5. Delete obsolete Table Type scripts (033-039)
|
5. Delete obsolete Table Type scripts (033-039) - keep gaps, don't renumber
|
||||||
6. Renumber remaining scripts (040-044 → 033-037)
|
|
||||||
|
|
||||||
### Phase 2: Database Tests
|
### Phase 2: Database Tests
|
||||||
7. Set up `DatabaseTestBase.cs`
|
6. Set up `DatabaseTestBase.cs` with xUnit Collection for isolation
|
||||||
8. Write `ScalarFunctionTests.cs`
|
7. Write `ScalarFunctionTests.cs`
|
||||||
9. Write `SimpleTableFunctionTests.cs`
|
8. Write `SimpleTableFunctionTests.cs`
|
||||||
10. Write `ComplexTableFunctionTests.cs`
|
9. Write `ComplexTableFunctionTests.cs`
|
||||||
11. Write `ValidateSearchCriteriaProcedureTests.cs`
|
10. Write `ValidateSearchCriteriaProcedureTests.cs`
|
||||||
12. Verify all tests pass
|
11. Verify all tests pass
|
||||||
|
|
||||||
### Phase 3: C# Refactor
|
### Phase 3: C# Refactor
|
||||||
13. Update `ISearchQueryBuilder` interface
|
12. Update `ISearchQueryBuilder` interface
|
||||||
14. Update `SqlKataSearchQueryBuilder`
|
13. Update `SqlKataSearchQueryBuilder`
|
||||||
15. Update `SearchProcessor`
|
14. Update `SearchProcessor`
|
||||||
16. Simplify `SearchModel`
|
15. Simplify `SearchModel`
|
||||||
17. Delete `TableValuedParameterExtensions.cs`
|
16. Delete `TableValuedParameterExtensions.cs`
|
||||||
18. Delete `FilterEntries/*.cs`
|
17. Delete `FilterEntries/*.cs`
|
||||||
19. Update/delete related tests
|
18. Update/delete related tests
|
||||||
|
|
||||||
### Phase 4: Integration & Verification
|
### Phase 4: Integration & Verification
|
||||||
20. Run full test suite
|
19. Run full test suite
|
||||||
21. Fix broken tests
|
20. Fix broken tests
|
||||||
22. Manual end-to-end verification
|
21. Manual end-to-end verification
|
||||||
|
|
||||||
### Phase 5: Documentation
|
### Phase 5: Documentation
|
||||||
23. Update OpenSpec specifications
|
22. Update OpenSpec specifications
|
||||||
24. Update architecture documentation
|
23. Update architecture documentation
|
||||||
25. Add Database.Tests documentation
|
24. Add Database.Tests documentation
|
||||||
26. Create ExtractionFunctions.md reference
|
25. Create ExtractionFunctions.md reference
|
||||||
|
|
||||||
## Acceptance Criteria
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user