Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MemSQL 有能力支持 JSON 查询。GORM 是否能够执行 JSON 查询,还是必须在我的应用程序中编写 SQL?
您可以在静态映射中设置 sqlType 以匹配 MemSQL 类型“JSON”:
class Entity { String info static mapping = { info sqlType: 'JSON' } }
然后你可以推送 JSON 数据做这样的事情:
new Entity(info:'{"foo":"bar"}').save()