You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DB.First(&user, datatypes.JSONQuery("attributes").Lesser("age", 35))
// MySQL
// SELECT * FROM `user` WHERE JSON_EXTRACT(`attributes`, '$.age') < 35
DB.First(&user, datatypes.JSONQuery("attributes").Greater("age", 35))
// MySQL
// SELECT * FROM `user` WHERE JSON_EXTRACT(`attributes`, '$.age') > 35
Of course, we will need these as well.
DB.First(&user, datatypes.JSONQuery("attributes").NotLesser("age", 35))
// MySQL
// SELECT * FROM `user` WHERE JSON_EXTRACT(`attributes`, '$.age') >= 35
DB.First(&user, datatypes.JSONQuery("attributes").NotGreater("age", 35))
// MySQL
// SELECT * FROM `user` WHERE JSON_EXTRACT(`attributes`, '$.age') <= 35
Finally,
DB.First(&user, datatypes.JSONQuery("attributes").NotEquals("age", 35))
// MySQL
// SELECT * FROM `user` WHERE JSON_EXTRACT(`attributes`, '$.age') >< 35
The text was updated successfully, but these errors were encountered:
It would be good to have something like this.
Of course, we will need these as well.
Finally,
The text was updated successfully, but these errors were encountered: