I want to perform the following logic -
SELECT some_column
FROM table_name
WHERE id IN (value1, value2, ...);
in my go code I have the following int array to represent my ids :
idsToGet := []int{1,2}
I fully understand that you might normally do a sprintf and pass in the one id you were looking for... BUT...
I feel like there is a sensible way to do this without iterating over the array, and doing this as a separate call for each ID... via sprintf - is there a way I can do this as just one call - and have my IN clause auto contain everything from my array?
Totally new to Go - been trying to solve this for an hour, I have it working for single id's - but not for multiples.