【发布时间】:2016-01-08 22:55:02
【问题描述】:
是否可以使用 postgres_ext 使用链式方法执行 NOT 类型查询?
rules = Rule.where.overlap(:tags => ["foo"])
基本上想要上面的倒数。谢谢!
【问题讨论】:
标签: ruby postgresql postgres-ext
是否可以使用 postgres_ext 使用链式方法执行 NOT 类型查询?
rules = Rule.where.overlap(:tags => ["foo"])
基本上想要上面的倒数。谢谢!
【问题讨论】:
标签: ruby postgresql postgres-ext
在常规活动记录中,您可以使用.where.not,如本文所述:https://robots.thoughtbot.com/activerecords-wherenot 但是查看 postgres_ext 的源代码我不知道它是否在该库中定义。您可能能够以使用本机活动记录方法的方式构建查询。
【讨论】: