Skip to content

content: getItems SELECT builder #1410

Description

@grigasp

Goal: Add the content SELECT (all descriptor fields) on top of the base query.

Work

  1. SELECT alias.$ per joined class + target; SQL calculated fields' expression (with targetAlias substitution) as aliased columns. Multi-source → one query per ContentSource; non-applicable columns SELECT NULL.
  2. Column→field map: emit (columnAlias → path+step+className) + json key (property name) → field id, consumed by Stage 4. Use $ selector to stay under the 2000-column cap; use $->[Prop] selectively for sort/filter columns.
  3. Hidden ≠ removed: hidden fields are still selected; only fields removed from the descriptor are dropped.
  4. Sorting: sorting → ORDER BY (resolve field's path/column; for $ blobs use $->[Prop]).

Tests: ECSQL snapshots for direct/related/calculated/multi-source; ORDER BY; non-applicable NULL columns; column→field map correctness.

Dependencies: #1406, #1409.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions