【问题标题】:How to perform a NOT query with postgres_ext如何使用 postgres_ext 执行 NOT 查询
【发布时间】:2016-01-08 22:55:02
【问题描述】:

是否可以使用 postgres_ext 使用链式方法执行 NOT 类型查询?

rules = Rule.where.overlap(:tags => ["foo"])

基本上想要上面的倒数。谢谢!

【问题讨论】:

    标签: ruby postgresql postgres-ext


    【解决方案1】:

    在常规活动记录中,您可以使用.where.not,如本文所述:https://robots.thoughtbot.com/activerecords-wherenot 但是查看 postgres_ext 的源代码我不知道它是否在该库中定义。您可能能够以使用本机活动记录方法的方式构建查询。

    【讨论】:

      猜你喜欢
      • 2013-10-09
      • 2017-05-09
      • 1970-01-01
      • 1970-01-01
      • 2011-11-10
      • 2011-07-06
      • 2013-03-11
      • 2021-05-06
      • 2016-05-21
      相关资源
      最近更新 更多