我正在使用rets gem 下载房地产数据。
我正在尝试传递:no_records_not_an_error
给find
命令,但我无法正确使用语法:
:no_records_not_an_error => true
我已经尝试了许多不同的迭代,使用括号、嵌套括号、带和不带逗号,但我一直无法找到正确的语法:
properties = client.find (:all, :no_records_not_an_error => true), {
search_type: 'Property',
class: klass,
query: status_query,
limit: 2000,
offset: offset,
select: columns_system.join(',')
}
此代码可以在没有 的情况下工作no_records..
,但是当没有搜索结果时,它会在最后出现错误。当没有搜索结果时,我希望此代码返回 0 或 nil。