posthog
posthog copied to clipboard
feat(hog): print ast in console
Problem
Changes
Running print(expr) prints out the (unsanitized) SQL, just running expr in the console will still show the classes.
I couldn't get the latter to work even though there should be a __repr__(self) you can override.
I also added a to_hogql() function that just returns the printed HogQL.
How did you test this code?
See above