Open absporl opened 1 year ago
Yes, nodes()
was a bare minimum implementation to get the test suite passing (copied from the pg_query Ruby gem).
There isn't a foolproof way to know if we've covered all nested node types, but feel free to open a PR replacing the _ => ()
in the match as needed for your use case. Ideally with tests 😄
Both
NodesEnum::nodes()
andprotobuf::ParseResult::nodes()
don't have documentation, although the latter hintsIs the goal just to provide a helper function to extract
ParseResult::{warnings, tables, aliases, cte_names, functions}
?I'm trying to do some more detailed parsing of a statement tree, and would like a "visitor" pattern. I need more information than
scan()
provides. Is it useful to extend thenodes
function?