ts-typed-sql icon indicating copy to clipboard operation
ts-typed-sql copied to clipboard

Allow tuples

Open phiresky opened this issue 8 years ago • 2 comments

e.g.

select mensa.meals where (_mensaid, _lineid) in ((a,b), (c,d))

phiresky avatar Jun 04 '17 19:06 phiresky

Are you fine with this syntax:

select(mensa.meals).where(
  tuple(mensa.id, mensa.lineId).isIn( [tuple(a, b), tuple(c, d)] )
)

?

hediet avatar Jun 04 '17 20:06 hediet

yeah. Might be good to investigate what exactly the differences are in PG between ROW(1,2,3), values(1,2,3) etc.

phiresky avatar Jun 04 '17 20:06 phiresky