如何在数据探索器中允许空参数值?

我希望允许过滤步骤为可选,但如果我留空 query 字段,则会收到错误:

---[params]
--- string :query = '%'
select uh.details 
from user_histories uh
where uh.details like case 
      when :query is not null then '%' || :query || '%'
      else '%'
      end
limit 5

错误:DataExplorer::ValidationError: 缺少类型为 string 的参数 query

3 个赞