What is the difference between inSet and inSetBind in Slick

后端 未结 1 966
萌比男神i
萌比男神i 2021-01-17 08:09

The ScalaDoc of the functions has not been filled out.

I know that the methods are used for mimicking SQL\'s IN keyword (eg, SELECT * FROM table W

1条回答
  •  遥遥无期
    2021-01-17 08:51

    inSet is an unsafe version of inSetBind which generates a safe/escaped sql value based on passed in input. In your example where the value is manually set, the two types of bind are equally safe.

    Normally with bound parameters you get a performance boost (via generated prepared statement), but not the case with collection values. See here for the details.

    0 讨论(0)
提交回复
热议问题