ktorm
ktorm copied to clipboard
请问对PostgreSQL的jsonb,json字段的kv操作如何呀!?
具体此类功能有实现了吗?能提供演示吗?感谢
有这个计划,不过暂时是不支持的
@hurui200320 也有和你一样的需求,他通过对 Ktorm 进行扩展,自己实现了这样的功能,并且写了一篇很不错的文章,记录了详细的扩展步骤,有兴趣可以参考一下 https://skyblond.info/archives/751.html
好的 感谢
Vincent Lau [email protected] 于2020年10月7日周三 下午6:00写道:
有这个计划,不过暂时是不支持的
@hurui200320 https://github.com/hurui200320 也有和你一样的需求,他通过对 Ktorm 进行扩展,自己实现了这样的功能,并且写了一篇很不错的文章,记录了详细的扩展步骤,有兴趣可以参考一下 https://skyblond.info/archives/751.html
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kotlin-orm/ktorm/issues/192#issuecomment-704830166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY2IB4JQXV4MH2ZAJ4DYVTSJQ337ANCNFSM4SG4DNAQ .
--
- Bum Jyo /Mr.Jyo
- Hangzhou . Zhejiang .China
- www.dlhis.com
- +86-571-87671686
@vincentlauvlwj 按照hurui200320的写了一下,jsonb可以插入,但是进行filter的时候好像都被识别成json了,所以无法使用greater等操作符
@jeffma 为什么要对 json 字段用 greater 操作符,这个有业务意义吗....
@vincentlauvlwj yugabyte db里文档操作是个常用操作啊,yugabyte db是个多模式的支持postgresql jsonb并且对jsonb格式有优化的数据库
看起来YugabyteDB不在Ktorm的支持列表里,如果想要用的话可能需要考虑自己实现对应的方言来支持特殊功能
@vincentlauvlwj 作者你好,我按照@hurui200320 文章里面的写法,和Ktorm官方文档里面的示例代码扩展Json和Jsonb类型,一个代码都没改,但是均无法正常运行,报错信息为:ERROR: column "xxx" is of type json but expression is of type character varying