Spring Boot MyBatis-Plus apply 自定义 where 条件

Spring Boot MyBatis-Plus About 234 words

需求

对于PostgreSQL中的数组类型,需要定制化SQL

LambdaQueryWrapper

使用LambdaQueryWrapperapply方法,自定义SQL

查询Post表中topics数组字段,长度为1的数据。

LambdaQueryWrapper<Post> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.apply("array_length(topics, 1) = 1");
Views: 347 · Posted: 2024-04-19

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh