Hi,
Need to pass a comma separated list of integers to a query using additionalScope, is this possible?
Here's the setup:
query1:
select * from table_name where id in ( {{ _ids }} )
Javascript code:
query1.trigger({additionalScope: { _ids: [1,2] } });
Passing comma separated _ids
("1,2") in additionalScope and triggering the query gives the following error:
invalid input syntax for integer: "1,2"
Passing an array for _ids
([1,2]) in additionalScope and triggering the query gives the following error:
invalid input syntax for integer: "{"1","2"}"
Is there a way to pass a list of integers in additionalScope so that it can be used for a SQL query's IN clause? Or will I need to use a for loop in Javascript?