Skip to content

Support scoped tabular expressions, IN subqueries and collection aggregation #32

Description

@asmyasnikov

Reusable selections and composite-key filters need tabular scopes that v0.2.1 does not model.

$selected = (SELECT id, label FROM records WHERE active = true);
SELECT id FROM $selected;

Deliver in steps: noncorrelated scalar IN subqueries; tuple-valued keys and IN; derived FROM/JOIN sources; named SELECT bindings; then AGGREGATE_LIST and the concrete JSON serialization path for projecting grouped lists.

Acceptance: resolve source/result names once using direct parser contexts; preserve alias scope and nullability; reject ambiguous names and unsupported correlations explicitly; support these sources in read queries and the applicable DML forms. Test NULL and empty inputs, tuple arity/types, alias shadowing, grouping and computed projections. Do not diagnose an IN subquery as a parenthesized List parameter or suggest a rewrite that changes its meaning.

Priority: after shared expression improvements. No intermediate AST or separate generator-specific analysis.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions