From b3c59979dcf2d6d747f687bc20dac7ca13d9965c Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Tue, 3 Nov 2026 20:36:50 +0100 Subject: [PATCH] Replace porting-era docs with a contributing guide CONTRIBUTING.md now holds what was still useful from the porting log, validation records and XML documentation audit: SqlKata origin, build and test steps, generated code, SqlKata reference tests and XML documentation conventions. Removed docs/PORTING.md, docs/VALIDATION.md, docs/XML_DOCUMENTATION.md, the dated validation JSON files and tools/record_validation.py. Old changelog entries link to the copies in the v1.0.0 and v2.0.0 tags. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 9 +- CONTRIBUTING.md | 102 +++++ README.md | 6 +- docs/API.md | 5 +- docs/EXAMPLES.md | 4 +- docs/PORTING.md | 168 -------- docs/VALIDATION.md | 563 -------------------------- docs/WEBSITE.md | 2 +- docs/XML_DOCUMENTATION.md | 195 --------- docs/firedac-validation-results.json | 28 -- docs/nullable-mapping-validation.json | 76 ---- docs/nullable-writing-validation.json | 72 ---- docs/validation-results.json | 33 -- tools/record_validation.py | 51 --- website/build.mjs | 9 +- website/test/browser/website.spec.mjs | 4 +- 16 files changed, 122 insertions(+), 1205 deletions(-) create mode 100644 CONTRIBUTING.md delete mode 100644 docs/PORTING.md delete mode 100644 docs/VALIDATION.md delete mode 100644 docs/XML_DOCUMENTATION.md delete mode 100644 docs/firedac-validation-results.json delete mode 100644 docs/nullable-mapping-validation.json delete mode 100644 docs/nullable-writing-validation.json delete mode 100644 docs/validation-results.json delete mode 100644 tools/record_validation.py diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d244f..e27e3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,11 @@ Versions follow [Semantic Versioning](https://semver.org/). ### Changed +- Contributor guidance moved into `CONTRIBUTING.md`: SqlKata origin, generated + code, reference tests and XML documentation conventions. The porting log, + dated validation records and XML documentation audit (`docs/PORTING.md`, + `docs/VALIDATION.md`, `docs/XML_DOCUMENTATION.md`, the validation JSON files + and `tools/record_validation.py`) were removed; they remain in the v2.0.0 tag. - The converter emits flat fluent chains for AND or OR sequences and nests a callback only where the operator changes. - Converter error messages quote the unsupported SQL fragment and suggest the @@ -96,7 +101,7 @@ a documentation website with a browser-local SQL-to-Delphi converter. ### Validation - Release checks and their scope are recorded in - [validation details](docs/VALIDATION.md#v200-release-validation-2026-10-31). + [validation details](https://github.com/auchri/QueryBuilder4Delphi/blob/v2.0.0/docs/VALIDATION.md#v200-release-validation-2026-10-31). - Existing Delphi executables rerun: 940 Core and 94 FireDAC tests passed on each of Win32 and Win64, with zero failures, errors, ignored tests or leaks. These are reruns of the October 25 IDE builds, not fresh release builds. @@ -148,7 +153,7 @@ Delphi 12 and later on Windows (Win32 and Win64). - All four suites reported zero failures, errors, ignored tests or test leaks. - Database integration was verified with SQLite in memory. Other dialects were covered by SQL compilation and binding tests; server-specific execution was - not tested. See [validation details](docs/VALIDATION.md). + not tested. See [validation details](https://github.com/auchri/QueryBuilder4Delphi/blob/v1.0.0/docs/VALIDATION.md). [Unreleased]: https://github.com/auchri/QueryBuilder4Delphi/compare/v2.0.0...HEAD [2.0.0]: https://github.com/auchri/QueryBuilder4Delphi/releases/tag/v2.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..11dd64c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,102 @@ +# Contributing + +QueryBuilder4Delphi is a Delphi port of [SqlKata](https://github.com/sqlkata/querybuilder), +ported from SqlKata commit `df4a2377750d34fc057c81886b481e7309ef975e`. The +query model and SQL compilers follow SqlKata; execution, object mapping and +`TNullable` are Delphi additions. Intentional differences from SqlKata are +listed in the [API reference](docs/API.md#additional-behavior-and-limitations). + +## Build and test + +Requirements: Delphi 12 or later for Win32 and Win64, Python 3 for the +generators and checks, and Node.js 24 for the website. + +1. Open `QueryBuilder4Delphi.Tests.groupproj` and use **Project > Build All + Projects** for Win32 and Win64. It contains the core DUnitX tests and the + FireDAC/SQLite integration tests. +2. Run both suites on both platforms: + + ```powershell + ./tools/build.ps1 -Suite Core -Platform Both -TestsOnly + ./tools/build.ps1 -Suite FireDAC -Platform Both -TestsOnly + ``` + + Without `-TestsOnly`, the script also compiles. That needs an edition with + command-line compilation; Community Edition builds only in the IDE. +3. Run the generator and documentation checks from the repository root: + + ```text + python tools/generate_query.py --check + python tools/generate_oracle.py --check + python tools/check_xml_documentation.py + python -m unittest discover -s tools -p "test_*.py" + ``` + +Website and converter changes are described in +[Website maintenance](docs/WEBSITE.md), including the generated Delphi smoke +projects (`build/converter-smoke/ConverterSmoke.groupproj`). + +Optional: [tools/format.ps1](tools/format.ps1) runs the Delphi formatter on +`src` and `test`, and [Mapping performance](docs/MAPPING_PERFORMANCE.md) +explains how to rerun the benchmarks. + +## Generated code + +Do not edit generated sections by hand; change the generator and rerun it. + +- **Fluent wrappers.** [tools/generate_query.py](tools/generate_query.py) + writes the repetitive fluent declarations and implementations between + `BEGIN GENERATED` and `END GENERATED` markers in + `QueryBuilder4Delphi.Query.Core.pas` and `QueryBuilder4Delphi.Query.pas`. + Their XML documentation comes from + [tools/query_documentation.py](tools/query_documentation.py). Code outside + the markers is never touched. +- **Reference tests.** [tools/generate_oracle.py](tools/generate_oracle.py) + defines paired C# and Delphi scenarios. It writes `test/Oracle.Scenarios.pas`, + the DUnitX test cases and the C# program in `tools/oracle`. + +`--check` compares tokens, including comments, without writing files. + +## Reference results from SqlKata + +`test/golden.json` holds SQL, raw SQL and bindings that the original C# +SqlKata produces for every scenario and dialect. The Delphi tests compare +against it, so the port stays faithful to SqlKata. + +To add a scenario or refresh the results, clone SqlKata next to this +repository (as `../querybuilder`), then: + +```text +python tools/generate_oracle.py ../querybuilder +dotnet run --project tools/oracle -- test/golden.json +``` + +Twelve combinations intentionally differ from SqlKata: HAVING callbacks and +Oracle aggregate aliases. They keep the unmodified C# output in +`golden.json`, are excluded from the direct comparison, and have dedicated +tests for the corrected behavior. + +## XML documentation + +Every exported declaration in `src` has Delphi XML documentation: + +- `///` comments directly before the declaration, using `summary`, named + `param`, `returns` and, where useful, `remarks` and `exception cref`. +- Escape XML characters, including generic angle brackets; wrap at 110 columns. +- No C#-only tags such as `typeparam` or `inheritdoc`, and no Markdown. +- Each enum value has its own summary; the enum's summary also describes all + values. +- Describe behavior callers rely on: fluent mutation versus cloning, + parameterized output versus diagnostic previews, NULL handling, ownership. + +`tools/check_xml_documentation.py` checks coverage, XML validity, the tag set +and that parameter names match each signature. It reads the declaration forms +used in this repository; it is not a full Delphi parser. + +## Pull requests + +- Add or update tests with every behavior change, and run the checks above. +- Note user-visible changes in [CHANGELOG.md](CHANGELOG.md) under + **Unreleased**. +- Keep `README.md` examples compiling: they are checked by + `test/DocumentationExamples.pas`. diff --git a/README.md b/README.md index d849ff5..ee9cab6 100644 --- a/README.md +++ b/README.md @@ -278,10 +278,8 @@ After IDE builds, run: ``` Command-line builds through `tools/build.ps1` require an edition that supports -command-line compilation. [Validation notes](docs/VALIDATION.md) distinguish -compiled examples, compiler regression checks and actual database execution. -[Contributor and reference notes](docs/PORTING.md) cover generated code and test -provenance. +command-line compilation. See [Contributing](CONTRIBUTING.md) for generated +code, the SqlKata reference tests and documentation checks. ## License diff --git a/docs/API.md b/docs/API.md index 2758bfb..05ab08b 100644 --- a/docs/API.md +++ b/docs/API.md @@ -366,9 +366,8 @@ through `ICompiler`. - Explicit arrays provide stable column/value order; RTTI property and dictionary enumeration order should not be assumed. -[Examples](EXAMPLES.md) show usage. [Contributor notes](PORTING.md) retain -technical history and reference-test provenance; [validation](VALIDATION.md) -records what was compiled and executed. +[Examples](EXAMPLES.md) show usage. [Contributing](../CONTRIBUTING.md) explains +generated code and the SqlKata reference tests. ### Nullable object parameters diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index f3b0d77..0240a9a 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -1359,8 +1359,8 @@ no live external adapter execution is claimed. The README quick starts use the same query/execution operations; these examples are not a schema or connection-management framework. -See [validation](VALIDATION.md) for actual run results, [API details](API.md) for -contracts, and [LICENSE](../LICENSE) for retained copyright and permission terms. +See [API details](API.md) for contracts, and [LICENSE](../LICENSE) for retained +copyright and permission terms. ## One nullable DTO for INSERT, SELECT and UPDATE diff --git a/docs/PORTING.md b/docs/PORTING.md deleted file mode 100644 index 3cf0ae0..0000000 --- a/docs/PORTING.md +++ /dev/null @@ -1,168 +0,0 @@ -# Porting plan - -Source: SqlKata, local commit df4a2377750d34fc057c81886b481e7309ef975e. -Target: Delphi 12 or later, Windows Win32/Win64. No SqlKata.Execution port. -An optional FireDAC adapter was subsequently added at the user's request. -Queries, compilers, and SQL results use reference-counted interfaces. -The initial class-based API was migrated at the user's explicit request. -Supplied subqueries are copied. Callback queries are released internally. - -Completed work packages: - -1. Project structure, license, and porting plan (`5eac4fa`). -2. Query model and fluent API with conditions and ownership management (`802ed35`). -3. SQL compilers for SELECT, joins, subqueries, CTEs, set operations, writes, - and aggregates across all six dialects (`3955bc5`). -4. DUnitX project, C# reference data, and build script; 563 passing tests per - platform on Win32 and Win64, with no build warnings. -5. README with tested examples, API mapping, and validation documentation. - -Language-specific API differences and limitations are documented in -[API.md](API.md). Actual validation results are recorded in -[VALIDATION.md](VALIDATION.md). The approved corrections to HAVING callbacks -and Oracle aggregate aliases are documented separately from C# parity. - -Completed work packages for the interface migration: - -6. `IQuery`, `ICompiler`, `ISqlResult`, and interface factories with the same - fluent method names; automatic lifetime management for temporary chains - (`9d62252`). -7. Tests migrated to interfaces, plus seven lifetime regression tests using - destructor counters; 570 tests passed on each of Win32 and Win64, with no - build warnings (`d65686d`). -8. Updated README examples, API mapping, and validation records (`ff425ed`). - -Completed work packages for compiler classes: - -9. Replace compiler include files and record factories with a `TCompiler` - base class and six dialect subclasses in individual Pascal units. Move - dialect behavior into virtual overrides and retain the reference-counted - `Create` API and the interim `SqlKata.Compilers` compatibility facade - (`883f4a2`), subsequently renamed in step 11. -10. Add eight tests for class factories, direct unit imports, and custom - descendants; update the test project, API documentation, and validation - records for Win32 and Win64. The class and inheritance tests are recorded - in `91e6a9f`; all 578 tests pass on each platform. - -11. Rename the compiler units and facade from `SqlKata.Compilers` to - `QueryBuilder4Delphi.Compilers`, updating project references, tests, and - API documentation. At this stage, imports used the renamed facade or - individual compiler units. Step 19 subsequently removes the renamed - facade too; current applications must import individual compiler units. - -Completed work packages for query writes: - -12. Start `codex/refactor-query-writes` from the freshly fetched `origin/main` - at `1a39f8d`, before modifying any files. Replace `SqlKata.Writes.inc` with - the stateless `TQueryWrites` class in `QueryBuilder4Delphi.Query.Writes` - and `TQueryDataMapper` in `QueryBuilder4Delphi.Query.DataMapper`. - Keep the public fluent API and reference-counted return values unchanged. -13. Add eight write and RTTI mapping regression cases; rebuild and run all - 586 tests on both Win32 and Win64. Update the API and validation records. - -Completed work packages for the query unit: - -14. Start `codex/refactor-query-unit` independently from `origin/main` at - `1a39f8d`, then rebase onto `58dca75` after PR #2 was merged. Move the - write forwarding methods into the extracted query class. Remove - `SqlKata.Query.inc` and move - `TQueryObject` and the `TQuery` factory into `QueryBuilder4Delphi.Query`. - Move shared interfaces, clauses, attributes, and value helpers into - `QueryBuilder4Delphi.Query.Core`. Retain `SqlKata` as a compatibility facade - at this stage; step 19 subsequently removes it. -15. Add eight query-model regression tests for direct imports, facade type - identity, subclass cloning, scopes, callbacks, subqueries, joins, - pagination, and value helpers. Update project references and documentation. - All 594 tests pass on both Win32 and Win64 after full Delphi 12 builds - with zero errors and warnings. - -Completed work packages for the remaining includes: - -16. Start `codex/remove-remaining-includes` from `origin/main` at `6341bba`, - after PR #3 was merged. Replace fluent declaration and implementation - includes with generated sections in the existing query units, preserving - the public API. Update the generator to check markers before writing and - support a read-only `--check` mode. -17. Replace the test includes with `Oracle.Scenarios.pas` and generated case - attributes in the regular DUnitX fixture. Preserve the reference scenarios - and case attributes; add six Python tests for generator safeguards. -18. Rebuild and run the Delphi suite for Win32 and Win64, verify generated - source consistency, and update the README and validation records. - All 594 DUnitX tests pass on both platforms with zero build errors and - warnings; all six Python generator tests and both `--check` commands pass. - -Completed work packages for removing compatibility layers: - -19. Start `codex/remove-compatibility` from `origin/main` at `ced5018`. - Remove `SqlKata.pas`, the compiler facade unit, compiler object aliases, - and condition/join aliases. Import defining units throughout the library. -20. Migrate tests, RTTI attributes, examples, and the scenario generator to - direct imports. Replace facade checks with a concrete query factory test. -21. Document the required import/type migration and rerun Win32/Win64 DUnitX - validation and generator consistency checks. Preserve upstream attribution - and the C# reference program. - All 594 DUnitX tests pass on each platform after full builds with zero - errors and warnings. Both generator checks and all six Python tests pass. - -Completed work packages for query compilation: - -22. Start `codex/query-compile` from `origin/main` at `5a59ecc`, after PR #5 - was merged. Add the scoped `TSqlDialect` enum and `IQuery.Compile`, with - SQL Server as its default. Reuse the dialect compilers and their `ToString` - rendering to return a SQL preview with substituted values. Keep compiler - dependencies in implementation sections to avoid an interface cycle. -23. Add nine regression cases for defaults, all dialects, scoped projections, - pagination, repeated compilation, exceptions, inline quoting, and writes. - Document the shortcut and the separate parameterized compiler API. - All 603 DUnitX tests pass on Win32 and Win64, with no build errors or - warnings and no reported test leaks. Both generator checks pass. -24. Replace `TEngineCodes` with the central `TSqlDialect.EngineCode` mapping. - Use it in dialect constructors and generated scope helpers. Retain custom - string engine scopes and cover the mapping and custom-scoped conditions - in the existing regression cases. Update API migration guidance. - All 603 tests pass on each of Win32 and Win64 after full builds with zero - errors and warnings; both generator checks and six Python tests pass. - -Execution replaces the former optional adapter API. See README and API.md for -provider units, migration, cursor semantics, ownership and provider extension. -The previous adapter facade and command export helpers have been removed. -Parameterized compilation is available through both `IQuery.Compile` and -`ICompiler.Compile`, returning the same `ISqlResult` contract. The historical -preview shortcut described in work package 22 has been replaced: migrate -string uses to `IQuery.ToDebugSql`, for debugging/logging only. `ISqlResult` -now lives in Query.Core with its original identity; the compiler unit retains -its existing name as a type alias. - -The execution contracts are colocated with IQuery to avoid circular units. -The Fluent Execute member is outside generated sections and survives both -query generator regeneration and formatting. No generator change is needed. -The generic executor compiles a clone with a configured dialect; FireDAC -execution, binding and resource ownership are isolated in optional units. - -PR #9 review follow-up keeps this architecture. TQueryExecutor now offers a -protected virtual CreateCompiler and an optional parameter prefix; FireDAC -retains :pN and validates the compiled named/ordered binding convention. -TQueryNull/TQueryValueType carry small provider-neutral NULL hints and column -categories, including for all-NULL columns. IQueryResult has a new interface -GUID for GetColumnType. Optional TFireDACNull remains for exact driver types. -No compiler-factory hierarchy, mapper or database-specific external bridge was -introduced. Execution.ProviderExample.pas compiles without Data.DB/FireDAC. - -Decimal reads use AsBCD with FMTBcd storage preferred over Currency-backed -fields; standard timestamp records preserve fractions and timezone offsets. -Opaque Oracle timestamp/interval formats still fail explicitly. - -The subsequent SQL-scanner simplification removes ValidateSingleStatement, -all keyword/statement-count heuristics and the executor's scanner dependency. -SqlCodeMask remains solely for raw/intermediate placeholder processing; it -masks quoted text/comments without validating SQL syntax. ReturnId rejection -and execution modes still use query metadata. Public query, executor, result -and compiler interfaces, parameter conventions and FireDAC ownership do not -change. The one-resultset restriction remains the caller/provider contract. - -Structured parameter emission could eventually avoid rescanning generated -SQL, but would need to carry token positions through composed fragments, -subqueries, CTE reordering and dialect rewrites. Raw SQL would still need an -explicit placeholder convention. Retaining the existing small scanner avoids -that compiler-wide redesign and preserves current binding order and golden SQL. -See VALIDATION.md for final platform results and live-server test limits. diff --git a/docs/VALIDATION.md b/docs/VALIDATION.md deleted file mode 100644 index b9fc622..0000000 --- a/docs/VALIDATION.md +++ /dev/null @@ -1,563 +0,0 @@ -# Validation - -## v2.0.0 release validation (2026-10-31) - -The release changes documentation and website release metadata on top of -`4b87528` (main, including PR #30). Library and test sources are unchanged. - -The existing Delphi 12 Community Edition executables were rerun with -`tools/build.ps1 -Suite Core/FireDAC -Platform Both -TestsOnly`: - -| Suite | Win32 passed | Win64 passed | Failed/errors/ignored/leaked | -| --- | ---: | ---: | --- | -| Core without FireDAC | 940 | 940 | 0/0/0/0 | -| FireDAC / SQLite | 94 | 94 | 0/0/0/0 | - -These are reruns of the October 25 IDE builds, not fresh release builds. -The existing JSON validation records below describe their original feature -snapshots; they have not been relabeled as release-build evidence. -Database integration uses SQLite in memory and FireDAC memory fields; -no live validation against the other five database servers is claimed. - -Additional release checks passed: - -- All 67 JavaScript converter, numeric, state, token and smoke-fixture tests. -- Static website build and all generated local links and heading anchors. -- All 10 Playwright browser tests using installed Microsoft Edge, including - keyboard/copy behavior and layouts from 320 to 1920 pixels. -- Both generator `--check` commands (including 69 paired Oracle scenarios), - all 15 Python generator tests and the public XML documentation audit - (zero errors). -- `git diff --check`. - -Generated converter smoke projects are covered by JavaScript fixture checks. -Full native compilation/execution -of all four generated projects on both platforms remains unverified; the -local artifacts contain only a MySQL Win32 executable. - -## Previous validation: October 25, 2026 - -## SQL NULL mapping policy (issue #20) - -Both projects were built with IDE Project > Build in Delphi 12 Community Edition -(RAD Studio 23.0), Base configuration, for Win32 and Win64. Execution used -`tools/build.ps1 -Suite Core/FireDAC -Platform Win32/Win64 -TestsOnly`. -Command-line compilation is unavailable in this edition. - -The policy API uses only `NullBehavior`, with no compatibility configuration. -All previous skip tests now select `nmbSkip`, preserving constructor-value and -nullable coverage. Four diagnostic cases replace the obsolete alias-only test: -omitted/explicit default options with unsupported targets, and explicit strict -policy with supported/unsupported non-nullable targets. They also verify mapping -context and caller-owned result cleanup after errors. - -| Suite | Win32 passed | Win64 passed | Failed/errors/ignored/leaked | -| --- | ---: | ---: | --- | -| Core without FireDAC | 919 | 919 | 0/0/0/0 | -| FireDAC/SQLite and memory fields | 92 | 92 | 0/0/0/0 | - -The new policy fixture checks all supported ordinary target types through both -ToList and FirstOrDefault, including overwriting constructor values, skipping -setters, strict exceptions, omitted options, fresh options and explicit policies. -It checks automatic and explicitly registered nullable integers/strings/Booleans -against SQL NULL and non-NULL zero/empty/False under every policy, custom nullable -records and inner converters, unsupported targets/conversions, distinct policy -versus unsupported-default diagnostics, and fluent -ToList/FirstOrDefault/First/Single/ForEach object/result cleanup. -Existing strict NULL error/ownership tests now explicitly select nmbThrow; existing -converter precedence, setter/provider failures, partial lists, streaming, fallback, -concurrency and object-writing regressions remain passing. - -SQLite integration checks NULL strings/numbers and nullable values with all three -policies, non-NULL empty/zero values and provider dataset cleanup. Final logs have -no shutdown memory leak reports. Delphi formatting and `git diff --check` pass. -The integration coverage uses SQLite and memory fields; it does not establish -behavior for other database servers/drivers. Type defaults remain limited to the -mapper's existing supported ordinary types. - -## Shared attribute mapping (issue #19) - -Compiled both test projects for Win32 and Win64 in Delphi 12 Community Edition -(RAD Studio 23.0), Base configuration. Command-line compilation is unavailable -in this edition; compilation used the IDE and execution used -`tools/build.ps1 -Suite Core/FireDAC -Platform Win32/Win64 -TestsOnly`. - -| Suite | Win32 passed | Win64 passed | Failed/errors/ignored/leaked | -| --- | ---: | ---: | --- | -| Core without FireDAC | 905 | 905 | 0/0/0/0 | -| FireDAC/SQLite and memory fields | 89 | 89 | 0/0/0/0 | - -Core regressions cover shared read/write names, case-insensitive aliases, -inherited and ignored properties, key callbacks and object write operations, -duplicate names, conflicting/blank attributes, direction-specific eligibility, -validation before getters/callbacks, explicit nonpublic write property RTTI, -and exclusion of fields even with field RTTI. Existing conversion, nullable, -streaming, concurrency and ownership tests remain passing. The FireDAC suite -includes an attributed DTO insert/read/update/read round trip using differently -named physical columns and result aliases. Final test logs contain no shutdown -memory leak reports. Delphi formatting and `git diff --check` pass. - -Field support remains deferred to avoid automatically adding write columns to -existing DTOs; the property-only contract and compatibility behavior are documented -in [Object Mapping](OBJECT_MAPPING.md#shared-readwrite-attributes). SQLite and -memory-field tests do not establish other database server/driver behavior. - -## Automatic nullable mapping and result conversions (issue #16, PR #18) - -Both suites were rebuilt through IDE Project > Build, Base configuration, using -Delphi 12 Community Edition / RAD Studio 23.0 (bds.exe 29.0.51961.7529). -All four final builds completed with zero compiler warnings/errors. Community -Edition does not support command-line compilation. Tests were then run with -`tools/build.ps1 -TestsOnly`, selecting Core/FireDAC and Win32/Win64: - -| Suite | Win32 | Win64 | Failed/errors/ignored/leaked | -| --- | ---: | ---: | --- | -| Core without FireDAC | 727 | 727 | 0/0/0/0 | -| FireDAC/SQLite and memory fields | 46 | 46 | 0/0/0/0 | - -The 32 mapping-value tests include actual RTTI property assignment for all 20 -built-in nullable inner types without registration, SQL NULL versus zero/False/ -empty strings/empty byte arrays, signed/unsigned boundaries, managed lifetime, -exact numeric precision and overflow rejection, BCD/GUID/timestamp records, -custom nullable types, exact converter precedence, explicit built-in registration, -duplicate/nil registration errors, scoped nmbSkip, contextual converter -failures and object cleanup. A compatibility regression first failed with 42 -instead of 242 when an exact converter returned a complete nullable record; -the final dispatcher preserves that converter ahead of default construction, -while explicit nullable registrations still take precedence. SQL NULL never -reaches ordinary converters. The minimum Currency regression constructs exactly --922337203685477.5808 with typed Currency subtraction and verifies the BCD and -Currency round trip on both platforms. No Currency conversion bug was found. - -The alias regression compares inner and closed-generic RTTI identities for -Double/Extended and Double/TDateTime on each target, then maps each specialization. -Concurrent mapping runs 128 iterations through automatic integer/string/byte-array -property assignments. The built-in registry is published once by unit initialization, -is read-only during mapping and does not capture caller-owned options. - -Fluent tests exercise ToList and FirstOrDefault without options, immediate facade -release, independently retained facade/raw references, managed values after result -destruction and ownership on failure. All existing PR #14 result-lifetime tests pass. -SQLite integration runs both terminal methods on nullable DTOs without registrations; -native BCD/timestamp/offset FireDAC field-reader regressions also pass. - -Both generator checks (including 69 paired reference scenarios), eight Python -generator tests, Delphi formatting and `git diff --check` pass. The -[validation record](nullable-mapping-validation.json) contains the final source, -executable and report hashes with verified x86/x64 PE architectures. It replaces -the earlier explicit-registration snapshot. Test logs contain no shutdown memory -leak reports. The initial standalone generic-RTTI probes remain covered by the -permanent `ClosedGenericPropertyRTTI` test. - -Limitations: no separate Delphi 12.3+ compiler installation was tested. SQLite -and FireDAC memory fields do not prove SQL Server/Oracle server or driver behavior; -no such servers were available. Public APIs, nullable layout, SQL compilation, -providers and attribute behavior are unchanged by the automatic-registry update. - -## Deterministic fluent result lifetime - -All four projects were rebuilt using Delphi 12 Community Edition, RAD Studio -23.0, bds.exe 29.0.51961.7529, IDE Project > Build, Base configuration. All -builds had zero warnings/errors. The resulting executables passed: - -| Suite | Win32 | Win64 | Failed/errors/ignored/leaked | -| --- | ---: | ---: | --- | -| Core without FireDAC | 695 | 695 | 0/0/0/0 | -| FireDAC/SQLite in-memory | 44 | 44 | 0/0/0/0 | - -Before implementation, a separate compiled generic record-helper probe on -both targets verified transferring a facade's interface through `TakeRaw`, -clearing its field, and releasing the local in `finally`. Destructor counts -reached zero immediately after a temporary expression, on success and mapping -failure, in the same routine. Named receivers were emptied, copied records -survived, and the last independently retained interface controlled destruction. -The implementation uses only normal managed interface assignments. - -The core regression tests now measure result destruction before the calling -routine exits, including NULL/type failures for both mapping methods, empty -results and anonymous-method calls. Three additional cases check consuming -copies/raw references, shared mapping failure and a single-row first result. -Existing ownership counters also verify independent mapped-object lifetime. -Static mapping, reader operations, implicit conversion and AsRaw remain covered. - -Three additional SQLite cases verify consecutive fluent SELECTs, early first -mapping with one/multiple/no rows, deliberately shared results with 120 rows -across fetch boundaries, and cached row/NULL/metadata access after FetchAll -with AutoClose enabled. DataSetCount proves provider query destruction in the -calling scope, including mapping exceptions. The connection remains open. -AutoClose is supplementary: early release still frees the result-owned TFDQuery. - -Only the installed Delphi compiler above was available; a separate Delphi 12.3 -or newer compiler was not independently tested. Both generator checks, all eight -Python tests and git diff --check pass. The JSON reports record executable -hashes and verified x86/x64 PE headers for these runs. - -## Previous validation: October 23, 2026 - -## Fluent object mapping facade - -The facade/helper change was rebuilt through IDE Project > Build in Delphi 12 -Community Edition, RAD Studio 23.0 (bds.exe file version 29.0.51961.7529), -Base configuration, for Win32 and Win64. All four builds completed without -warnings/errors. Command-line compilation is disabled by this edition; the -rebuilt executables were run with `tools/build.ps1 -TestsOnly`. - -| Suite | Platform | Tests | Passed | Failed/errors/ignored | Test leaks | -| --- | --- | ---: | ---: | --- | ---: | -| Core (no FireDAC) | Win32 | 692 | 692 | 0/0/0 | 0 | -| Core (no FireDAC) | Win64 | 692 | 692 | 0/0/0 | 0 | -| FireDAC/SQLite | Win32 | 41 | 41 | 0/0/0 | 0 | -| FireDAC/SQLite | Win64 | 41 | 41 | 0/0/0 | 0 | - -The 17 additional core cases in FluentMapping.Tests check fluent temporary -expressions, lists/single objects and ownership, empty results, multiple rows, -aliases/attributes/ignored fields/partial projections, shared cursor position, -record assignment and clearing, independent AsRaw lifetime, implicit conversion, -static mapper compatibility, reader metadata/values/errors, SQL NULL and invalid -conversion cleanup for both methods, setter exception class preservation, -command rejection, empty facades and anonymous-method calls. Mock result lifetime -and mapped-object constructor/destructor counts verify cleanup. - -The existing SQLite mapping example now uses fluent calls. The same acceptance -query (`Id`, `Title AS BookTitle`, OrderBy, Execute, ToList) runs on SQLite and -asserts every mapped value. The compiled README/EXAMPLES LoadPublishedBooks -function verifies the IsPublished filter too. The new integration case checks -record/raw lifetime, empty lists, command/NULL/conversion errors and that no -provider query remains registered after mapping scopes exit. Existing execution, -static mapping, custom provider and compiler regressions remain in the suites. - -Compiler verification covers generic methods on a record helper, direct fluent -temporary calls, implicit conversion in assignments/const arguments/returned -values, default records and anonymous methods on both targets. DUnitX's -overloaded WillRaise calls use explicit TTestLocalMethod casts; list Count -assertions use NativeInt for Win64. Expression temporaries may remain alive -until routine exit: cleanup checks deliberately measure after that scope. -Mapped lists/objects remain valid after loading functions return. - -Only the installed compiler build above was available. No separate Delphi 12.3 -or newer compiler was run; compatibility with those exact compiler versions is -not claimed as independently verified. The source targets Delphi 12+. - -Both generator checks and all eight Python generator regression tests pass. -Changed Pascal files were formatted, and git diff --check passes. The current -JSON reports include successful case counts, executable hashes and verified -x86/x64 PE architecture. The core project compiles without FireDAC units. - -## Core object mapping - -The object mapping change was built in Delphi 12 Community Edition (RAD Studio -23.0), using IDE Project > Build, Base configuration, on Win32 and Win64. All -four builds completed with zero warnings/errors. The command-line build was -attempted and rejected by the Community Edition license; the actual rebuilt -executables were run through `tools/build.ps1 -TestsOnly`. - -| Suite | Platform | Tests | Passed | Failed/errors/ignored | Test leaks | -| --- | --- | ---: | ---: | --- | ---: | -| Core | Win32 | 675 | 675 | 0/0/0 | 0 | -| Core | Win64 | 675 | 675 | 0/0/0 | 0 | -| FireDAC/SQLite | Win32 | 40 | 40 | 0/0/0 | 0 | -| FireDAC/SQLite | Win64 | 40 | 40 | 0/0/0 | 0 | - -The existing 632 core and 39 integration cases pass. Forty-three provider-free -mapping cases check actual scalar values, public/published RTTI, attributes, -aliases, partial projections, ignored/extra columns, repeated/reordered schemas, -ambiguity, SQL NULL versus typed empty bytes, checked conversions, missing RTTI, -setter exception preservation, first/empty/cursor behavior and object ownership. -Destructor counts verify cleanup after a failure on row three and a failed -FirstOrDefault. A 64-iteration parallel mapping case exercises shared metadata -and different schemas. Instrumented mock counters verify column names are read -once per result and no per-row name lookup occurs. The mock's lifetime counter -uses interlocked updates for the concurrency case. Both executable shutdown -reports were also checked: no unexpected RTL memory leaks were reported. - -The PR #13 review adds 23 cases covering incompatible and zero-column schemas, -including empty results for both mapper methods; duplicate explicit/implicit -mapping names; multiple column attributes; inherited writable properties; -ignored collisions; classes with only ignored/read-only properties; alias-only -matching; and successful reuse of cached metadata after schema validation fails. -The prior unmapped-duplicates test now includes one matching column, preserving -its original extra-column check under the new minimum-one-match requirement. -Constructor/destructor counts and result reads verify that validation failures -occur before construction and cursor advancement. Existing row-three failure -and single-object cleanup regressions continue to pass. Metadata errors include -the available schema, and duplicate mapping names are rejected before caching. - -The additional SQLite case executes the compiled examples in MappingExamples.pas -through IQueryExecutor and IQuery.Execute, checking list values, aliases, -reordered columns, single/empty results and rejection of SQL NULL. It runs -against SQLite :memory: using the existing optional FireDAC provider. - -The JSON reports record current executable hashes and verified x86/x64 PE -headers. Both generator checks and all eight Python generator regression tests -pass. Delphi Formatter was applied to changed Pascal files; git diff --check -passes. Query.Core, Query.DataMapper, Execution, SQL compilers and provider -implementations are unchanged. The mapper has no FireDAC, ADO or Data.DB imports. - -SQL NULL, nullable types, binary/record/object mapping and advanced conversions -remain unsupported as documented in [Object Mapping](OBJECT_MAPPING.md). -Allocation failures and runtime package unloading were not exercised; mapped -classes must remain loaded while their cached RTTI is in use. - -## Earlier compiler-factory validation - -Compiler-factory class update (issue #10), based on merged documentation main. Earlier -test counts and binary hashes are superseded by the object mapping run above. - -Delphi 12 Community Edition (RAD Studio 23.0), Windows. Command-line compilation -was attempted with tools/build.ps1 and rejected by the installed Community -Edition license. Full builds were therefore performed with IDE Project > Build -(Base configuration). Test executables were run with tools/build.ps1 -TestsOnly. - -| Suite | Platform | Tests | Passed | Failed/errors/ignored | Test leaks | -| --- | --- | ---: | ---: | --- | ---: | -| Core | Win32 | 632 | 632 | 0 | 0 | -| Core | Win64 | 632 | 632 | 0 | 0 | -| FireDAC | Win32 | 39 | 39 | 0 | 0 | -| FireDAC | Win64 | 39 | 39 | 0 | 0 | - -All four full builds reported zero errors, warnings and hints. -The six FactoryCreatesRequestedClass cases now exercise -TQueryCompilerFactory.CreateCompiler for each dialect. Two added cases verify -the default SQL Server compiler and EQueryException for an unsupported dialect. -The static class method replaces the free function; all library/test callers -and README/API/examples use it. Executor CreateCompiler overrides remain intact. -Existing SQL, parameter-prefix, ordered-binding and custom-compiler tests pass. -ReportMemoryLeaksOnShutdown is enabled in both projects. Resource tests also -check the connection's dataset count after failed commands and early release. -The JSON reports record executable hashes and verified x86/x64 PE headers. - -The 603 existing core tests remain unchanged. Nineteen provider-free execution -tests verify delegation, custom compiler creation and parameter prefixes, -parameter ordering across all six dialects, cloning, method-based modes, -nil arguments and ReturnId rejection. A reusable in-memory mock verifies -sequential cursors, metadata (including entirely NULL columns), index/name -access, duplicate names, NULL versus empty binary values, RowsAffected and -independent executor/result lifetimes. The external-provider example is -compiled in the core project. No FireDAC or Data.DB units are linked into it. - -The 39 optional cases use statically linked SQLite :memory: or native field -fixtures and exercise -SELECT (including empty results, WHERE and CTE), INSERT/UPDATE/DELETE and -RowsAffected, repeated queries and simultaneous cursors, metadata/index/name -errors, duplicate column access by index, NULL, Unicode, Boolean, dates, -large integers and binary data. Binding tests cover all six dialects, Currency, -float, UInt64 precision, GUID, BCD, scalar Variant and typed/untyped NULL. -Further tests cover invalid SQL, unsupported values/Variant arrays, explicit -modes, disconnected/nil arguments, early release, executor lifetime and rollback -of a caller-owned transaction. The documented PrintBooks/ChangeBook examples -are compiled in test/ExecutionExamples.pas as part of the optional project. -Review-follow-up regressions cover five exact BCD values (including -123456789.12345678, negatives, very large decimals and leading/trailing zeros), -FMTBcd memory-table storage, rejection of an unsafe Currency-backed BCD schema, -native timestamp/offset fractions, Single/Extended and Oracle CLOB accessors. -Decimal and timestamp precision checks use controlled field accessors and -TFDMemTable, not SQLite numeric storage as a precision oracle. Additional cases -cover portable typed NULL hints, all-NULL field metadata, empty strings/blobs -versus NULL, compiler/provider parameter mismatch, quoted question marks, -CTE/subquery bindings and explicit emRows for DML RETURNING. Failure cases -verify cleanup after binding, SQL execution and mode errors; result creation -ownership was also checked by code inspection. Allocation failures were not -injected. -Actual server-specific execution for MSSql/MySQL/PostgreSQL/Oracle/Firebird -was not tested; their existing compilation regressions and binding cases run. -Multiple resultsets and ReturnId batches are outside this version's contract. - -The SQL-scanner simplification removes the core and SQLite batch-rejection -cases. Compiler SQL passthrough (EXEC with an explicit command mode) and raw -parameter regressions replace the former empty-output/statement-boundary -checks. The raw cases verify doubled quotes, quoted identifiers, nested block -and line comments, PostgreSQL dollar/E strings, Oracle q strings, MySQL -backslash quoting, explicitly escaped question-mark operators and exact :pN -SQL/named/ordered bindings. Incomplete text is no longer syntax-validated by -the scanner. The 603 prior core regressions and existing SELECT/DML integration -cases remain. Public contracts and parameter conventions are unchanged; -syntax and statement-count heuristics are deliberately absent from execution. - -The IsNull(Name) addition has one new case per suite plus duplicate-name -checks in the existing cases. Both providers compare index/name NULL checks -for NULL and non-NULL Title values, mixed-case names, missing-column exception -messages and cursor access before/after iteration. The mock checks identical -GetValue/IsNull ambiguity errors. FireDAC may disambiguate duplicate aliases into distinct field names; its -integration test checks index/name agreement for resolved names, or matching -ambiguity errors when duplicate names are preserved. The compiled PrintBooks example uses IsNull('Title'). -No shared result base class or new dependencies were introduced. - -Documentation/example verification adds eight core cases: 31 query variants -compile for each of the six dialects (six cases), and a separate case verifies -the exact SQL Server/Oracle SQL, preview output, configurable parameter prefix -and UPDATE value ordering displayed in EXAMPLES.md. The functions and compiler -walkthrough in test/DocumentationExamples.pas are called by those tests. -The eighth core case reads seven selected MSSQL SQL blocks and their ordered -ordered text binding lists from EXAMPLES.md and compares them directly with current -compiler output using the executor-style :p prefix. Only presentation whitespace -is ignored. It covers both JOIN variants, aggregation/HAVING, IN and EXISTS -subqueries, a CTE and offset pagination. The README retains the direct compiler -default @p convention. The formatting follow-up preserved the original Delphi example tokens. This -factory update changes only factory references in those examples. Core and -FireDAC were both rebuilt and rerun on Win32/Win64 for issue #10. - -One additional SQLite case runs PrintBooks, INSERT/UPDATE/DELETE inside a -caller-started transaction, rollback, the transaction-owning wrapper and the -missing-transaction error. It verifies DELETE RowsAffected and leaves the -connection open. The generic external adapter example compiles in core; no -actual external database adapter is implemented or executed. - -A Delphi-token comparison verified that all 36 complete function, procedure -and unit blocks in EXAMPLES.md match the compiled example sources. -The README's short quick starts use the same tested query/reader operations; -they were syntax/API-reviewed rather than compiled as separate programs. -All 30 local Markdown links/anchors in the five Markdown documents were -checked. The sole external API reference link was opened successfully. -README/API/examples contain no template-origin comparisons or old adapter API. -LICENSE, reference data, and internal PORTING.md provenance are unchanged. -The source changes for issue #10 are limited to the factory class and its callers. - -Both generator checks pass (including 69 paired Oracle scenario definitions). -All eight Python generator regression tests pass with TMP/TEMP set to -build/python-temp. This avoids sandbox cleanup restrictions on the system -temp directory encountered during earlier execution-layer validation. -Delphi Formatter.exe was applied to source/test Pascal files. Execute is outside -the generated sections and both generator checks retain it unchanged. A second -formatter pass was byte-for-byte idempotent across all 31 immediate Pascal -source/test files. git diff --check passed. Source/documentation searches found -no remaining references to the removed adapter symbol; the core source has no -FireDAC or Data.DB dependencies. Untracked IDE history files were excluded. - -Commands used after the IDE builds: - -```powershell -./tools/build.ps1 -Suite Core -Platform Both -TestsOnly -./tools/build.ps1 -Suite FireDAC -Platform Both -TestsOnly -python tools/generate_query.py --check -python tools/generate_oracle.py --check -python -m unittest discover -s tools -p 'test_*.py' -python tools/record_validation.py --suite Core --date 2026-10-23 -python tools/record_validation.py --suite FireDAC --date 2026-10-23 -``` - -Python commands used the bundled Python runtime because the system python.exe -is an unavailable Windows Store alias. - -The reference golden SQL remains unchanged: local SqlKata source commit -`df4a2377750d34fc057c81886b481e7309ef975e`, 552 reference results, 540 direct -comparisons and 12 corrected behavior cases. The C# oracle was not regenerated -in this documentation task. - -## Mapping API, streaming and performance (issue #17) - -On 2026-10-24 the core and FireDAC projects were rebuilt through Delphi 12 -Community Edition's Project / Build command, Base configuration, for both Win32 -and Win64. Fresh native executables passed 754/754 core cases and 48/48 FireDAC -SQLite cases on each platform, with zero failed, errored, ignored or leaked -cases. The validation JSON files contain the executable hashes and verified PE -architectures. Existing execution, six-dialect compiler, nullable/native-value -and fluent mapper tests remain included. - -The new core fixture adds 27 cases: cardinality and exact Next call counts, -MapCurrent before/on/after a row, returned and borrowed ownership, streaming -empty/one/many rows, callback/mapping/Next failures, preservation of callback -exception identity, short-circuiting before invalid later rows, cold concurrent -mappings of two different DTO classes, changing schemas, copied managed values, -nullable BCD/Currency and scoped converters. Existing concurrent metadata/schema -and advanced scalar/nullable suites provide additional regression coverage. -Two integration cases cover the new methods against a real FireDAC cursor and -execute every routine in MappingApiExamples.pas against an in-memory SQLite -schema, including partial projection and a LEFT JOIN with a missing author. - -All seven new documentation routines were compared with their compiled source -(whitespace ignored). The two generator checks pass, including 69 paired Oracle -scenarios, and all eight Python generator regression tests pass. Formatter.exe -was applied to Pascal sources; git diff --check passes. - -The initial BCD test literal was corrected to use invariant format settings. -The documentation schema declares Price as DECIMAL(18,4), because this SQLite -FireDAC configuration infers bare NUMERIC as Int64. The mapper's supported -conversions and null policies were not relaxed to accommodate driver inference. - -[Performance methodology, medians, ranges and limitations](MAPPING_PERFORMANCE.md) -include optimized Win32/Win64 measurements at 100, 10,000 and 100,000 rows, -ToList versus ForEach, cold versus warm metadata, live heap samples and exact -peak DTO counts. Each platform records 108 validated observations in committed -CSV files. Timings are local observations rather than acceptance thresholds; -heap samples do not include the mock input or constitute OS memory peaks. - -## Fluent mapper completion (PR #21) - -The helper now exposes First, Single, SingleOrDefault and ForEach alongside its -unchanged ToList and FirstOrDefault implementations. Every new method delegates -to the existing static mapper after TakeRaw and clears the transferred interface -in finally. No static mapping/conversion, provider, cursor, Execute or SQL -compiler implementation changed. MapCurrent remains static. - -Fresh Delphi 12 Community Edition Base builds and complete DUnitX runs passed: - -| Suite | Win32 | Win64 | -| --- | ---: | ---: | -| Core | 822/822 | 822/822 | -| FireDAC / SQLite in memory | 62/62 | 62/62 | - -Every run reports zero failed, errored, ignored and leaked cases, with no -shutdown memory-leak report. The validation JSON files record PE architecture -checks and executable SHA-256 hashes. Both builds completed without compiler -warnings. There are 68 new core cases in FluentMapping.Operations.Tests.pas and -14 new FireDAC cases, plus the existing documentation integration case now runs -nine fluent example routines. - -Coverage includes temporary results with zero/one/multiple rows; exact Next call -counts; returned objects surviving result destruction; borrowed objects freed -between callbacks and on failure; immediate caller-scope resource release; -schema, NULL, conversion, setter, custom-converter, provider Next and callback -exceptions; consumed named facades; retained raw interfaces and copied facades; -nullable values, nmbSkip and custom mapping options. SQLite checks -DataSetCount immediately after terminal calls, including callback failures, and -confirms that shared readers remain usable. Single variants detect multiple rows -without SQL limits. - -Anonymous test callbacks avoid capturing the facade being assigned a query -result: Delphi may otherwise retain a separate managed expression temporary in -the callback's activation record. The nullable test explicitly clears its local -anonymous check procedure to break a test-only reference cycle. Direct terminal -mapping itself releases its transferred result reference deterministically. - -All nine example routines in EXAMPLES.md match MappingApiExamples.pas after -ignoring presentation whitespace and execute in the SQLite integration suite. -README, OBJECT_MAPPING, API and EXAMPLES now prefer fluent terminal calls while -retaining the static API for advanced cursor control. Existing benchmark CSVs -remain the historical static-engine measurements at commit 279b0da; this -follow-up does not change that engine or claim new performance measurements. - -Both generator checks pass (including 69 paired Oracle scenarios), all eight -Python generator tests pass, local Markdown file links resolve, and -`git diff --check` passes. Formatter.exe was applied to Pascal files. - -## Nullable object writing (issue #23, 2026-10-25) - -Built from main `1006353` (including merged issue #20) with Delphi 12 Community -Edition, using Project > Build in the IDE and `tools/build.ps1 -TestsOnly` to -run each executable. The Community Edition command-line compiler refuses builds. - -| Suite | Win32 | Win64 | -| --- | ---: | ---: | -| Core | 925 passed | 925 passed | -| FireDAC / SQLite | 94 passed | 94 passed | - -All four runs report zero failed, errored, ignored and leaked cases. PE machine -headers verify the architectures; executable, report and changed source hashes -are recorded in [nullable-writing-validation.json](nullable-writing-validation.json). - -The new Core fixture checks every built-in nullable specialization for exact -inner TValue identity and typed NULL hints through INSERT, UPDATE, WHERE and -HAVING; zero, False, empty strings and empty bytes; key predicate order and -rejection of NULL composite-key members before query mutation; inherited, -column-mapped and ignored properties; retained strings/bytes after DTO destruction; -scoped custom registrations/converter ordering, getter/converter/callback errors; -and NULL predicates and binding order for all six SQL dialects. Existing mapping, -NULL policy, metadata and write regressions also pass. - -SQLite integration exercises the same DTO through INSERT, SELECT, UPDATE and -SELECT again, including 0, empty text, empty/populated binary and NULL states. -FireDAC parameter tests check exact BCD, GUID, timestamp fractions, timezone offset, -Boolean and empty-value bindings. Native timestamp binding was added through -FireDAC's existing typed accessors. No live SQL Server/Oracle roundtrip is claimed; -SQLite cannot establish server decimal/timestamp precision or timezone behavior. -Read-side NullBehavior and the shared attribute resolver remain unchanged. diff --git a/docs/WEBSITE.md b/docs/WEBSITE.md index ef2f8b8..7c3b531 100644 --- a/docs/WEBSITE.md +++ b/docs/WEBSITE.md @@ -1,7 +1,7 @@ # Documentation website and SQL converter The website is a static GitHub Pages application. **Documentation stays in -`README.md`, `CHANGELOG.md`, and `docs/*.md`.** The build reads these files +`README.md`, `CHANGELOG.md`, `CONTRIBUTING.md` and `docs/*.md`.** The build reads these files directly; do not copy their contents into website templates. Every Markdown file immediately inside `docs/` becomes a page. Add navigation entries in `website/build.mjs` when introducing a new guide. diff --git a/docs/XML_DOCUMENTATION.md b/docs/XML_DOCUMENTATION.md deleted file mode 100644 index 97537cc..0000000 --- a/docs/XML_DOCUMENTATION.md +++ /dev/null @@ -1,195 +0,0 @@ -# Public API XML documentation audit - -The audit for issue #27 starts at `27b7a45` on `main`, including merged PRs #26 -and #28. Every production unit under `src/` was inspected, including the -implementation and relevant existing tests for its exported contracts. - -## Coverage checklist - -All entries below have XML documentation. Counts include overloaded declarations -separately and include the concrete implementation declarations as well as their -interfaces. Grouped field declarations count as one declaration. - -| Production unit (`QueryBuilder4Delphi.` prefix) | Public surface reviewed | -| --- | --- | -| Query.Core | IQuery and every overload; SQL/result/executor interfaces; result facade; 4 enums and all 46 values; typed NULL; literals/variables; attributes; exceptions; aliases; clause model; value helpers and global functions | -| Query | TQuery factory; TQueryObject constructor/destructor, complete fluent implementation declarations, properties, compilation and execution | -| Query.Writes | All 10 exported write/aggregate helpers, including positional, pair, multirow and subquery overloads | -| Query.DataMapper | Object property extraction, key callbacks, nullable conversion and ownership | -| Compilers.Compiler | ICompiler and TCompiler public methods/settings; ISqlResult alias; TSqlResult fields/lifetime; TCompileContext and variable lookup | -| Compilers.Factory | Factory and dialect selection | -| Compilers.SqlServerCompiler | Class, public Boolean/random overrides and inherited factory contract | -| Compilers.MySqlCompiler | Class, public random override and inherited factory contract | -| Compilers.PostgresCompiler | Class and inherited factory/public API contract | -| Compilers.SqliteCompiler | Class, public Boolean overrides and inherited factory contract | -| Compilers.OracleCompiler | Class, public random override and inherited factory contract | -| Compilers.FirebirdCompiler | Class, public Boolean/random/identifier overrides and inherited factory contract | -| Execution | Base executor, constructor, execution mode, dialect and parameter prefix | -| Mapping | Mapper and result helper, every generic terminal, options, converter registration, exception alias, NULL policy and all 3 values | -| Mapping.Metadata | Exception, property metadata fields and global metadata function | -| Nullable | Exception, generic record, construction, Null and properties | -| Providers.FireDAC | Executor, borrowed connection/transaction ownership and first-result limitation | -| Providers.FireDAC.Parameters | Typed NULL fields/conversion and parameter binder, names, supported values and ownership | -| Providers.FireDAC.Values | Field reader, metadata categories, binary copying and decimal limitations | -| Sql.Lexer | Exported parameter mask function, offsets and scanning limits | - -Consumer entry points are the query/result interfaces and factories, mapper, -nullable values, attributes, compiler contracts and optional executor. Exported -clause operations, compile contexts, metadata, scanner, write helpers and field/ -binding helpers are also documented, but identified as low-level APIs where -appropriate. There are no exported constants or set types in this revision. - -Deliberate exclusions are private/protected implementation members and types, -implementation-section declarations, and inherited RTL methods that the library -does not redeclare. Forward interface references are not counted as separate -definitions. Thirty-nine trivial public property accessors use the documented -property as their contract instead of repeating its text. No supported public -operation is deferred. - -## Documentation conventions - -Comments use `///` immediately before the declaration, with `summary`, named -`param`, `returns`, and selective `remarks`/`exception cref` elements. XML-special -characters, including generic angle brackets, are escaped. Comments wrap at -110 columns without reformatting declarations or implementation code. - -The conventions follow Embarcadero's Delphi 12 documentation for -[XML Documentation Comments](https://docwiki.embarcadero.com/RADStudio/Athens/en/XML_Documentation_Comments) -and its guidance to place comments immediately before the -[documented symbol](https://docwiki.embarcadero.com/RADStudio/Sydney/en/Delphi_Comments). -No C#-specific `typeparam`, `inheritdoc`, `value`, or Markdown formatting is used. - -Each enumeration value has its own preceding XML summary. The enum type summary -also describes every value, providing a fallback when an IDE displays the type -documentation rather than the individual member documentation. This does not -change enum names, order, values or scoped-enum directives. - -Methods describe fluent mutation, cloning, callback identity, SQL construction -versus execution, parameterized output versus sensitive diagnostic previews, -NULL policies, cursor positioning, and ownership where applicable. Provider -contracts distinguish portable expectations from concrete FireDAC behavior. -Exception comments describe verified failure paths; they are not exhaustive -lists of exceptions the RTL, application callbacks, drivers or setters may raise. - -## Regeneration and repeatable audit - -`tools/query_documentation.py` is the documentation source of truth for the -fluent declarations generated by `tools/generate_query.py` into both Query.Core -and Query. The generator emits comments on declarations only. Handwritten -documentation stays beside its declarations. Existing implementation layout is -preserved, and generator checks still compare all tokens, including comments. - -Run from the repository root: - -```text -python tools/check_xml_documentation.py -python tools/generate_query.py --check -python tools/generate_oracle.py --check -python -m unittest discover -s tools -p "test_*.py" -git diff --check -``` - -The coverage checker reports every unit, parses each documentation block as XML, -checks the supported tag set, compares parameter names/order with each method -signature, requires return documentation, checks all enum values, and rejects -duplicate exception cref entries. It scans -the declaration forms used in this repository; it is not a general Delphi -parser or proof of semantic correctness. Manual comparison against implementation -and tests remains necessary. - -An independent comparison against the base revision verified identical non-XML -Pascal tokens and byte-for-byte equivalent implementation text in all 20 units. -Enum layout and XML comments are the only production-source differences. - -## Existing behavior noted during review - -These limitations were documented without changing behavior: - -- Query comments are stored and cloned, but built-in compilers do not emit them. -- Firebird WrapValue uppercases the entire quoted identifier; it does not - preserve mixed-case identifiers supplied with explicit quotes. -- Pending Not is ignored by raw predicate compilation; callers must include the - required NOT in their trusted SQL fragment. -- Object UPDATE key validation rejects TQueryNull (including converted empty - nullables); it is not a general SQL NULL check for arbitrary Variant values. - -## Verification results - -Both Core and FireDAC projects were rebuilt through Project > Build in Delphi 12 -Community Edition (RAD Studio 23.0), Base configuration, for Win32 and Win64. -Community Edition rejects command-line compilation, so the existing build script -was used with `-TestsOnly` after the IDE builds. - -| Suite | Win32 passed | Win64 passed | Failed / errors / ignored / leaked | -| --- | ---: | ---: | --- | -| Core | 940 | 940 | 0 / 0 / 0 / 0 | -| FireDAC / SQLite and memory fields | 94 | 94 | 0 / 0 / 0 / 0 | - -Both generator consistency checks pass (69 paired oracle scenarios); all 15 -generator regression tests pass, including seven focused documentation tests. The documentation coverage/XML audit -and `git diff --check` pass. Tests and project files remain unchanged. - -Delphi Help Insight was actually inspected on the generic -`TQueryResultMappingHelper.ToList` call in -`test/NullableMappingExamples.pas`. The IDE rendered the summary, Options -parameter, escaped generic return type, and ownership/cursor remarks correctly. -This is a representative check, not verification of every declaration. - -An earlier attempt to inspect an enum member was interrupted when the IDE window -became unavailable. Member-specific enum rendering and exhaustive overload -rendering have not been confirmed. Type-level summaries include all enum values -as a fallback. SQLite and memory-field integration tests do not establish runtime -behavior for other database servers or FireDAC drivers. - -## PR #29 clarity review - -The follow-up review compared generated and handwritten comments with their -implementations across the entire coverage checklist. Templates are now grouped -by behavior rather than sharing a general parameter dictionary. In particular: - -- Select, GroupBy, OrderBy and OrderByDesc explain the concrete - `Books.{Id, Title}` expansion. Only Select mentions select aliases. - ExpandExpression documents the first marker, final brace, comma splitting, - trimming and lack of identifier validation. -- Aggregate arguments are stored as supplied. Standalone aggregates expand - shorthand only through the DISTINCT rewrite; their clone removes LIMIT, - ORDER BY and GROUP BY but retains OFFSET. Aggregate filters use WHERE only. -- Predicate overloads distinguish values, groups, scalar subqueries and value - lists, including equality shortcuts and empty IN/NOT IN lists. -- Raw overloads distinguish supplied bindings from an empty binding list. - Raw set operations require the caller's operation keyword. The literal - question-mark escape remains in executable SQL; debug formatting removes it. -- JOIN, CTE, write, result-access and compiler arguments describe their own - overloads. Converter registration names the specific duplicate registration. - SelectAggregate accepts trusted function text without validating it. -- Repeated callback/cloning statements and getter summaries were shortened, - while ownership, cursor progression, NULL policies and failure conditions - remain documented. A single exception tag combines all conditions for each - exception class. Core/query/mapping/compiler comments contain about 4,000 - fewer whitespace-separated words than the initial documentation revision. - -Generation preserves declaration layout when only XML comments change, as well -as preserving implementation layout. Focused regressions cover shorthand scope, -argument relevance, overload distinctions, empty collections, optional filters, -raw placeholders/keywords, exception consolidation, XML escaping, and repeated -generation without layout changes. The final audit reports zero errors and all -20 production units still have identical non-XML tokens and implementation text -compared with main. - -Core Win32 and Win64 were rebuilt successfully in the Delphi 12 IDE during this -review, with zero compiler errors/warnings/hints; 940 tests passed on each. -Subsequent edits only polished comments; the token/implementation comparison -was repeated after those edits. FireDAC's existing Win32 and Win64 executables -were rerun, with 94 tests passing on each and no failures, errors, ignored tests -or leaks. These are the executables built during the initial PR validation, -not fresh FireDAC builds for this follow-up. - -Additional Help Insight checks for an enum value, Where, Select and Compile -could not be completed: the IDE window disappeared while navigating to the -examples (`foreground window did not report a process id`), and recovery -reported `launched app did not expose a targetable window`. A subsequent -[documented IDE AutoBuild](https://docwiki.embarcadero.com/RADStudio/Athens/en/IDE_Command_Line_Switches_and_Options) -attempt produced neither a fresh FireDAC executable nor an error report. -No new rendering verification is claimed. The earlier generic mapping-method -inspection remains the only successful Help Insight check; enum-member, -overload, shorthand and Compile rendering remain unconfirmed. diff --git a/docs/firedac-validation-results.json b/docs/firedac-validation-results.json deleted file mode 100644 index 87bb25b..0000000 --- a/docs/firedac-validation-results.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "date": "2026-10-24", - "compiler": "Delphi 12 Community Edition, RAD Studio 23.0", - "buildMethod": "IDE: Project / Build, Base configuration, zero warnings", - "results": [ - { - "platform": "Win32", - "peMachine": "0x14c", - "tests": 88, - "passed": 88, - "failed": 0, - "errors": 0, - "ignored": 0, - "executableSha256": "ca75e80170beef3ab8bda83a942b6df1d7712b415fdae930a73d4d7ec509b2f4" - }, - { - "platform": "Win64", - "peMachine": "0x8664", - "tests": 88, - "passed": 88, - "failed": 0, - "errors": 0, - "ignored": 0, - "executableSha256": "a9330d2f07db525188e7423d757c3e0b2177312ac052407541203f70e2a7b3ef" - } - ], - "integrationDatabase": "SQLite :memory:, statically linked FireDAC driver" -} diff --git a/docs/nullable-mapping-validation.json b/docs/nullable-mapping-validation.json deleted file mode 100644 index cbfbcee..0000000 --- a/docs/nullable-mapping-validation.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "date": "2026-10-24", - "issue": 16, - "compiler": "Delphi 12 Community Edition, RAD Studio 23.0, bds.exe 29.0.51961.7529", - "buildMethod": "IDE Project > Build, Base configuration; zero compiler warnings/errors", - "baseCommit": "d09f04a", - "limitations": [ - "No separate Delphi 12.3+ compiler tested", - "No SQL Server or Oracle server integration; SQLite and FireDAC memory fields only" - ], - "genericRttiProbe": [ - "Win32: passed before mapper registration implementation", - "Win64: passed before mapper registration implementation" - ], - "results": [ - { - "suite": "Core", - "platform": "Win32", - "peMachine": "0x14c", - "passed": 727, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "0f732e48f38b55bbd7f335e906be2c11dbcae39fa0eaae09ecd874096e65c3d1", - "reportSha256": "b7f7b02e508a26ec28dfb6bc57fab58500d1c6c6f515f57f14e17d2e53953cd7" - }, - { - "suite": "Core", - "platform": "Win64", - "peMachine": "0x8664", - "passed": 727, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "e180566b784ab79ac88c805b566914b2aff3f0a78461f1ab69b628e0c92e29f3", - "reportSha256": "649817afcbfcd88561b5704656f5dcbf67c87363e71fa53c70fcf4d5437e73a2" - }, - { - "suite": "FireDAC", - "platform": "Win32", - "peMachine": "0x14c", - "passed": 46, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "937e91b789134ee29185bf0c9f20df72d24b7f84095e3cc5bc9053f692054c69", - "reportSha256": "01a120174121d205c004adab2eb59ff8ba648dd064905fc2167c7f5f7bde460f" - }, - { - "suite": "FireDAC", - "platform": "Win64", - "peMachine": "0x8664", - "passed": 46, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "e5a62c7849c79d7ee7d5221df32ffa804ab37035e3609c0fa5230e49ab8b8b76", - "reportSha256": "6ff0a05769b804e6491936e858cc80189eb0f63b0c7dae0e18beccc6d7cf635a" - } - ], - "testedSourceSha256": { - "src/QueryBuilder4Delphi.Mapping.pas": "ae5b521ae37dc5805f5ae139517f9018f9cf36caec8b68778dedc4020f641f34", - "src/QueryBuilder4Delphi.Nullable.pas": "40ef27484daa398ea3c7489a32b4683ff0f79312d5c74cc3b1d303edc94ff013", - "test/Mapping.Values.Tests.pas": "e8e8e5f8c6c414a7221442ffdf70db4389ea5c7f740fba9dce392f28aef9d5a1", - "test/Mapping.Tests.pas": "4322dd9de4bd521bac5afd004d81afa3842bdce0397bb53f789b40e7e7e91489", - "test/NullableMappingExamples.pas": "0b8a9dc50cbd5a66c60131033e28a6474623112ee2d7805bd2901ad047ad9577", - "test/FireDAC.Tests.pas": "b2ea56b4530db263eebaf5b11caf7b25ab12b4de7e5dd28efbed015f356db5e6", - "test/QueryBuilder.Tests.dpr": "01afcbf745ed913c5369e1f12eee6b8141040a20a8620385096f508c06e514e1", - "test/QueryBuilder.FireDAC.Tests.dpr": "661375d5aaef3fc052e1a23cad5094c125ab815a5fb64ec77bba9d039db36ce6" - }, - "scope": "Automatic built-in nullable mapping in existing PR #18" -} diff --git a/docs/nullable-writing-validation.json b/docs/nullable-writing-validation.json deleted file mode 100644 index 7d02251..0000000 --- a/docs/nullable-writing-validation.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "date": "2026-10-25", - "issue": 23, - "baseCommit": "1006353", - "compiler": "Delphi 12 Community Edition, RAD Studio 23.0", - "buildMethod": "IDE Project / Build, Base configuration; tools/build.ps1 -TestsOnly for execution", - "integrationDatabase": "FireDAC SQLite :memory: with statically linked driver", - "results": [ - { - "suite": "Core", - "platform": "Win32", - "peMachine": "0x14c", - "passed": 925, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "033711ec9f4cdec40c8d8c9bd9bc5e434bcb194a6512150dc0247f5d8ff8342d", - "reportSha256": "6c5ad65c743169e1272d5f48e2d9414f2b88dab7d7bd065a3c68e48aff2ca31e" - }, - { - "suite": "Core", - "platform": "Win64", - "peMachine": "0x8664", - "passed": 925, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "870da3e6d5b9b86d8f77f3bccfab78e758d0dd4b07d0d38236b9c4c8229e4a98", - "reportSha256": "d0e4d94fa96f9e2d3b25d792398c8e9f36459cc2cfc37520f3818015ebba6650" - }, - { - "suite": "FireDAC", - "platform": "Win32", - "peMachine": "0x14c", - "passed": 94, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "ffeff255e24e6e49053f3b582f4fd1108a0992dc6462a9329bcd7649aa43ce59", - "reportSha256": "94c5baec9904bdcbdd3c40e6de7767c520d81d5140f3d1e14803323ffbbcbd55" - }, - { - "suite": "FireDAC", - "platform": "Win64", - "peMachine": "0x8664", - "passed": 94, - "failed": 0, - "errors": 0, - "ignored": 0, - "leaked": 0, - "executableSha256": "4bb025090b6d351e968c7bfac36f284ff3f673813f1c6f80803bb6949e78f710", - "reportSha256": "734a20f62134d8eda343aab5ca4cf40e284bab8f53c16f40fde484914db3f920" - } - ], - "sourceSha256": { - "src/QueryBuilder4Delphi.Mapping.pas": "11c9d884d75269ebf78aa8f2a0eaea7df6d9ec4e453dc60cdf32f8fdaf054340", - "src/QueryBuilder4Delphi.Query.DataMapper.pas": "3454800b93c639cb678d9ad7c3ff393e4a68a214327a2030818a39db8bd6426c", - "src/QueryBuilder4Delphi.Compilers.Compiler.pas": "d4c6a2300cfb99ca0d4ca3955513d340df47ae8ba2edd58cd287ca43fe50dbc1", - "src/QueryBuilder4Delphi.Providers.FireDAC.Parameters.pas": "23947c734c1d0964302799fc4b2852b5dcbd25ab22f1a10b958eaafde1f57d93", - "test/NullableWriting.Tests.pas": "a67e76e8721387c1dfba003013ee83a51cd58e37984db78eb7c085884a69047b", - "test/FireDAC.Tests.pas": "a6e29bbcc8ebd2b4302d6e7741a2a185b7d844eb47c7b547733d7f59a96d6a4b", - "test/NullableMappingExamples.pas": "36a30364dac9c7ec5f9cb70b24119645fcf518d912537ee4a21d97cdb7ccb5e9" - }, - "limitations": [ - "No live SQL Server or Oracle server execution; all six dialects tested for SQL and binding generation.", - "Native BCD, GUID and timestamp/timezone values checked at parameter binding; SQLite does not prove server precision or timezone preservation.", - "Only the installed Delphi 12 Community Edition compiler was tested." - ] -} diff --git a/docs/validation-results.json b/docs/validation-results.json deleted file mode 100644 index cda013d..0000000 --- a/docs/validation-results.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "date": "2026-10-24", - "compiler": "Delphi 12 Community Edition, RAD Studio 23.0", - "sourceCommit": "df4a2377750d34fc057c81886b481e7309ef975e", - "buildMethod": "IDE: Project / Build, Base configuration, zero warnings", - "referenceResults": 552, - "directComparisons": 540, - "correctedBehaviorCases": 12, - "additionalTests": 344, - "goldenSha256": "f6e99652a3ead2ed37d670efee94b879043d56147c2055afe31b68d7804f0cbe", - "results": [ - { - "platform": "Win32", - "peMachine": "0x14c", - "tests": 896, - "passed": 896, - "failed": 0, - "errors": 0, - "ignored": 0, - "executableSha256": "9c24d5a042d96d0b82a4babf89764fac9f0eac065d0f719ed3307659eadb1265" - }, - { - "platform": "Win64", - "peMachine": "0x8664", - "tests": 896, - "passed": 896, - "failed": 0, - "errors": 0, - "ignored": 0, - "executableSha256": "8ef5fa18da2640e268c55909ab409327d9c6367fd2a9835ea26de65ebb8186f4" - } - ] -} diff --git a/tools/record_validation.py b/tools/record_validation.py deleted file mode 100644 index 96cb8b6..0000000 --- a/tools/record_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -"""Record successful local DUnitX runs and verify executable architectures.""" -from pathlib import Path -import hashlib -import json -import struct -import xml.etree.ElementTree as ET -import argparse -from datetime import date - -parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument('--suite', choices=['Core', 'FireDAC'], default='Core') -parser.add_argument('--date', default=date.today().isoformat(), help='Validation date (YYYY-MM-DD)') -args = parser.parse_args() - -root = Path(__file__).resolve().parents[1] -results = [] -for platform, machine in [('Win32', 0x14c), ('Win64', 0x8664)]: - folder = root / 'build' - project = 'QueryBuilder.Tests' - if args.suite == 'FireDAC': - folder /= 'FireDAC' - project = 'QueryBuilder.FireDAC.Tests' - folder /= platform - exe = (folder / (project+'.exe')).read_bytes() - pe = struct.unpack_from(' 0 - assert all(c.attrib.get('success') == 'True' for c in cases), 'Failed test case' - assert report.attrib['errors'] == report.attrib['failures'] == '0' - assert report.attrib['not-run'] == report.attrib['ignored'] == '0' - results.append(dict(platform=platform, peMachine=hex(machine), tests=len(cases), - passed=len(cases), failed=0, errors=0, ignored=0, - executableSha256=hashlib.sha256(exe).hexdigest())) - -summary = dict(date=args.date, compiler='Delphi 12 Community Edition, RAD Studio 23.0', - sourceCommit='df4a2377750d34fc057c81886b481e7309ef975e', - buildMethod='IDE: Project / Build, Base configuration, zero warnings', - referenceResults=552, directComparisons=540, correctedBehaviorCases=12, - additionalTests=results[0]['tests'] - 552, - goldenSha256=hashlib.sha256((root / 'test/golden.json').read_bytes()).hexdigest(), - results=results) -filename = 'validation-results.json' -if args.suite == 'FireDAC': - filename = 'firedac-validation-results.json' - summary = {key: summary[key] for key in ['date', 'compiler', 'buildMethod', 'results']} - summary['integrationDatabase'] = 'SQLite :memory:, statically linked FireDAC driver' -(root / 'docs' / filename).write_text(json.dumps(summary, indent=2)+'\n', encoding='utf-8', newline='\n') -print(json.dumps(summary, indent=2)) diff --git a/website/build.mjs b/website/build.mjs index c448851..57760a6 100644 --- a/website/build.mjs +++ b/website/build.mjs @@ -13,7 +13,7 @@ const repo = 'https://github.com/auchri/QueryBuilder4Delphi'; const release = (await readFile(path.join(root, 'README.md'), 'utf8')).match(/Current release: \*\*\[(v\d+\.\d+\.\d+)\]/)?.[1]; if (!release) throw new Error('README.md must declare the current release.'); const escape = s => String(s).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"'); -export const documents = ['README.md', 'CHANGELOG.md', ...(await readdir(path.join(root, 'docs'))).filter(f => f.endsWith('.md')).map(f => `docs/${f}`)]; +export const documents = ['README.md', 'CHANGELOG.md', 'CONTRIBUTING.md', ...(await readdir(path.join(root, 'docs'))).filter(f => f.endsWith('.md')).map(f => `docs/${f}`)]; // index.html is the hand-written landing page; the README becomes the guide. const target = source => source === 'README.md' ? 'guide.html' : source.replace(/\.md$/, '.html'); export function linkTo(href, source) { @@ -26,10 +26,9 @@ export function linkTo(href, source) { const menu = [ ['index.html', 'Home'], ['README.md', 'Getting started'], ['converter.html', 'SQL → Delphi'], ['docs/EXAMPLES.md', 'Examples'], ['docs/API.md', 'API reference'], - ['docs/OBJECT_MAPPING.md', 'Object mapping'], ['docs/PORTING.md', 'Porting'], - ['docs/MIGRATION.md', 'Upgrade to v2'], - ['docs/VALIDATION.md', 'Validation'], ['docs/XML_DOCUMENTATION.md', 'XML documentation'], - ['docs/MAPPING_PERFORMANCE.md', 'Mapping performance'], ['CHANGELOG.md', 'Changelog'], + ['docs/OBJECT_MAPPING.md', 'Object mapping'], + ['docs/MIGRATION.md', 'Upgrade to v2'], ['docs/MAPPING_PERFORMANCE.md', 'Mapping performance'], + ['CHANGELOG.md', 'Changelog'], ['CONTRIBUTING.md', 'Contributing'], ['docs/WEBSITE.md', 'Website maintenance'], ]; function shell(title, body, source, toc = []) { diff --git a/website/test/browser/website.spec.mjs b/website/test/browser/website.spec.mjs index deb7f57..b4b8039 100644 --- a/website/test/browser/website.spec.mjs +++ b/website/test/browser/website.spec.mjs @@ -68,9 +68,9 @@ test('navigation has one active page and a keyboard-accessible Advanced group', await summary.focus(); await summary.press('Enter'); await expect(summary).toHaveAttribute('aria-expanded', 'true'); - await nav.getByRole('link', { name: 'Porting', exact: true }).click(); + await nav.getByRole('link', { name: 'Upgrade to v2', exact: true }).click(); await expect(nav.locator('details')).toHaveAttribute('open', ''); - await expect(nav.locator('[aria-current="page"]')).toHaveText('Porting'); + await expect(nav.locator('[aria-current="page"]')).toHaveText('Upgrade to v2'); await expect(nav.locator('summary')).toHaveAttribute('aria-expanded', 'true'); });