We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
数据是这样的
["330100", "330200", "330300", "330400", "330500", "330600", "330700", "330800", "330900", "331000", "331100"]
db.Table("table_name").Where(datatypes.JSONQuery("area_code").HasKey("330100")).Find(&rows)
错误:
Invalid JSON path expression. The error is around character position 8.
The text was updated successfully, but these errors were encountered:
可以试试这么查询,db.Table("table_name").Where(datatypes.JSONArrayQuery("area_code").Contains("330100")).Find(&rows)
Sorry, something went wrong.
same problem how to query this in postgresql ?
select * from table where area_code::jsonb @>'[330100]'
jinzhu
No branches or pull requests
数据是这样的
["330100", "330200", "330300", "330400", "330500", "330600", "330700", "330800", "330900", "331000", "331100"]
db.Table("table_name").Where(datatypes.JSONQuery("area_code").HasKey("330100")).Find(&rows)
错误:
Invalid JSON path expression. The error is around character position 8.
The text was updated successfully, but these errors were encountered: