JOOQ选择与地图类型值
有一个具有MAP类型列的表,地图列类型将如下所示
Map<String, CustomClass.class>
,CustomClass如下所示,
Class CustomClass {
String name;
String attr;
}
我想在Map列的值中选择匹配“关键字”包含的记录(无论键是什么键)。我需要下面的东西。有什么办法可以使用?
JooqQuery jooqQuery = (SelectJoinStep<?> step) -> {
step.where(MANAGERS.NAME_DESC_I18N_MAP.contains(
Map<"ANY KEY", keyword in CustomClass.name> // need help here
));
There is a table that has map type column, and the map column type would be like below
Map<String, CustomClass.class>
and CustomClass is like below
Class CustomClass {
String name;
String attr;
}
I would like to select record that match 'keyword' contain in map column's values (no matter what key is). I need something like below. Is there any way that I can use?
JooqQuery jooqQuery = (SelectJoinStep<?> step) -> {
step.where(MANAGERS.NAME_DESC_I18N_MAP.contains(
Map<"ANY KEY", keyword in CustomClass.name> // need help here
));
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
喜欢
作为量化的比较谓词在Jooq中。如果您的RDBMS不在本地支持,JOOQ将为您效仿。尝试以下操作:您无法以这种方式使用
contains()
,但是我想没关系。另请参阅此博客文章有关使用
喜欢
作为量化的比较谓词。You can use
LIKE
as a quantified comparison predicate in jOOQ. If it's not supported natively by your RDBMS, jOOQ will emulate it for you. Try this:You can't use
contains()
in this way yet, but I guess that's OK.See also this blog post about using
LIKE
as a quantified comparison predicate.