尝试执行Arel查询。在我的参数中
{"node"=>"firstSeenAt", "rule"=>"hasAnyValue", "value"=>""}
,其中first_seen_at
是我的visitors
表中的一列
def table
visitors.arel_table
end
def rule_has_any_value
visitors.where(table["#{column}"].not_in_any(["", nil, 0]))
end
保持在我的Rails控制台中
ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: timestamp without time zone = integer
LINE 1: ... IN (NULL) OR "visitors"."first_seen_at" NOT IN (0)) OR...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
):
这里有什么问题的指针吗?谢谢。