Closed enigmatiqk closed 2 months ago
Hi @enigmatiqk,
Let me make sure I understand the question: You would like to use parameters retrieved from a relational database via a SQL statement, where the SQL may return more than one row, and be able to iterate over the rows in the result and use their values to build the body of the response?
Hi @enigmatiqk,
Let me make sure I understand the question: You would like to use parameters retrieved from a relational database via a SQL statement, where the SQL may return more than one row, and be able to iterate over the rows in the result and use their values to build the body of the response?
Hi @apisim , i confirm
and if it can be done for sql parameter, i hope you can do the same from csv parameter
API Simulator v1.12 now allows Parameter from SQL Data Store and Parameter from CSV Data Sources to return more than one element, if query returns more than one row. Check out the new pick: first | all
configuration.
Thanks!
hi,
if i use csv or sql parameter, only one line can be returned and it's return null if more than one line must be returned
i can write a body like that :
but can"t write a body like that :
i would like have this propertie in simlet configuration : "multiline" or "oneResult" or "onlyOneResult" or anything else ... with value true/false
if i activate this propertie i could parse like file parameter as in your com : https://github.com/apimastery/APISimulator/issues/17#issuecomment-1086445017
in this com, the solution works when i have a file but don't work with a sql datasource ...
thanks