Welcome Guest, Not a member yet? Register   Sign In
MySQL JSON fields support in query builder
#4

(08-15-2020, 04:41 AM)MGatner Wrote: I don’t see any reason why this wouldn’t be part of the core. If it is an official MySQL data type then handling ought to be mandatory. How would this differ from a TEXT? Would the returned value be automatically run through json_decode()? Check out Entity casts for an example of handling this already at the entity level.

When getting it from the database its easy to use Entities that cast so you get decoded json. The thing is when building queries the JSON field in MySQL gives you the ability to search the JSON itself - perfom actions on nodes and stuff. Here are some example JSON queries to make things more clear: https://www.mysqltutorial.org/mysql-json/ 
i
.e. it requires a whole new set of methods added to the builder imho - would be awesomely powerfull Wink
Reply


Messages In This Thread
RE: MySQL JSON fields support in query builder - by korgoth - 08-15-2020, 05:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB