Good Day,
I am using Sequelize mysql in nodeJs.
My problem is that, given an array of IDs such as [4,5,6,7,8]
And a table T where each row holds a ID. say, Table T:
ID
4
5
7
8
How do I search if all the ID in the array exist in the table?
Do i do a for loop and call find on every loop? Is this done asynchronously or synchronously? How do i wrap it in a promise if i want to do that?
I am not sure what is the proper way for searching if all IDs given an array exist in the table.
Thanks