Hey everyone,
I'm working with the Direct Query option in Xano and have both live and test datasources. My challenge is dynamically setting the datasource inside the SQL of the direct query.
Right now, Iโm using a condition to check the datasource type and then running a separate Direct Query for each one. While this works, it feels messy and inefficient.
This is the condition:
This is the first direct query (live data source):
This is the second (test data source):
Is there a cleaner way to dynamically pass the datasource into the SQL query without duplicating the Direct Query logic?
Would love to hear if anyone has tackled this issue before!
Thanks! ๐