Skip to content

Context-aware substitution #101

@mfp

Description

@mfp

Currently sqlgg performs purely textual substitution in cases like this:

SELECT * FROM foo
  WHERE a AND
    @bar { Some { bar OR baz } | None { TRUE } }

which easily leads to bugs (WHERE a AND bar OR baz instead of the intended WHERE a AND (bar OR baz)).

It'd be nice to constrain usage of variants to make these substitutions context-aware and prevent such errors (e.g. in this case, adding surrounding parentheses automatically).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions