Use ORM queries for editable table grids #81

Merged
michielbdejong merged 1 commit from codex/orm-table-queries into main 2026-11-02 14:15:26 +01:00

The editable runtime grids selected record IDs with SPARQL and opened per-subject ORM windows. ELFA Tables loaded its collection and filtered/sorted the editable grid in the UI. Both editable grid paths now use the public ORM for exact filtering, raw-property ordering and page navigation. Large-table query performance remains an upstream ORM/engine concern.

  • Use where, orderBy, pageSize: 100, maxActivePages: 1, nextPage() and previousPage(); remove production SPARQL table selection and membership polling. Related-record choices and live labels also use the ORM. Keep the old query/window transports only in historical benchmark fixtures.
  • Scope ELFA collection reads through ORM membership filters and avoid an all-record subscription while its editable grid is mounted. Creation and draft resumption focus a subject-scoped ORM read; Show all records returns to the collection query.
  • Label filters as case-sensitive primary-field equality. Disable primary sorting when the schema does not provide a required scalar. Follow the SDK's window semantics and no-op navigation at either end, without inventing page totals or completion cursors. Refresh reopens the first page to include new members.
  • Extend the existing native initial-order compatibility handling to collection pages, preserving correct equal-key index patches and live writes. This is serialization/index compatibility, not alternative query planning.
  • Add the requested AGENTS.md rule: database apps stay above the ORM and must not bypass its query features or implement large-table performance workarounds. Update README and scaling documentation to distinguish current behavior from historical measurements.

Validation: 413 unit/integration tests; 45 browser scenarios across ELFA Tables and both runtime editors; runtime, delivery and profiling-helper TypeScript checks; production builds for ELFA Tables and both runtime editors; git diff --check. Native offline WASM checks cover direct filters/order, next/previous/end navigation, scoped collections, and local/peer writes. Browser fixtures reject SPARQL table-selection queries.

Scope: this migrates editable grid queries and runtime relationship choices. Saved alternative-view calculations and presentation behavior remain separate. Broker-backed multi-user behavior and large-table latency were not rebenchmarked. The earlier performance requirements are not claimed as fixed.

The editable runtime grids selected record IDs with SPARQL and opened per-subject ORM windows. ELFA Tables loaded its collection and filtered/sorted the editable grid in the UI. Both editable grid paths now use the public ORM for exact filtering, raw-property ordering and page navigation. Large-table query performance remains an upstream ORM/engine concern. - Use `where`, `orderBy`, `pageSize: 100`, `maxActivePages: 1`, `nextPage()` and `previousPage()`; remove production SPARQL table selection and membership polling. Related-record choices and live labels also use the ORM. Keep the old query/window transports only in historical benchmark fixtures. - Scope ELFA collection reads through ORM membership filters and avoid an all-record subscription while its editable grid is mounted. Creation and draft resumption focus a subject-scoped ORM read; Show all records returns to the collection query. - Label filters as case-sensitive primary-field equality. Disable primary sorting when the schema does not provide a required scalar. Follow the SDK's window semantics and no-op navigation at either end, without inventing page totals or completion cursors. Refresh reopens the first page to include new members. - Extend the existing native initial-order compatibility handling to collection pages, preserving correct equal-key index patches and live writes. This is serialization/index compatibility, not alternative query planning. - Add the requested `AGENTS.md` rule: database apps stay above the ORM and must not bypass its query features or implement large-table performance workarounds. Update README and scaling documentation to distinguish current behavior from historical measurements. Validation: 413 unit/integration tests; 45 browser scenarios across ELFA Tables and both runtime editors; runtime, delivery and profiling-helper TypeScript checks; production builds for ELFA Tables and both runtime editors; `git diff --check`. Native offline WASM checks cover direct filters/order, next/previous/end navigation, scoped collections, and local/peer writes. Browser fixtures reject SPARQL table-selection queries. Scope: this migrates editable grid queries and runtime relationship choices. Saved alternative-view calculations and presentation behavior remain separate. Broker-backed multi-user behavior and large-table latency were not rebenchmarked. The earlier performance requirements are not claimed as fixed.
michielbdejong changed title from WIP: Use ORM queries for editable table grids to Use ORM queries for editable table grids 2026-11-02 14:15:19 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ELFA/database-apps!81
No description provided.