Skip to main content

getSubqueryElementAlias()

getSubqueryElementAlias(subqueryDepth?: number): string

Defined in: packages/core/src/utils/formatQuery/utils.ts:492

Returns the element alias for a subquery at the given nesting depth. Depth 0 (the common, non-nested case) uses subqueryElementAliasBase unchanged; deeper levels are suffixed with the depth, so a subquery nested within a subquery cannot shadow its parent's binding.

Deterministic by depth rather than randomized, so output remains stable and snapshot-friendly.

Parameters​

ParameterTypeDefault value
subqueryDepthnumber0

Returns​

string


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.