Loading...
This site is best viewed in a modern browser with JavaScript enabled.
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
lua-resty-mysql 的json类型的返回值会考虑直接解析成lua table吗?
xiangnanscu
mysql 5.7 支持json类型. 我测试了下,lua-resty-mysql 对这种类型的返回值是string类型.
moonbingbing
json 本来就是字符串,只不过有自己的格式。把 json 格式字符串 decode 为 table 的处理,还是需要你的程序来完成。其他语言也是一样的。
对于 json 格式的数据,你应该用MySQL 5.7 中 JSN_EXTRACT
、
JSON_CONTAINS 之类的函数来查询。
2016-09-19 11:04 GMT+08:00 项楠
<
xiang...@gmail.com
>
:
mysql 5.7 支持json类型. 我测试了下,lua-resty-mysql 对这种类型的返回值是string类型.
--