如何逃避教义迁移中的问号?

时间:2020-09-15 09:44:55

标签: postgresql jsonb doctrine-migrations

我在PostgreSql上使用了理论迁移,并且有以下查询,这些查询使用Jsonb语法访问数据:

select case 
  when (json_field ? 'in_json_field_name') then 'exists' 
  else 'not exists' end as 'in_json_field'
from table bar

学说移民在寻找什么?在查询中尝试用某些参数替换它,但是在这种情况下,问号不是占位符,而是查询语法的一部分。

我用jsonb_exists_any函数替换了问号,我的查询效果很好,但是在我的情况下,也许有某种方法可以避开问号?

谢谢!

0 个答案:

没有答案