Reconstruct Queries from toSQL() data
Hey everyone, I have an interesting use case. I'm trying to figure out if there's a way to reconstruct/run a query from a Query object obtained via
query.toSQL()
. Something like:
I know this might seem unusual, but I have a specific use case where I need to serialize and later reconstruct queries. Would love to hear if anyone has ideas on how to achieve this or alternative approaches I could explore.1 Reply
Could I get more context about the use case? A simple solution would be to
JSON.stringify
and then JSON.parse
the result of toSQL()
, but not sure what your requirements are