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
It's unclear how to:
Given this:
type UserWithJSON struct { gorm.Model Name string Attributes datatypes.JSON } DB.Create(&UserWithJSON{ Name: "json-1", Attributes: datatypes.JSON([]byte(`{"name": "jinzhu", "age": 18, "tags": ["tag1", "tag2"], "orgs": {"orga": "orga"}}`)), }
I should be able to query by Name AND multiple JSON fields, something along those lines:
res := dc.DB.WithContext(ctx).Where([]Row{{ Name: "jinzhu", Attributes: *datatypes.JSONQuery("item_info").Equals(map[string]interface{"name":"jinzhu", "tags": []string{"tag1"}}), }}).Find(&rows)
If it's possible, it's not clear to me how to. Thanks.
README.
Clear example on how to filter by multiple cumulative fields.
The text was updated successfully, but these errors were encountered:
jinzhu
No branches or pull requests
Your Question
It's unclear how to:
Given this:
I should be able to query by Name AND multiple JSON fields, something along those lines:
If it's possible, it's not clear to me how to. Thanks.
The document you expected this should be explained
README.
Expected answer
Clear example on how to filter by multiple cumulative fields.
The text was updated successfully, but these errors were encountered: