Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treewalker: Yield for each array element itself, not just children #303

Merged
merged 1 commit into from
Dec 23, 2023

Commits on Dec 15, 2023

  1. Treewalker: Yield for each array element itself, not just children

    Due to an oversight in how the treewalker was implemented, we would
    never pass the direct array elements to the walk! block, only any
    children the elements have.
    
    In practice this is usually not an issue, since the array elements
    are typically the generic PgQuery::Node object, and we would call the
    walk! function successfully on its children. However, working with those
    node objects directly is necessary when wanting to replace the node.
    
    This may be a backwards incompatible change if one relies on the
    parent_field to always be a symbol (it can now be an integer as well).
    lfittl committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    f8973b6 View commit details
    Browse the repository at this point in the history