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

Expose recursive walk functionality via walk! #268

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

directionless
Copy link
Contributor

Fixes #267

This exposes the private treewalker! via a walk! interface. I opted to create a new walk! instead of making treewalk! public to avoid changing the signature on treewalker -- I could have made the tree argument have a default, but 🤷 I went this way. Happy to change it.

I added a note to the README, though I'm a bit on the fence. In favor, documenting this seems good for the next person. But, I think my table rename example might be too trivial. In my own testing (see #267) I needed something that feels much larger than belongs there. If it's a common enough need, it could be pulled into the library directly, but that feels like a deeper feature to consider.

In contrast, this is a pretty small patch.

Anyhow, that's a long winded explanation.

Copy link
Member

@lfittl lfittl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, and the README update - I think this looks great, and very helpful to make full use of the deparsing!

@lfittl lfittl merged commit b1a9fd4 into pganalyze:main Jan 18, 2023
@directionless directionless deleted the seph/public-treewalker branch February 23, 2023 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What's the correct way to recurse the tree?
2 participants