包含和包含在sequelize Where子句中的用途是什么?

时间:2015-03-12 06:01:11

标签: mysql node.js sequelize.js

  $contains: [1, 2]      // @> [1, 2] (PG array contains operator)
  $contained: [1, 2]     // <@ [1, 2] (PG array contained by operator)

我想知道上面两个运算符

的实际用途是什么

1 个答案:

答案 0 :(得分:0)

SELECT ...
    FROM ...
    WHERE foo IN (11,22,33)
    HAVING COUNT(*) = 3;   -- that is, all 3 were found

(这假设IN子句中的每个项只有一行。)