Open AshishMittal02 opened 11 months ago
One option is there to have multiple Where(sq.Eq{}
but if i have 100 orderIDs it will grow alot and i think it will be ugly
you can use squirrel.And
You can use this code
sq.StatementBuilder.PlaceholderFormat(sq.Colon).Select("c.userID, c.name, o.orderID").From("users AS c").
Join("orders AS o ON c.orderID = o.orderID").
Where(sq.Eq{"orderID": []string{"a", "b"}})
I'm trying to recreate this query with squirrel:
The closest I can come up with is this and it's wrong: