Open garrensmith opened 2 years ago
Not in my domain but I just wanted to chime in on the walker pattern. We've been using it more and more in migrations team parts of the codebase, and we've refined it in the process. The best example (and the most recent) IMO is the walkers from parser-database
. They're used heavily in the validations in datamodel core and the general opinion is that it's much nicer to work with than previous solutions.
Public API for the parser database walkers: https://prisma.github.io/prisma-engines/doc/parser_database/walkers/index.html
The current query schema and the builder are a direct port from the original scala code. Given the teams improved knowledge of rust and how we are using the schema, we can improve on the original design and make it a little more rust-like.
At this point I don't have a very clear path on how we would do, but some of the ideas I have are:
EnumWalker
.An approach to implementing this could be something like: